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)

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

Quote:

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

Quote:

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

if ($bbuserinfo[usergroupid]==6

type statements to
PHP Code:

if ($bbuserinfo[userid]==2722

.

Add ORs for whoever else you want to allow.

You should change moderator.php as well
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]")) {
    
header("Location: mod/points.php?s=$session[sessionhash]&action=points&userid=$userid");
  } else {
    
show_nopermission();
  }
  exit;


should be replaced by
PHP Code:

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??


All times are GMT. The time now is 09:04 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
  • Page Generation 0.01335 seconds
  • Memory Usage 1,754KB
  • 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
  • (4)bbcode_php_printable
  • (2)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