vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   User Points System (https://vborg.vbsupport.ru/showthread.php?t=32060)

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

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


Lesane 11-21-2001 03:56 PM

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".

Lesane 11-21-2001 03:58 PM

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.

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 }


All times are GMT. The time now is 09:29 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.01349 seconds
  • Memory Usage 1,767KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete