View Full Version : User Points System
Palmer ofShinra
11-02-2001, 10:00 PM
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/showthread.php?s=&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)
TheComputerGuy
11-03-2001, 09:47 AM
Thanks man this is pretty work
Does this work with 2.2.0?
thanks you, you are my god:D
Lesane
11-03-2001, 02:49 PM
Thank you for this great hack
Waiting on the store hack ;):D
Mike Gaidin
11-03-2001, 02:58 PM
Thanks!!!
Reeve of shinra
11-03-2001, 03:10 PM
Originally posted by TGO
Does this work with 2.2.0?
Havent tried it out yet, but I might later on today...
I dont see a reason why it wouldnt work...
Dalius
11-03-2001, 03:44 PM
Wow, this is great!
if the store hack is released, will this be intergrated into it?
maverick1236
11-03-2001, 04:10 PM
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
Palmer ofShinra
11-03-2001, 05:35 PM
Make line 82 read
if (isset($userid))
Notice the extra )
My bad. Zip updated. Sorry :)
eva2000
11-03-2001, 06:34 PM
any english based site got this working for us to see?
Palmer ofShinra
11-03-2001, 06:42 PM
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.
Reeve of shinra
11-03-2001, 07:00 PM
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.
certify
11-05-2001, 12:49 PM
I keep getting 404 page not found when I click the below link?
moderator.php?s=$session[sessionhash]&action=points&userid=$userinfo[userid]" target=_blank
Reeve of shinra
11-05-2001, 02:30 PM
Can you clarify which link you were clicking and if this was on your board..?
certify
11-06-2001, 01:53 PM
It's from the showthread.php and the left below the number of post.
Reeve of shinra
11-06-2001, 03:24 PM
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.
Mike Gaidin
11-07-2001, 02:53 AM
Installed and working great.
thanks for such a great hack!
ckevin
11-09-2001, 01:33 PM
it works but only admin can give out points, mod. can't, any solution? please help! thanks very much!
SaintDog
11-09-2001, 01:42 PM
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).
ckevin
11-09-2001, 01:50 PM
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 :(
SaintDog
11-09-2001, 01:59 PM
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.:(
ckevin
11-09-2001, 02:22 PM
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. :(
SaintDog
11-09-2001, 02:30 PM
Palmer, a little help over here please? :D - I am not sure what is the problem :confused:
dirgotronix
11-09-2001, 05:39 PM
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
ckevin
11-09-2001, 11:56 PM
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! :)
Palmer ofShinra
11-10-2001, 11:07 AM
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.
ckevin
11-10-2001, 01:51 PM
Palmer, thanks very much, it works perfectly now :)
Lesane
11-19-2001, 12:50 PM
Thanks for this great Hack Palmer, one question: What to do if i only want that admins can give points?
Lesane
11-19-2001, 01:10 PM
Is it also possible to give everyone, as default, 0?
black
11-19-2001, 04:34 PM
if u only want admins to do it just simply dont do the part palmer added
NICE HACK!!!!! ;) I NEEDED THIS
Reeve of shinra
11-20-2001, 12:28 AM
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.
Palmer ofShinra
11-20-2001, 08:17 PM
Originally posted by Lesane
Thanks for this great Hack Palmer, one question: What to do if i only want that admins can give points?
In points.php
Replace
$perms=getpermissions();
if (!$perms[ismoderator] and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid]")) {
echo "<p>You do not have permission to do this!</p>";
exit;
}
With
if (!$bbuserinfo[usergroupid]==6) {
echo "<p>You do not have permission to do this!</p>";
exit;
}
In moderator.php
Replace
if ($action=="points") {
$userid = verifyid("user",$userid);
$permissions=getpermissions();
if ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canviewprofile=1"))
With
if ($action=="points") {
$userid = verifyid("user",$userid);
if (!$bbuserinfo[usergroupid]==6)
Lesane
11-21-2001, 03:56 PM
Originally posted by Reeve of shinra
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.
That worked great, thanks "Palmer of Shinra".
Lesane
11-21-2001, 03:58 PM
Originally posted by Palmer ofShinra
In points.php
Replace
$perms=getpermissions();
if (!$perms[ismoderator] and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid]")) {
echo "<p>You do not have permission to do this!</p>";
exit;
}
With
if (!$bbuserinfo[usergroupid]==6) {
echo "<p>You do not have permission to do this!</p>";
exit;
}
In moderator.php
Replace
if ($action=="points") {
$userid = verifyid("user",$userid);
$permissions=getpermissions();
if ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canviewprofile=1"))
With
if ($action=="points") {
$userid = verifyid("user",$userid);
if (!$bbuserinfo[usergroupid]==6)
Thanks again.
dotagious
11-23-2001, 01:54 PM
[QUOTE]Originally posted by Lesane
Is it also possible to give everyone, as default, 0?
Crinos
11-28-2001, 07:42 AM
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 :)
Palmer ofShinra
11-28-2001, 09:21 AM
Exempt them how?
Not have the points show up? Not give them points?
Crinos
11-28-2001, 09:43 AM
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!
squawell
11-28-2001, 11:29 AM
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 }
Reeve of shinra
11-28-2001, 11:44 PM
Crinos - do what we do and put something funny in its place.
For example one of our staff has his say - 1,000,000 pesos.
Of course they can always change that but as staff - you should trust them. =)
squawell - that has to do with the hack ... you probably dont have the semi colon at the end of line 19.
Crinos
11-29-2001, 12:59 AM
Hmm, well, is there any way to "hide" user points for a specific usergroup? Both in the postbit and getinfo? Thanks :)
Reeve of shinra
11-29-2001, 01:36 AM
I think thats possible but I dont know if I have time to check it out ... maybe next week sometime.
Crinos
11-30-2001, 05:09 AM
Kewl! I'll be waiting eagerly then ... Thanks!
Palmer ofShinra
12-01-2001, 06:53 AM
Umm... don't expect me to actually conde anything at the moment...
But the way I'm seeing...
Make a new template... call it postbit_points
It consists of one line...
The line you use to display (and link) points normally in postbit.
Replace the part in postbit with $points
In the showthread part of functions.php
Stick this in...
eval("\$points = \"".gettemplate("postbit_points")."\";");
Stick that Eval inside an IF clause that checks $post[usergroupid]
That way people who belong to certain groups won't display Points at all.
Or if you want to hide EVERYONES points from certain usergroups, use $bbuserinfo[usergroupid] instead.
As for getinfo... I really don't know atm...
Tryfwar
12-01-2001, 05:30 PM
Please could you explain how to set it up so that only 1 or 2 users could edit the points but everyone else could view them?
Thanks alot in advance,
Tryfwar
Palmer ofShinra
12-01-2001, 06:03 PM
Read the thread. It tells you where to change the permissions.
Tryfwar
12-01-2001, 07:30 PM
I created a new template called: postbit_points
added the following line:
<a href="moderator.php?s=$session[sessionhash]&action=points&userid=$userinfo[userid]" target=_blank>ELP:</a> $post[field5]
removed that line from postbits and replaced it with $points
edited functions.php and added this to the Start buildpostbit section: (wasn't too sure where exactly to do this as i couldn't find a IF $post[usergroupid])
eval("\$points = \"".gettemplate("postbit_points")."\";");
I then uploaded the new functions.php.
anyway, i can't seem to work out exactly where i should place this line :(
Any hints? :) Thanks
Psychdrone
12-02-2001, 01:32 AM
HOw do i make it so that admins/mods, may add text, not just #s in the field?
THanks
And thanks again for the wonderful hack!!
squawell
12-02-2001, 02:27 AM
i have a problem with this code:
IF YOU ARE USING VB 2.2.0
Find:
=====================
makenavoption("Build Mailing List","email.php?action=genlist");
=====================
Replace with:
=====================
makenavoption("Build Mailing List","email.php?action=genlist","<br>");
makenavoption("Points","../mod/points.php?s=<?php echo $session[sessionhash]; ?>&action=masspoints");
=====================
but in my admin panel it can't work why??
Radon3k
12-02-2001, 04:30 PM
Hey man, great hack! Thanks a lot! :) Just one question for ya...How can I make it to where Moderators can give out Points (in my case, Awards)? You have to edit the user profile to give it to them, and I've looked everywhere and so far only Administrator's can give them out. How can I make it to where Moderators can give out awards? Thanks again for the great hack! :)
Radon3k
12-02-2001, 05:26 PM
Also, how do I make it to where they can see the "Awards" or "Points" when they post? Everytime I've installed it on my test board, it only shows up in their profile, yet you can still see "Points" or "Awards" underneath" the # of posts they have..Help! heh..thanks! :)
Radon3k
12-02-2001, 07:04 PM
Scratch this. I figured it out. Apparently everytime you add a custom user field, then delete it, it adds another # anyway. So mine wouldn't show b/c instead of "5" it was going up. Ended up at "8" heh...Thanks for the great hack! :)
Edit: Still would like to know about letting Mods give out awards. Thanks again! :)
Palmer ofShinra
12-03-2001, 12:00 AM
Originally posted by Tryfwar
I created a new template called: postbit_points
eval("\$points = \"".gettemplate("postbit_points")."\";");
I then uploaded the new functions.php.
anyway, i can't seem to work out exactly where i should place this line :(
Any hints? :) Thanks
Anywhere inside
function getpostbit($post)
should do.
Try right after
eval("\$post[buddy] = \"".gettemplate("postbit_buddy")."\";");
===================
Psychdrone: I just added that, actually...
I'm updating the zip file after this post with the change.
Basically... where you type in the number of points to give...
If you put in a number, it adds or subtracts points.
If you type in text instead, it changes it to the text.
===================
Radon3k: Umm... Mods should be able to give out points by default.
I don't know what the problem would be.
Shadowz
12-03-2001, 02:06 AM
I click the points link for any user, and just a blank white screen pop ups...
Any suggestions?
http://rapbattle.com/vb Check any thread, for yourself. :(
Thanks in advance
Crinos
12-03-2001, 02:12 AM
Originally posted by Palmer ofShinra
Basically... where you type in the number of points to give...
If you put in a number, it adds or subtracts points.
If you type in text instead, it changes it to the text. Oooo, awesome! Fixed my earlier problem with this one ... now admins, mods and staffers get an "n/a" instead of points!
Thanks a bunch Palmer! :D
Tryfwar
12-03-2001, 09:43 AM
Works great now thanks Palmer :)
Tryfwar
12-03-2001, 07:21 PM
Would it work if i created a group called Points and then give it the appropriate usergroup number in points.php ?
Trying to make it so that only 1 user and admin/sup admin can edit the points.
if (!$bbuserinfo[usergroupid]==6)
Ok, this is Administrator group, what if i made another group with only 1 user in it and that group became id 15 say. How could i make the if statement include group 6 and 15 ?
Wouldn't it be better to use user id's instead in this case, as apposed to group id's...*sigh* sorry for the spam =/
Palmer ofShinra
12-04-2001, 09:54 AM
Easy... first find the userid's of whoever you want to have permission.
Say it was here and I wanted you to have permission... your userid is 2722.
Change all the if ($bbuserinfo[usergroupid]==6) type statements to if ($bbuserinfo[userid]==2722) .
Add ORs for whoever else you want to allow.
You should change moderator.php as well
if ($action=="points") {
$userid = verifyid("user",$userid);
$permissions=getpermissions();
if ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid]")) {
header("Location: mod/points.php?s=$session[sessionhash]&action=points&userid=$userid");
} else {
show_nopermission();
}
exit;
}should be replaced by if ($action=="points") {
if ($bbuserinfo[userid]==2722 {
header("Location: mod/points.php?s=$session[sessionhash]&action=points&userid=$userid");
} else {
show_nopermission();
}
exit;
}
Replace the similar statement in points.php the same way.
squawell
12-04-2001, 10:05 AM
hi~~Palmer ofShinra i have a little question
if i want admin supermod and mod can use this ~~
how should i do ??
and in admin panel when i click points but nothing happen~~
why??
Palmer ofShinra
12-04-2001, 11:27 AM
If you do it just the way you're told, admins, mods and supermods should eb able to give points.
I know because that's how I set ti up, and it's been tested like that.
Link in the admin panel? Blank page?
Buddy... READ THE INSTRUCTIONS.
Did you uncomment the large chunk of code in points.php?
because that section is OPTIONAL, and there's no reason to add anything to the CP unless you use it.
But if you didn't uncomment the code, of course you'd get a blank page.
*sigh*
Shadowz
12-04-2001, 01:51 PM
[Edited By: Sinecure]
Removed because of persistant profanity.
Reeve of shinra
12-04-2001, 01:53 PM
Shadowz - your using two instances of the point hack right?
One for wins and another for losses? If so you have to play around with the hack or use two instances to get it running.
My educated guess is that the second instance your trying to use is causing the problems your experiencing. Try getting just the first to work then try the second.
Freddie Bingham
12-04-2001, 04:28 PM
shadowz are you trying to get banned?
Shadowz
12-04-2001, 07:23 PM
I dont care either way. Banned or not. Cuz this enviornment doesnt make me too comfortable. When I have too be uncertaint too ask a question or not, because there might be a negative backlash from someone more "computer gifted".
Not too mention im not gonna tolerate someones bullsh*t just because they made a hack.
What making a hack and knowing php, makes me inferior?
pshhhhh
All I wanted was an answer like Reeve's...
So simple and too the point. And even though my question might have seem stupid too him, he didnt show any arrogance, like "hes too good of a programmer too answer simple questions". So with that said, Thank you Reeve, its appreciated. And I stand strong in what I said too Palmer. F*CK YOU
Crinos
12-04-2001, 08:59 PM
You take things too personally - and using profanity to debate your premise only makes you lower ...
Good luck getting help ;)
Radon3k
12-04-2001, 10:21 PM
Great, thanks! :) But what script was it that I need to change? Also, what if I wanted to add more than one member to allow them to give out awards? Thanks again! :)
Reeve of shinra
12-05-2001, 01:33 AM
heh I wish I saw the first post before it was censored but anyway ... its all good now I hope.
Radon3k - everything you need should be in this thread. If you have probs, let us know.
Radon3k
12-08-2001, 05:15 PM
Ok I must be really blind. Please tell me how mods can add points or awards to other people. Becuz I just can't figure this out. I must be really blind. Thanks :)
Edit: Nevermind. I'm the biggest idiot in the world. I had no idea there was a Mod CP. But they don't have permission to change the profile, how do I enable this? I can't find it anywhere. Thanks, and sorry for all this trouble...
Palmer ofShinra
12-09-2001, 09:32 AM
If you did the template edit exactly as described in the instructions, then there should be a
Points: 23
Display under each person's postcount, "From" etc next to posts.
The word Points is a link.
Click the Points link under the person in question's name.
That should pop up a window with a form to give the points.
Dalius
12-09-2001, 02:39 PM
Has the file in the first post been updated, or do i have to install the hack and then add all the other stuff in this thread?
Radon3k
12-09-2001, 08:26 PM
Ohh..I get it now, thanks :) I took out the link becuz it only made a blank page, but then that's where your post comes in about making the link work. I get ya, and only mods can do this, right? Thanks again! :)
dotagious
12-09-2001, 08:43 PM
Can you add and subtract using decimal places?
Palmer ofShinra
12-10-2001, 12:46 AM
It should work, but I haven't tried it...
Test for yourself if you want.
JohnBradshaw
12-10-2001, 08:53 PM
Hi
I can't seem to download the file, and I am a registered member (no pirates over here!)
Can anyone help?
Cheers,
Crinos
12-11-2001, 02:42 AM
You followed the instructions in this link yet?
https://vborg.vbsupport.ru/showthread.php?s=&threadid=31848
dotagious
12-11-2001, 04:10 AM
[QUOTE]Originally posted by Palmer ofShinra
It should work, but I haven't tried it...
Test for yourself if you want.
Reeve of shinra
12-11-2001, 05:28 PM
Avenger, earlier in this post I explained how to change the field type. By default it is text but changing it to an integer in phpmyadmin might help with your problem. As for the $ sign,... maybe you can put it in the begging then whatever #. like: $ post[field5] ....
dotagious
12-12-2001, 02:51 AM
[QUOTE]Originally posted by Reeve of shinra
Avenger, earlier in this post I explained how to change the field type. By default it is text but changing it to an integer in phpmyadmin might help with your problem. As for the $ sign,... maybe you can put it in the begging then whatever #. like: $ post[field5] ....
sleepbirdcyp
12-12-2001, 10:19 AM
IS this hack working on VBB 2.0.1 ????????
Thanks!!
Radon3k
12-12-2001, 06:44 PM
Originally posted by Palmer ofShinra
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.
Where does the "?action=points" go? That's the thing I'm tripped up on. Thanks :)
Palmer ofShinra
12-13-2001, 12:25 AM
Any link to give points should read...
your.domain.here.com/board/mod/points.php?action=points
Reeve of shinra
12-13-2001, 01:13 AM
Avenger,
I am not sure how to go about the decimal points then. I am kind of curious about this myself so I may putz around with it over the next couple of days. I will post if I find anything.
About your other question, we are currently using two instances of the points hack successfully.
The easiest way I can think to do this would be to install the first hack and get that working successfully. Then rename points.php to something else, lets be original and say points1.php, and install it the same way you went about installing the hack the first time around.
Just remember that you will need a NEW custom profle field that you will need to reference. You will also need to change link in the postbit to point to the correct file.
BTW: Is this for a win / loss record ?
Reeve of shinra
12-13-2001, 01:24 AM
Sleepbryd,
Unfortunately, this will not work with vb 2.0.1 - when you create the custom profile field you are not presented with the option of making it invisible / uneditable by the user. Hence they can change the value placed.
If your moderately good with php and sql, you can manually add the field and reference it directly in the script. Thats about as much support as I could give pertaining to this.
Reeve
Radon3k
12-13-2001, 08:03 PM
Ok I'm sorry I'm such a pest, but I truly don't understand this...In the template_postbit thing that you edit, when you add that big link so when a mod clicks on "Points" under someone's name they can add the points. But, it doesn't work becuz it just opens a blank page. I have read all of the posts in here several times ans I still cannot figure it out. I want mods to be able to give out points, and I realize you have to make the link point to where you want it to, and I've tried, but it doesn't work. Again, sorry for being such a pest!!
Palmer ofShinra
12-13-2001, 08:05 PM
Did you edit moderator.php properly?
Radon3k
12-13-2001, 09:56 PM
Yep, I added the stuff in the instructions like you said.
dotagious
12-13-2001, 10:47 PM
[QUOTE]Originally posted by Reeve of shinra
Avenger,
I am not sure how to go about the decimal points then. I am kind of curious about this myself so I may putz around with it over the next couple of days. I will post if I find anything.
About your other question, we are currently using two instances of the points hack successfully.
The easiest way I can think to do this would be to install the first hack and get that working successfully. Then rename points.php to something else, lets be original and say points1.php, and install it the same way you went about installing the hack the first time around.
Just remember that you will need a NEW custom profle field that you will need to reference. You will also need to change link in the postbit to point to the correct file.
BTW: Is this for a win / loss record ?
Radon3k
12-15-2001, 02:49 AM
Ok I've followed the instructions to the tee..But I still cannot figure out how to do the linking thing to points.php so that mods can give out points. Please assist if you can, thanks!! :)
Radon3k
12-15-2001, 04:05 PM
I reistalled the hack, and the link where it says "Points:" still doesn't work. Everything else works, just I can't get that link to work...I'm gonna go crazy figruin this thing out... :confused:
Reeve of shinra
12-15-2001, 09:09 PM
Radon3k - Your problem might be because you have your VB setup in your main directory .... (not under FORUM like VB.org does).
In your postbit template, Try replacing:
<a href="../mod/points.php?s
with:
<a href="http://www.thessp.net/mod/points.php?s
Leaving the rest of the url intact.
Radon3k
12-15-2001, 09:17 PM
Yeah, I've tried that...I'll try again though, don't see the harm...I see you've registerd on my board, so I suppose you can witness my testing this ;)
Radon3k
12-15-2001, 09:20 PM
Well that's what I get now when I try it...bah...It's better than a blank page I suppose...what now? hah...Thx:)
Radon3k
12-15-2001, 09:28 PM
Gettin there...this is the error I get now: Parse error: parse error in H:\webspace\websites\thessp.net\thessp.net\www\mod \moderate.php on line 28
Now what? Thanks :)
Reeve of shinra
12-15-2001, 09:45 PM
In the postbit, Try changing:
http://www.thessp.net/mod/moderate.php?
to:
http://www.thessp.net/mod/points.php?s
Radon3k
12-15-2001, 10:02 PM
< a href="http://www.thessp.net/moderate.php?s=$session[sessionhash]&action=points&userid=$userinfo[userid]" target=_blank >
That's what it currently says...What do I change?
Edit: Meant to also add that the link is correct, but for the purposes of this board and I'm not sure if it would take it or not, so to be on the safe side I put spaces right after the "<" and before the ">"
Reeve of shinra
12-15-2001, 10:37 PM
change it to this:
< a href="http://www.thessp.net/mod/points.php?s=$session[sessionhash]&action=points&userid=$userinfo[userid]" target=_blank >
Radon3k
12-15-2001, 10:43 PM
Works! Great!! Thanks very much sir!!!! I appreciate all the help!! :)
Palmer ofShinra
12-16-2001, 08:19 AM
I see the roblem now...
The link is supposed ot point to MODERATOR
You pointed it at MODERATE
ATE - ATOR
Notice the difference?
Moderator.php adds an extra layer of security checking to the process and doesn't place any noticable strain on the server.
Radon3k
12-16-2001, 04:18 PM
I don't have moderaTOR, I only have moderATE. And I'm running vBulletin 2.2.1. But it's working now so thanks a lot! :)
JohnBradshaw
12-27-2001, 08:13 PM
Can I buy the store from you please? I think it would be perfect on my site
Sadie Frost
01-07-2002, 02:54 AM
Some people were talking about installing this hack twice - and I thought it was once to add points and once to take them away.
I am probably wrong about that, but in case I'm not (fat chance) to do that you only need to install the hack once, and then to take away points you just type in a negative number :)
Work great though! I am using "mithril" for my lord of the rings boards lol :)
Reeve of shinra
01-07-2002, 06:42 AM
Lord of the Rings board ... oooo - I will have to drop by sometime.
Yeah, to take away 'points' just use a neg #.
JohnBradshaw
01-07-2002, 08:00 AM
Can I buy the store from you please? I think it would be perfect on my site
Palmer ofShinra
01-08-2002, 11:05 AM
No
Dalius
01-12-2002, 05:30 PM
Originally posted by Palmer ofShinra
No
LOL that just made me laugh :D
I'm writting my own version of the store hack, its not that hard
Shenlong
01-12-2002, 05:41 PM
great hack!
Dalius
01-12-2002, 06:23 PM
Problem:
When entering text into box, it says it got submited, but it doesnt change
i did reeve's 0 defult thing, could that have messed it since i made it int?
black
01-12-2002, 11:26 PM
Originally posted by Dalius
LOL that just made me laugh :D
I'm writting my own version of the store hack, its not that hard
Cool i was going to write my own version also... are you releasing it public
Psychdrone
01-12-2002, 11:44 PM
if one of you could release it that would be nice:)
Dalius
01-13-2002, 12:42 AM
Nope, i cant
i have to hardcode it into my site personally, releasing it will be too hard because everyone will have probs with it
Sadie Frost
01-13-2002, 03:40 AM
Originally posted by Dalius
Problem:
When entering text into box, it says it got submited, but it doesnt change
i did reeve's 0 defult thing, could that have messed it since i made it int?
I did the default thing and mine works fine :)
I can't put text in the point field on the profile though - if I change it back to how it was originally, will it work?
And if I can get a store type thing working on my boards, I'll post it here. :)
Reeve of shinra
01-18-2002, 01:17 AM
Originally posted by Dalius
Problem:
When entering text into box, it says it got submited, but it doesnt change
i did reeve's 0 defult thing, could that have messed it since i made it int?
Yes, if you change the field to an integer format then it cannot accept the text values your placing into it.
sahammondsr
01-20-2002, 07:26 AM
First, great hack, and thanks for sharing.
We have a reward site where points are an actual currency that can be converted to tangible goods so a hack like this made perfect sense for us.
We ended up dumping it and writing our own. The reason I'm contacting you is to offer to share the code we've written. Our hack is very specific to our system and wouldn't work to just give it to users (it would take some cleaning up and generalizing and removing our point inserts (into other database tables) etc, but we've added a couple of core features that I think would enhance your hack immeasurably.
First, we've put a short segment of php into the include template and then added a few lines to the postbit template and now we have the ability to assign points inline to the posts (save a click). This of course is a time saver and its fairly simple for any user to do. I'm uploading a screenshot with this post so you can understand what I am referring to. This also eliminates the edit to moderator.php and just sends the request straight to points.php which validates the request itself. The add points box you see in the screenshot below only appears to moderators (end users do not see this box).
Second, we've created a user on our system called PointFairy and when we add points we have the points.php automatically insert a post into the thread saying that points were added as well as update the pointfairy user's sig to show total points issued to date by the point fairy. You can see an example of this in action at http://forums.primarewards.com/forumdisplay.php?forumid=7. Most of the threads there have an automated "pointfairy" message appended to them. You'll notice it updates post/thread counts and the links as well (we didn't make it e-mail because our system triggers an e-mail when points are added anyway, but that wouldn't be a big change either).
Once we remove our own database inserts (just dealing with vBulletin field5 and inserting the post, etc.), we've got points.php down to around 40 lines of PHP (this doesn't account for the mass processing that's in the original).
Anyway, the point in contacting you is to offer to send our code to you if you want to generalize it, document it, and either merge it with yours or perhaps even use it instead of yours for your next release. If you're interested, contact me at ceo@primainternet.com. I clean it up and make it a hack and post it here myself, but I just don't have the time to come back and support it, so you're welcome to it if you'd like it.
Thanks for the inspiration.
Reeve of shinra
01-20-2002, 04:41 PM
We haven't released it here yet, but after a million and a half minor revisions we settled on a similiar inline text field that can award the needed points to the specific user. Our only addition to that is a pop up alert that tells you it was successful.
The Point Fairy is a very HOT idea. If your willing to share, then I would deffinitely love to intergrate that into what we're currently using and re-release it here.
sahammondsr
01-20-2002, 05:05 PM
Thanks for dropping me a line. I sent the code to you, hope it helps :)
Palmer ofShinra
01-20-2002, 06:14 PM
Originally posted by Dalius
Nope, i cant
i have to hardcode it into my site personally, releasing it will be too hard because everyone will have probs with it
And that's exactly why I'm not releasing mine either...
But really... once you realize what you need to do, it becomes mind-numbingly simple.
Part of the problem with mine is that it's dependent on a whole whack of mini-hacks already added to our forum... and not documented...
Plus the code is a real mess.
Though I would be interested in seeing what others come up with for this...
Dalius
01-20-2002, 10:43 PM
Im actually having probs making it
I can do the layout and stuff, but i dont know how to get it to actually how to take the points to make something
Shenlong
01-21-2002, 12:22 AM
anyway I can make it so I give ITEMS instead of points, for example:
There are 3 fields
Misc. Items
Armor
Weapon
Misc. Item example=potion
armor example=steel plate
weapon=long sword
so u can go and edit the users ITEMs instead of points? can someone PLZ make this it would help me and a lot of other members a lot im sure
Psychdrone
01-21-2002, 01:26 AM
ya that would be cool as #&@$
Shaede
01-21-2002, 02:03 AM
Edit: Nevermind...I figured it out on my own...thanks. :\
Shenlong
01-21-2002, 05:30 AM
is there way to add multiple fields to this?
for example, instead of typing a point score i type in a word
so far I have a weapon field, I want to add Armor and Gil, is there a way to do that?
Shenlong
01-21-2002, 05:45 AM
NM! I got it
MaineI30
01-22-2002, 04:16 AM
hey guys,
novice here, wondering how you can make it so that "points" is only hyperlinked (under user name in posts) if the thread reader is an admin or moderator... and to everyone else, it's just not clickable...
Palmer ofShinra
01-26-2002, 07:47 PM
Simple...
You find the getpostbit function in functions.php
Add a line that checks permissions to see if the person is authorized to give points.
Example - Only admins can
if ($bbuserinfo[usergroupid]==6) {
$points="blahblah"; <-- make that the code with the link
} else {
$points="Points: $post[field5]";
}
I have an even cooler solution working... but I'm keeping that to myself.
Sparkz
01-26-2002, 08:39 PM
If anyone would like it, I could release a hack that gives administrators and mods the ability to give users points, but in stead of displaying the points in the user profile, the amount of points would actually decide the usertitle of the user...
I have this implemented on my own site and it works very well... If anyone wants this, let me know, and I'll make a release.
MaineI30
01-27-2002, 02:14 AM
Originally posted by Sparkz
If anyone would like it, I could release a hack that gives administrators and mods the ability to give users points, but in stead of displaying the points in the user profile, the amount of points would actually decide the usertitle of the user...
I have this implemented on my own site and it works very well... If anyone wants this, let me know, and I'll make a release.
i'd certainly be interested!
Sparkz
01-27-2002, 02:39 PM
Originally posted by MaineI30
i'd certainly be interested!
Give me a day or two - have a few things I need to sort before I start digging for this code.
Sparkz
01-31-2002, 12:48 PM
Sorry for not having released this yet. I have been incredibly busy at work the past week. Will try to get this out during the weekend (which might be difficult, since I have to build my new computer and do some serious gaming ;) )
monitox
01-31-2002, 04:52 PM
Just install it.. Works GREAT ! Thanks ! ;)
mas404
02-17-2002, 08:08 AM
Great hack,
I use it for long time but...
I was thinking if it possible to insert links inside of the box.
So that I can remove the user best threads from his signature and insert it on his fields.
Palmer ofShinra
02-17-2002, 08:56 AM
If you did it the way I did (rather than Reeve's alternate that has the default value set) then you should be able to...
Just use raw HTML
<a href=http://www.mydomain.com/board/showthread.php?threadid=12345>Check out my cool thread!</a>
Something like that. Just make sure it falls under the 250 character limit.
Reeve of shinra
02-17-2002, 02:40 PM
Yeah, that edit I posted was only if you wanted a default number set. Otherwise its not needed.
Vivi Ornitier
02-17-2002, 06:56 PM
for anyone wanting a shop: https://vborg.vbsupport.ru/showthread.php?s=&threadid=35156
here's my own version of it.
mas404
02-18-2002, 12:32 PM
thank you Palmer ofShinra
it's work
cool
mewgood
03-03-2002, 10:05 PM
why when I click on the points.php under postbit, it popup up a new window but nothing there.
only white background..
?
help please
Radon3k
03-03-2002, 10:21 PM
mewgood...I had the same problem, make sure that the address in the link is pointed to the right source. If it isn't, you'll get that error, same thing happened to me :)
mewgood
03-06-2002, 12:26 AM
nice
Saiyan XL
03-06-2002, 12:52 AM
I have a great mod for this hack, go check it out here!! it will count your points automatically according to your posts, you get 2 points per post..
https://vborg.vbsupport.ru/showthread.php?s=&threadid=35754
mewgood
03-06-2002, 04:14 AM
Originally posted by Palmer ofShinra
In points.php
Replace
$perms=getpermissions();
if (!$perms[ismoderator] and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid]")) {
echo "<p>You do not have permission to do this!</p>";
exit;
}
With
if (!$bbuserinfo[usergroupid]==6) {
echo "<p>You do not have permission to do this!</p>";
exit;
}
In moderator.php
Replace
if ($action=="points") {
$userid = verifyid("user",$userid);
$permissions=getpermissions();
if ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canviewprofile=1"))
With
if ($action=="points") {
$userid = verifyid("user",$userid);
if (!$bbuserinfo[usergroupid]==6)
??After I did this change, even admin cant add points now....
help please
Reeve of shinra
03-06-2002, 12:29 PM
I think you need to change the group id to corrolate with group your trying to use here ....
ExcErr
03-06-2002, 07:05 PM
makenavoption("Points","../mod/points.php?s=<?php echo $session[sessionhash]; ?>&action=masspoints");
THIS LINK DOESN'T WORK
can you help me ?
Reeve of shinra
03-06-2002, 07:30 PM
If this is the link thats added to the admin panel then you have to change makenavoption to whatever is being used for the rest of the links....
Makenavoption started in 2.2.0 I think ,...
mewgood
03-06-2002, 09:52 PM
It is 6.
what do I do now?
ExcErr
03-07-2002, 06:22 PM
Makenavoption started in 2.2.0 I think ,...
hm, but i have 2/2/2 !
Psychdrone
03-08-2002, 12:18 AM
Shoot man, I was trying to make it so when mods/admins click Gill
There are two fields
one where they could add points ( already included)
and one where they could subtract points
Eh Palmer goo O" buddy!;)
Reeve of shinra
03-08-2002, 02:10 AM
Psyc - just use a negative # to subtract points (ie: -510)
Exc - look at the other admin panel options and use that format per se.
ExcErr
03-08-2002, 09:58 AM
ok, ok, i'will try it!
ExcErr
03-08-2002, 10:03 AM
hm.......doesn't work, like
makenavoption("Email Users","email.php?action=start","<br>");
makenavoption("Build Mailing List","email.php?action=genlist", "<br>");
makenavoption("Points","../mod/points.php?s=<?php echo $session[sessionhash]; ?>&action=masspoints");
and doesn't work, like
makenavoption("Email Users","email.php?action=start","<br>");
makenavoption("Build Mailing List","email.php?action=genlist", "<br>");
makenavoption("Points","../mod/points.php?action=masspoints");
it show's me page, but there aren't some input fields!
Reeve of shinra
03-08-2002, 01:20 PM
No promises, but I will try to take a look at it over the weekend to see what needs to be changed for vb223 (if anything).
ExcErr
03-08-2002, 03:48 PM
ok, thx, i'll wait....
may be i have error in my points.php????
Reeve of shinra
03-09-2002, 05:24 AM
Exc -- if you want to do MASS POINTS, then you need to UNCOMMENT lines 27 & 77
As for the link you are adding to the admin panel it should look like this for VB 222 & 223b
makenavselect("Points Hack","<hr>");
// *************************************************
makenavoption("Mass Points,"../mod/points.php?s=<?php echo $session[sessionhash]; ?>&action=masspoints","<br>");
Reeve of shinra
03-09-2002, 05:30 AM
Installing for the first time to VB 223?
Use the install provided in the zip for 203. Your only change will be to the link in the admin panel. You will use this instead:
makenavselect("Points Hack","<hr>");
// *************************************************
makenavoption("Mass Points,"../mod/points.php?s=<?php echo $session[sessionhash]; ?>&action=masspoints","<br>");
Upgraded your board to 223?
From 222: Make your template changes & add the code to Moderator.php
From 203: Do the same thing, only change the code mentioned above for the admin link.
Simple as that.
Psychdrone
03-09-2002, 03:09 PM
Originally posted by Reeve of shinra
Psyc - just use a negative # to subtract points (ie: -510)
Exc - look at the other admin panel options and use that format per se.
Thanks, Works like a charm!
I just made two forums thu, to make it easier on the mods and admins!
*cheers
freehtml
03-09-2002, 04:44 PM
Great hack ! Installed as "gold" for my Romance of three kingdoms forum
Dez_U
03-09-2002, 10:19 PM
hi all,
I have read through all this page and think I may have missed a bit somewhere :(
I get this error where I try to add points
There seems to have been a slight problem with the The ClanRam Forums database.
Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
and below
Database error in vBulletin Mod Control Panel 2.2.3:
Invalid SQL: SELECT field6 FROM userfield WHERE userid=Array[userid]
mysql error: You have an error in your SQL syntax near '[userid]' at line 1
mysql error number: 1064
Date: Sunday 10th of March 2002 12:18:07 AM
Script: http://www.clanram.com/forum/forum/mod/points.php
Referer: http://www.clanram.com/forum/mod/points.php?s=Array%5Bsessionhash%5D&action=points&userid=Array%5Buserid%5D
any help please :)
freehtml
03-10-2002, 04:43 AM
can we specify only certain mod can give the points?
And how to make it give out certain point at certain time,let said evrty beginning of the month, the system will generate 10 points for certain group of members
eiSecure
03-10-2002, 04:05 PM
I was wondering if for the postbit, only moderators and aministrators can view the link under Gil, instead of all members being able to see the link.
Also, do you have any good "shopping systems" you could recommend that uses this hack and awards users custom titles and stuff?
Thanks,
Alex
freehtml
03-11-2002, 01:22 AM
Originally posted by eiSecure
I was wondering if for the postbit, only moderators and aministrators can view the link under Gil, instead of all members being able to see the link.
Also, do you have any good "shopping systems" you could recommend that uses this hack and awards users custom titles and stuff?
Thanks,
Alex
I am also looking for something simliar.
Radon3k
03-11-2002, 02:05 AM
Works great on 2.2.4! :)
2 things...
Can u make it so only Admins can give points... cuz my mods are ****ing it up.....
also... this should be easy.. but what script do i use for putting Top Points person with they're points.. like top poster... thx pz
Reeve of shinra
03-11-2002, 02:21 AM
Dez - U, not sure where the problem your having is comming from. Try going through the install steps again to make sure you have everything right. Especially important is the urls.
Freehtml - There is a way to specify whether individual mods can give out points and such. When you add a mod to a forum, it asks whether they can delete posts, ect... check there and add an option to have them give points out or not.
eisecure, I think Palmer mentioned how to make this admin viewable somewhere earlier, ... if not then maybe i will post something on that later.
As for a 'store' system. the one we use has not and likely will not be publically released... try the itemshops that have been floating around.
Radon3k - Thanks! :)
edove - yes, upload it to your admin directory only, not your mod. Make sure the links point correctly and your set. (Or in latin, dont do that very last step in the instructions.)
Reeve of shinra
03-11-2002, 02:26 AM
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=35423" target="_blank"> Search for users by Custom Profile Field - by Firefly</a>
Try that...
Ok... But what about the Thing too add the person with the top points... like
"The Person With the Most Points is {Profile = {userid={code}{code?} with {point number code}
freehtml
03-11-2002, 05:00 AM
Originally posted by Reeve of shinra
Freehtml - There is a way to specify whether individual mods can give out points and such. When you add a mod to a forum, it asks whether they can delete posts, ect... check there and add an option to have them give points out or not.
Thanks for reply... How do I actually go about doing it?? I am not good at PHP or MySQL
uppin for answerr to questionm on page 11
Reeve of shinra
03-12-2002, 12:35 PM
pls dont bump this topic up ... I get emailed on it and I have enough emails already. I read your requests and the moment I do not have the time to work on it. Anyone else who can assist, will likely reply.
On that note: I might actually code it to display the user with the most points on the front page... its something I think I would like for our own forum. However, I just dont have the time. When I do and when its complete - it will be published here.
j_lorence
03-16-2002, 04:51 AM
Great hack, but is there anyone that can make it to where points go up automatically instead of doing it manually? Say for instance you get 2 points for each reply you make and 3 points for each thread you start.
freehtml
03-16-2002, 12:05 PM
yah..there is so much to be added on to the features
Reeve of shinra
03-16-2002, 08:03 PM
That defeats the purpose of the hack, we want to reward users for good stuff - not have another post count. If you want auto-points, try the karma hack.
dgessler
03-16-2002, 09:52 PM
Originally posted by e_dove
Ok... But what about the Thing too add the person with the top points... like
"The Person With the Most Points is {Profile = {userid={code}{code?} with {point number code}
I like that idea, that would be awesome..
Dan
mas404
03-19-2002, 04:58 AM
even i change the groub the modr. can give points .
and also i try only one user , as you tell but it does not work?
can i give only one user even if he is not modr.?
ExcErr
03-20-2002, 08:19 PM
can you make some feature:
Top millioner(who has best points count)
^^I requested that alreeady... lol.....
ExcErr
03-21-2002, 04:43 PM
but we haven't result:)
Velocd
03-24-2002, 03:01 AM
I haven't read through all these threads yet, so don't get upset if I ask something that has already been asked. But, I was wondering if there was a way to add points automatically to a members point count every time they post. As opposed to doing it individually to each user, which can take alot of time if you have many active users on your forum :/. For example, lets say everytime someone posts they get 3 points.
Although even this is sorta basic, and to go even further would there be a way to make it work in conjuction with the HP/MP/EXP hack, so that the amount of points you get per posts depends on your level?
For example, but not necessarily in this fashion:
lvl 1 = 1point per post
lvl 2 = 2.5points per post
lvl 3 = 4points per post
and so on.....at each level incrementing at gradually increasing rates
If you can help, I (and I'm sure others) would be very gratiful.
Originally posted by Velocd
I haven't read through all these threads yet, so don't get upset if I ask something that has already been asked. But, I was wondering if there was a way to add points automatically to a members point count every time they post. As opposed to doing it individually to each user, which can take alot of time if you have many active users on your forum :/. For example, lets say everytime someone posts they get 3 points.
Although even this is sorta basic, and to go even further would there be a way to make it work in conjuction with the HP/MP/EXP hack, so that the amount of points you get per posts depends on your level?
For example, but not necessarily in this fashion:
lvl 1 = 1point per post
lvl 2 = 2.5points per post
lvl 3 = 4points per post
and so on.....at each level incrementing at gradually increasing rates
If you can help, I (and I'm sure others) would be very gratiful.
This would be GREAT. Hopefully someone can help... :squareeyed:
Erwin
03-25-2002, 08:49 AM
Installed fine on 2.2.4 - thanks. I swapped over from the karma hack because the karma hack had a HUGE overhead in terms of DB queries.
yes there is a way.. i dont see any point but there is.... i can give u what u need too make it so u get points for posting... but im making a different hack that uses conjunction between the points and the level hack.... and i cant use levels very well for some reason... anyways.. peace!
mas404
03-25-2002, 09:58 AM
Hi
How can i but the points $post[field6] on the welcome text
so the user can see his point on the formhome page.
Yeah I figured it out last night.... All you have to do is add a mySQL update on newthread.php and newreply.php that adds x amount to your custom user field when posting or replying.
The Sorcerer
03-25-2002, 08:49 PM
Where do i find this STEP 6: Edit TEMPLATE postbit
ADD Underneath "Posts: $post[posts]<br>"
Like u know there is a file named moderator.php, which file is it in(i.e. templates.php, modertaor.php, etc) which one?
Erwin
03-25-2002, 10:18 PM
Originally posted by The Sorcerer
Where do i find this STEP 6: Edit TEMPLATE postbit
ADD Underneath "Posts: $post[posts]<br>"
Like u know there is a file named moderator.php, which file is it in(i.e. templates.php, modertaor.php, etc) which one?
:)
It's not a file, it's a TEMPLATE - the title of that step says "Edit TEMPLATE".
You can find the postbit template by going to your Admin CP, clicking on Modify Templates, and Show All. You should see the postbit template then.
WanderBug
04-04-2002, 03:18 AM
Installed the hack on 2.2.4. It worked fine.
However, when trying to add a new style, vB gave me the following error message:
Database error in vBulletin Control Panel 2.2.4:
Invalid SQL: INSERT INTO replacementset VALUES (NULL,'New Style')
mysql error: Column count doesn't match value count at row 1
mysql error number: 1136
Does the hack alters the replacementset table?
Reeve of shinra
04-04-2002, 03:39 AM
Nope ....
The hack utilizes a customer profile field which is fully supportable in vb, a php which pulls the data from that field and does some math before reinserting it, and a few quick template edits....
Reeve of shinra
04-04-2002, 03:40 AM
Actually, you might be having trouble with the points on reply mod that was released, in which case you will need to talk to the poster of it.
WanderBug
04-04-2002, 03:55 AM
Thak you :cool:
Erwin
04-04-2002, 09:18 AM
Works fine in 2.2.5... :D
heretic
04-04-2002, 03:57 PM
I'm curious, can this hack be modified to show commas? the users on my site earn up in the hundred thousands, and was wondering how it can be more readable, so instead of 1234567 it'd be 1,234,567
Vivi Ornitier
04-04-2002, 04:12 PM
Hmm, maybe. I think you just need to change the type of mySQL info it holds. Like change it to an integer or something...
GuruXL
04-10-2002, 07:42 PM
Originally posted by mas404
Hi
How can i but the points $post[field6] on the welcome text
so the user can see his point on the formhome page.
yep i need to do the same thing, but i can't get it to work
Vivi Ornitier
04-10-2002, 08:04 PM
I went into phpMyAdmin and changed the userfield used for the points to an int instead of char.
Edit: Guru and mas - just changed it to $bbuserinfo[field6] and that should fix it.
GuruXL
04-11-2002, 01:48 AM
Originally posted by Vivi Ornitier
I went into phpMyAdmin and changed the userfield used for the points to an int instead of char.
that didn't work for me :(
Vivi Ornitier
04-11-2002, 07:19 PM
Well, I'm not sure. I played around for a while but couldn't get it working.
Anyway, here is an addition to the automatic points for posting:
$newpts=$bbuserinfo[posts]/10 ;
$newpts= round($newpts) ;
$newpts=$newpts+X ;
$DB_site->query("UPDATE userfield SET
fieldX=fieldX+$newpts WHERE userid='$bbuserinfo[userid]'");
This will make it so the user will get 1 point if he/she has 10 posts, 10 for 100, etc. If you already have the auto-point added, just replace it with this and change the proper X's.
If not, find this in newreply.php and newthread.php:
$DB_site->query("UPDATE user SET
".iif ($foruminfo[countposts],"posts=posts+1,","")."
$dotitle"."lastpost='".time()."' WHERE userid='$bbuserinfo[userid]'");
}
And place my code underneath that.
Palmer ofShinra
04-17-2002, 09:02 PM
Originally posted by heretic
I'm curious, can this hack be modified to show commas? the users on my site earn up in the hundred thousands, and was wondering how it can be more readable, so instead of 1234567 it'd be 1,234,567
echo number_format($points);
heretic
04-17-2002, 10:44 PM
where? in points.php?
Palmer ofShinra
04-18-2002, 12:53 AM
Use it in whatever file is appropriate...
If it's for displaying next to posts... just add $points=number_format($points) into the getpostbit part of functions.php
For display on the forum main page, edit index.php
And so forth.
heretic
04-18-2002, 01:09 AM
since I want it to show in the postbit, I put it in functions.php in the buildpostbit function, the echo statement you have doesn't do anything, and hte example from the post above gives me a parse error...should I put it in global.php instead?
heretic
04-18-2002, 01:11 AM
meh, I forgot the ;
heretic
04-18-2002, 01:20 AM
nope, no matter where I put that, it doesn't work
Palmer ofShinra
04-23-2002, 08:33 AM
Is it in the right part of functions?
Just go $any_variable_here=number_format)$whatever_points_ is);
Like... $points=number_format($bbuserinfo(field5]);
And then make sure it's $points in your postbit template.
Or whatever :)
Dark Odin
04-25-2002, 10:48 PM
Does anyone know how to make users start with 75 points when they register? If it requires mySQL dbase editing can you just tell me the query to run, because I don't have phpMyadmin so a tutorial doesn't really help. Thanks.
Erwin
04-26-2002, 12:33 AM
Just make the default userfield 75 in the userfield variable that you are using for points.
Dark Odin
04-26-2002, 08:35 PM
And I do that how..?
Webmasta XT
04-30-2002, 10:30 AM
This Hack does not work with vbulletin 2.2.5, plz help me, whenever I click The Points thing in a post it opens a blank page for me...
Orlandu
04-30-2002, 12:30 PM
Where did you put the files to add points? In the admin folder or the mod folder? You may also want to check your links because I have 2.2.5 and it works just fine for me.
Webmasta XT
04-30-2002, 06:24 PM
umm.... I put it in the Mod folder.. and it displays a blank page..
here is the link..
http://www.xtreme-forumz.net/mod/points.php
Reeve of shinra
05-13-2002, 01:07 AM
It does work,... please re-read the install to ensure it was done properly, and read through the thread for answers to similiar questions which you will find the answer to. Thank You.
Erwin
05-13-2002, 01:16 AM
This hack definitely works for 2.2.5.
dotagious
05-15-2002, 12:38 AM
Anyone know what code to add in order to make it so points are auto-deducted from a moderator, super moderator, or administrator when they give points to someone else. For example, if a moderator has 100 points, and gives 50 to a member, the 50 points are deducted from the mods total.
dotagious
05-15-2002, 09:55 PM
Please help code wizards :(
Erwin
05-16-2002, 06:05 AM
Originally posted by Avenger
Anyone know what code to add in order to make it so points are auto-deducted from a moderator, super moderator, or administrator when they give points to someone else. For example, if a moderator has 100 points, and gives 50 to a member, the 50 points are deducted from the mods total.
Install this hack and get your staff to use it:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=35312
This will transfer points from one member to another.
dotagious
05-20-2002, 01:09 AM
Thank you VERY much!
extreme_old
06-16-2002, 03:35 PM
If I want different usergroups to been able to give points, how do I then do this??
I mean if I want Admins, mods and then some custom usergroups that I have on my board, how do I then do this??
Erwin
06-17-2002, 02:20 AM
Read this thread - it tells you how to let other usergroups give points.
extreme_old
06-17-2002, 05:14 AM
I have already been reading this thread, but I have only so far seen how to make one usergroup being able to give points, so my question is how to make more than one group doing this. Do I just use a , for seperating the usergroup numbers??
Bro_Joey_Gowdy
06-28-2002, 05:01 PM
Is there an installation file for vb2.2.6 ??
proxyMX
07-06-2002, 03:34 PM
At first it seemed like a miracle, but heres what i done step by step to get the images to show.
Step 1:
Start up the install script again and first REMOVE the templates and tables using the script.
Step 2:
Go through the script again and let it set up the tables etc
Step 3:
Skip the file alterations
Step 4:
Go to your itemshop and direct it to the proper user field
(I installed the SHinra Hack because it provides better moderation functions. But even if youve got this installed you must do the same)
[To find out what field is what simply go to the Modify area of the user profile fields and then hover your mouse over edit. The last number of the line is the field number.]
Step 5:
Simply go into your item shop and then buy some stuff, and watch it appear in the post bit.
[Note, Custom items should appear too!]
mods can you please move this post to the Itemshop 5 area pwease
sowwy
FFMania
07-24-2002, 11:46 AM
I follow everystep in the instruction properly and stuff.....and when I try to browse points.php (Under the /mod dir), all I get was this empty screen (see attachment). Btw, I am using vB 2.2.6.....does the points hack work properly with it? ^_~;;
Erwin
07-24-2002, 07:42 PM
Originally posted by FFMania
I follow everystep in the instruction properly and stuff.....and when I try to browse points.php (Under the /mod dir), all I get was this empty screen (see attachment). Btw, I am using vB 2.2.6.....does the points hack work properly with it? ^_~;;
Yes, it works beautifully with 2.2.6
Are you sure you installed the templates in the all your styles?
FFMania
07-24-2002, 09:47 PM
Templates? There is no template file..or any installer in the zip file. All I have is the instruction and points.php and in instruction, they only told me to modify postbit...which I did...
Erwin
07-25-2002, 01:39 AM
Oops, you're right - I ot confused with the donate addon - I don't know why you can't see it then - it works fine for 2.2.6 - how are you linking to points.php? You need to include the ?action= bits after it, not just link to the file.
FFMania
07-25-2002, 08:21 AM
I did it......but it is still like this...:(
Reeve of shinra
07-29-2002, 02:05 PM
Most people seem to add points.php to the wrong folder, or reference the wrong folder.... double check again - especially with the info you are placing in the postbit - and let us know if your still having trouble.
FFMania
07-29-2002, 09:42 PM
I placed points.php into /mod/ folder....and postbit...I follow the instruction by putting the Gils Field number...
Units
08-12-2002, 11:00 PM
DAMNIT!!!!!!!!!! I keep getting ++++ing errors!
Danny
08-14-2002, 06:33 AM
I cant get this to work, i Have done what you said but i cant add points i just keep getting a database error, i dont know what it is tho cause for some reason it does not get emailed to me. :(
DudeSicko
08-14-2002, 07:54 AM
I followed the instruction he maid, and i hav eno problem, i use v2.2.6.
And its running smooth, so i know if you follow the instruction, it should work, oh and im NOT good with programming, so its not therefor :D
stuuu
08-14-2002, 03:29 PM
Does this hack add points to the user total when they reply or post a new message?
Valerie
12-19-2002, 02:46 PM
Is there anyway someone could modify this hack for so it shows the amount of points each usergroup has? :ermm:
And make a new page that shows all usergroups, which one has more points and such :paranoid:
partang2
12-26-2002, 09:19 AM
Does this work with 2.2.9?
Reeve of shinra
12-30-2002, 12:35 PM
Valerie, you can make a small but seperate script to query the points for a usergroup and have it display the results. Should be simple, though unfortunately I do not have time to do it.
Partanq2 - so far this works with VB 2.0.3 through the most recent. We'll see what happens for vb3.
hypedave
12-30-2002, 05:44 PM
Originally posted by partang2
Does this work with 2.2.9?
yes it sure does, im using it on my rp forum
Valerie
12-30-2002, 11:53 PM
Originally posted by Reeve of shinra
Valerie, you can make a small but seperate script to query the points for a usergroup and have it display the results. Should be simple, though unfortunately I do not have time to do it.
Thanks RoS
Could anyone please help me with that? :( :paranoid:
AZone
01-01-2003, 12:49 AM
How to make changes of this hack: not moderators, but all users can get points each others, but only one during a day and only if he has point >0...?
Points: [-] 22 [+] ...?
Trabia
01-04-2003, 07:21 PM
Valerie, attached is maybe what you want.
Excuse me its probably not the best way to do it but since this is my first hack :: shrug ::
Its currently set up to display only groups that have been added by yourselves (where the groupid > 7) and is accessible only from the admincp.
Anyway, hope it works.... tested it on 2.2.9 and seems to be okay
I know the HousePoints.php file should be in the admin directory but I started it in the mod one and then could not be bothered to change it :o
ChurchMedia
01-04-2003, 09:23 PM
Hey, GREAT script! Very easy to install and use.
For the Mas Points feature, is there a way to give ALL users a number of points. I tried a wildcard, but it doesn't work. Possible?
lifesourcerec
02-02-2003, 10:08 PM
This is something additional, but I was wondering is there a way to add something like Top 10 Point Users or something.. It's probably something like top thread starters or something like that. Sounds simple, but I'm no programmer.
lifesourcerec
02-28-2003, 01:16 AM
Traded adding a Top 10 hack (provided by Erwin), but it only recognizes the first number and looks at the second, etc. number(s) as decimals. Dunno why.
yzztik
03-25-2003, 08:58 PM
Did anyone get it to not show the points field for mods and admins in the postbit? If so, could someone post or PM me the step by steps on that? My mods have no need for points and I made the change to INT to give everyone default points so I can't do the n/a :(
gwhooooey
05-03-2003, 05:43 PM
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=52437" target="_blank">https://vborg.vbsupport.ru/showt...threadid=52437</a>
...would anyone be able to do something like that?
csidlernet
05-12-2003, 09:11 PM
Sickass hack.
yzztik
06-24-2003, 12:46 PM
Anyone have any idea if there is a way to use the point system hack but keep the points they have so far from the store hack? Basically I am tired of the store hack and how long it takes to upgrade my board beacause of it and lately I have been having weird problems so I was thinking of replacing it with this, specially since its not based on posts, but I don't want members to lose their current points, is there a way to set it up so that it uses those points as a starting point or to transfer them to this one somehow?
proxyMX
07-06-2003, 09:29 PM
does this work with 2.3.0?
proxyMX
07-07-2003, 08:43 PM
UPDATE: this hack works with VBULLETIN 2.3.0
id like to see some sort of update in which you can give EVERYONE points by the click of a button, please post this, it shouldnt be too hard to implement
Salazar
07-21-2003, 11:54 PM
First things first: This is a GREAT Hack, Palmer!
I have installed it on my test board and it works great. Though I have some questions:
- Is there a way to increase - let's say 2 - points automatically when starting a new thread?
- I also wonder, if increasing and deacreasing could be done more easily by clicking a small + or - button. That should add +1 or -1 to the total amount
Example: Username
[AVATAR]
Location: anywhere
Registered: anytime
Points: (http://) 22 (+ (http://)/- (http://))
Reeve of shinra
07-22-2003, 01:09 PM
Salazar, check through this thread - or through the hack forum itself - for an add on that lets you give users points for starting new threads.
Salazar
07-23-2003, 08:20 PM
Thank you Reeve, I found the addon. :)
Sacrifice
07-28-2003, 11:57 PM
STEP 6: Edit TEMPLATE postbit
ADD Underneath "Posts: $post[posts]<br>"
=====================
<a href="moderator.php?s=$session[sessionhash]&action=points&userid=$userinfo[userid]" target=_blank>Points:</a> $post[field5]<br>
=====================
I'm new to Vb, and I'm stuck on this part. Edit Template postbit I can't seem to find it in the templates section. Can someone please tell me where to modify this?
Salazar
07-29-2003, 07:54 AM
Today at 02:57 AM Sacrifice said this in Post #249 (https://vborg.vbsupport.ru/showthread.php?postid=421433#post421433)
I'm new to Vb, and I'm stuck on this part. Edit Template postbit I can't seem to find it in the templates section. Can someone please tell me where to modify this?
If you don't know where or even what a template is, you really should not try to install a hack. You wouldn't do any good, believe me. Please consider to read the vbulletin manual...
Nevertheless, here is what you ought to do:
Go to your Admin Control Panel -> Templates -> click "Modify" -> click [Expand List] -> Look for the "Postbit Templates" -> and next to "postbit" klick [change original]
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.