![]() |
UPDATE: Code tested on both 2.0.3 and 2.2.0
Install instructions updated to reflect differences in versions. Ability to specify Text values for points directly added. ===================== As requested in this thread ( http://vbulletin.org/forum/showthrea...threadid=23114 ) This hack includes a small script and instructions on how to install and set up the system. Purpose: Just a simple engine that allows mods and admins to award arbitrary points to users, which will be displayed under their names/avatars. The points can be named anything you wish, and represent anything you choose. You can use the script to add or subtract them. As the script utilizes a Custom Profile Field, the point field can be directly edited in the CP when editing a user, allowing you to place text in the field rather than merely a number. On our forum, the points are called Gil and represent our virtual currency It is used to purchase perks like Custom Titles and avatars. Our staff, having no use for Gil, instead like to have snappy quotes in the field, like "I send greetings of death!!!" (Reno) and "Who needs Gil when you have power?" (Sephiroth) |
Thanks man this is pretty work
|
Does this work with 2.2.0?
|
thanks you, you are my god:D
|
Thank you for this great hack
Waiting on the store hack ;):D |
Thanks!!!
|
Quote:
I dont see a reason why it wouldnt work... |
Wow, this is great!
if the store hack is released, will this be intergrated into it? |
Parse error: parse error in e:\program files\nusphere\apache\htdocs\upload\mod\points.php on line 82
if (isset($userid) { // make sure userid is passed to script |
Make line 82 read
if (isset($userid)) Notice the extra ) My bad. Zip updated. Sorry :) |
any english based site got this working for us to see?
|
Yeah, my own forum.
The code on my forum is a bit different, but mainly cosmetic changes. And no, you can't test it yourself because it checks permissions. But it does work. I just finished squashing the last typo. |
Just finished bug squashing with the big guy here.
Did a clean install of VB220, installed the hack per the instructions and it works perfect. - also installed it on my test board for 203 and it works perfectly. |
I keep getting 404 page not found when I click the below link?
Quote:
|
Can you clarify which link you were clicking and if this was on your board..?
|
It's from the showthread.php and the left below the number of post.
|
If your trying this on our board, www.shinraonline.com - it wont work unless your a moderator or administrator.
If this is your board, then you should check the syntax you entered into the postbit template and ensure all refrences in the hack and in the template show the correct field for the custom field. Catch me on aim later tommorrow (TheTomBlack) if you still having trouble implementing this and I will walk you through it. |
Installed and working great.
thanks for such a great hack! |
it works but only admin can give out points, mod. can't, any solution? please help! thanks very much!
|
Did you place it in your /mod or /admin folder? For moderators to be able to use it has to be in the /mod (since both admins and mods can enter there).
|
yes, i'm sure it is put into the /mod/ folder, that's why i think it's straight that mod. can't give out points :(
when the mod. go to /mod/points.php when they log off, the vB ask them to login first, then the /mod/points.php shows a blank page, but when they click the give out points link in the left column of the message, they got the "no permission" error :( |
makenavoption("Points","../mod/points.php?s=<?php echo $session[sessionhash]; ?>&action=masspoints");
Do you have that code in the correct place, when I installed it for the first time, I did not set the correct URL destination and everything went wrong. If your URL is not like th above (this is guessing you haev 2.2.0) then that may be why it is not working. Other from that I can not be too sure what is wonrg unless you have not added something or have changed something that was not supposed to be changed.:( |
yup, i'm using 2.2.0 and i've done that in the mod. and admin panel, but still the same, only admin can add the points, the mod. only got the message "Do this again." after I click submit botton and the points have not been added. :(
|
Palmer, a little help over here please? :D - I am not sure what is the problem :confused:
|
I had a problem with mine where only myself and supermods could give out points. That's because the default permissions check checks to see if they can see full user info. If your mods can't see full user info, they won't have permission. I changed that around to check for some other permission. :P
|
yup, now i know admin and super mod. can give points without problems, but mod. can't, any idea on how to set the permission right, so all the mod. can give points? thanks a lot! :)
|
For NO PERMISSION problems, try this...
In MODERATOR.PHP Change if ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canviewprofile=1")) INTO if ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid]")) (In short, remove the "AND canviewprofile=1") And calling the script directly as just mod/points.php Won't work. It needs the ?action=points as well as the other info in the URL to function. |
Palmer, thanks very much, it works perfectly now :)
|
Thanks for this great Hack Palmer, one question: What to do if i only want that admins can give points?
|
Is it also possible to give everyone, as default, 0?
|
if u only want admins to do it just simply dont do the part palmer added
NICE HACK!!!!! ;) I NEEDED THIS |
First, back up your forum!
To set the defaul value as zero this is what you need to do: 1. Find out the # of the custom field you created to use for the 'points' (you should already know this if its installed). 2. Go into PhPmyAdmin (which your webhost likely provides). 3. On the left frame should be a list of databases, look for vbulletin, or VB, or forum or whatever you set yours up as during the install. 4. Click the plus button to expand the directory for your VB and look for a link that says 'userfield' and click on it. 5. The right frame should now have a list of all your custom profile fields. Look for the one you created. If this was your first it should be field5. 6. Click 'change' 7. Where is says 'TYPE' click the drop down box under it and change it to 'INT' 8. Change 'Null' to 'Not Null' 9. For 'Default' Put in 0. Click Save and your set. |
Quote:
Replace PHP Code:
PHP Code:
In moderator.php Replace PHP Code:
PHP Code:
|
Quote:
|
Quote:
|
[QUOTE]Originally posted by Lesane
Is it also possible to give everyone, as default, 0? |
Great hack :)
Is it possible to "excempt" admins and mods from this user point system? Is it also possible to excempt a particular user group from having user points? Thanks :) |
Exempt them how?
Not have the points show up? Not give them points? |
Well, exempt them so that they are not entitled to points, hence no points will show up in their postbit (or at least, something to the effect of "N/A" instead of the user points themselves).
I have mods and staffers in my site, and I don't want them to take part in the user points system (because it's all to easy to have the mods give points to themselves or to their fellow mods - not that they are doing it but the temptation is there ;)) Hence, I want administrators, super mods, moderators to be exempted ... also a particular user group (staffers) if it's possible... Not having them show up in their postbits or getinfo will also work for me, if the above is not possible ;) Thanks! |
help me i get this error
Parse error: parse error in c:\apache\htdocs\forum\moderator.php on line 20 what's wrong??that line is } |
All times are GMT. The time now is 10:20 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|