Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by Palmer ofShinra Palmer ofShinra is offline
Developer Last Online: Feb 2004 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-02-2001 Last Update: Never Installs: 143
 
No support by the author.

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)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 11-19-2001, 04:34 PM
black black is offline
 
Join Date: Nov 2001
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if u only want admins to do it just simply dont do the part palmer added

NICE HACK!!!!! I NEEDED THIS
Reply With Quote
  #33  
Old 11-20-2001, 12:28 AM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #34  
Old 11-20-2001, 08:17 PM
Palmer ofShinra's Avatar
Palmer ofShinra Palmer ofShinra is offline
 
Join Date: Oct 2001
Location: Vancouver, BC, Canada
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
PHP Code:
$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
PHP Code:
if (!$bbuserinfo[usergroupid]==6) {
    echo 
"<p>You do not have permission to do this!</p>";
    exit;
  } 

In moderator.php

Replace
PHP Code:
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

PHP Code:
if ($action=="points") {

  
$userid verifyid("user",$userid);

if (!
$bbuserinfo[usergroupid]==6
Reply With Quote
  #35  
Old 11-21-2001, 03:56 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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".
Reply With Quote
  #36  
Old 11-21-2001, 03:58 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Palmer ofShinra


In points.php

Replace
PHP Code:
$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
PHP Code:
if (!$bbuserinfo[usergroupid]==6) {
    echo 
"<p>You do not have permission to do this!</p>";
    exit;
  } 

In moderator.php

Replace
PHP Code:
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

PHP Code:
if ($action=="points") {

  
$userid verifyid("user",$userid);

if (!
$bbuserinfo[usergroupid]==6
Thanks again.
Reply With Quote
  #37  
Old 11-23-2001, 01:54 PM
dotagious dotagious is offline
 
Join Date: Oct 2001
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Lesane
Is it also possible to give everyone, as default, 0?
Reply With Quote
  #38  
Old 11-28-2001, 07:42 AM
Crinos's Avatar
Crinos Crinos is offline
 
Join Date: Oct 2001
Location: Los Angeles, CA
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #39  
Old 11-28-2001, 09:21 AM
Palmer ofShinra's Avatar
Palmer ofShinra Palmer ofShinra is offline
 
Join Date: Oct 2001
Location: Vancouver, BC, Canada
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Exempt them how?

Not have the points show up? Not give them points?
Reply With Quote
  #40  
Old 11-28-2001, 09:43 AM
Crinos's Avatar
Crinos Crinos is offline
 
Join Date: Oct 2001
Location: Los Angeles, CA
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #41  
Old 11-28-2001, 11:29 AM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 }
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:33 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06919 seconds
  • Memory Usage 2,328KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete