Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

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
  #52  
Old 12-02-2001, 04:30 PM
Radon3k's Avatar
Radon3k Radon3k is offline
 
Join Date: Nov 2001
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #53  
Old 12-02-2001, 05:26 PM
Radon3k's Avatar
Radon3k Radon3k is offline
 
Join Date: Nov 2001
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #54  
Old 12-02-2001, 07:04 PM
Radon3k's Avatar
Radon3k Radon3k is offline
 
Join Date: Nov 2001
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #55  
Old 12-03-2001, 12:00 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

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.
Reply With Quote
  #56  
Old 12-03-2001, 02:06 AM
Shadowz Shadowz is offline
 
Join Date: Dec 2001
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #57  
Old 12-03-2001, 02:12 AM
Crinos's Avatar
Crinos Crinos is offline
 
Join Date: Oct 2001
Location: Los Angeles, CA
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #58  
Old 12-03-2001, 09:43 AM
Tryfwar Tryfwar is offline
 
Join Date: Nov 2001
Location: Nottingham, UK
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great now thanks Palmer
Reply With Quote
  #59  
Old 12-03-2001, 07:21 PM
Tryfwar Tryfwar is offline
 
Join Date: Nov 2001
Location: Nottingham, UK
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 =/
Reply With Quote
  #60  
Old 12-04-2001, 09:54 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

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

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


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 10:09 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08053 seconds
  • Memory Usage 2,325KB
  • 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
  • (4)bbcode_php
  • (2)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