Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 08-24-2000 Last Update: Never Installs: 0
 
No support by the author.

Here is an update to my stars hack - this one allows you different colored stars for admins/moderators

edit showthread.php

find:
Code:
$userinfo=$DB_site->query_first("SELECT userid,email,username,usertitle,signature,showemail,homepage,icq,aim,yahoo,joindate,posts FROM user WHERE userid=$userid");
If you have installed the avatar hack, this line will be modified. Just look for ' $userid=$post[userid]; ' and the line listed above will be 3-4 lines below that.

Edit that line listed above and add

Code:
usergroupid,
after the "SELECT" in that line. Make sure there is a space between the word you added and "SELECT". Make sure there is a comma after the word you added and before the next. It looks like this:

Code:
$userinfo=$DB_site->query_first("SELECT usergroupid,userid, (...) etc etr
find:

Code:
$userpostcount=$userinfo[posts];
Add this after it:

Code:
    // --- Stars Hack by rangersfan

     $stars = "";
     $s_usergroup = $userinfo[usergroupid];
     $moderator=$DB_site->query_first("SELECT usergroupid FROM forumpermission WHERE usergroupid = $s_usergroup AND canadminedit=1");
     if ($moderator[usergroupid] == $s_usergroup)  // This is a Normal Mod!
     {
        $starsgif = "<img src=\"images/star2.gif\" border=\"0\" width=\"15\" height=\"15\">";
     }
     else if ($s_usergroup==6) // This is an Admin!
     {
        $starsgif = "<img src=\"images/star2.gif\" border=\"0\" width=\"15\" height=\"15\">";
     }
     else if ($s_usergroup==5) // This is a SuperMod!
     {
        $starsgif = "<img src=\"images/star2.gif\" border=\"0\" width=\"15\" height=\"15\">";
     }
     else
     {
        $starsgif = "<img src=\"images/star.gif\" border=\"0\" width=\"15\" height=\"15\">";
     }
     if ($userpostcount > 1999)
     {      $stars .= $starsgif . $starsgif . $starsgif . $starsgif . $starsgif;   }
     elseif ($userpostcount > 999)
     {      $stars .= $starsgif . $starsgif . $starsgif . $starsgif;   }
     elseif ($userpostcount > 399)
     {      $stars .= $starsgif . $starsgif . $starsgif;   }
     elseif ($userpostcount > 99)
     {      $stars .= $starsgif . $starsgif;   }
     elseif ($userpostcount > 19) 
     {      $stars .= $starsgif;   }
     if ($stars == "")
     {   
        $stars .= "<br>";
     }   
     else
     {      
        $stars .= "<br><br>";
     }  
   // - Stars Hack

You need to supply your own stars names "star.gif" and "star2.gif". "star2.gif" is for admins/moderators. Put them in forums/images.

To modify how many stars correspond to how many posts you will need to change the if ($userpostcount > ..) parts. If you don't want stars, but galagas or such, change the parts that say '$stars .= $starsgif . $starsgif . $starsgif . $starsgif . $starsgif;' to something like '$stars .= (path to my image for x number of posts);'

Edit the postbit template and put $stars where you want them to appear.

[Edited by freddie on 11-04-2000 at 04:56 PM]

Show Your Support

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

Comments
  #22  
Old 02-15-2001, 01:26 AM
Guest
 
Posts: n/a
Default

Tragical Error!

There appears to be something wrong with the Database please e-mail the Technical Staff!

Something along these lines!

Couldn't you release a New Hack that has everything needed in it! And for 1.1.4 because I can't upgrade for some reasons my templates hae been changed and it won't do it!
Reply With Quote
  #23  
Old 02-15-2001, 01:58 AM
Guest
 
Posts: n/a
Default

Sorry buy a license and upgrade.
Reply With Quote
  #24  
Old 02-15-2001, 10:09 AM
Guest
 
Posts: n/a
Default

I have a license and I CAN'T upgrade!

I tried and I got a MAJOR error! IT screwed everything up so I had to go back to 1.1.4!

A simple No, Sorry would hae sufficed!

Maybe if I was a PHP genius like you people it would be easier!
Reply With Quote
  #25  
Old 02-15-2001, 01:22 PM
Guest
 
Posts: n/a
Default

Templates will not stop you from being able to upgrade. Sorry not really a valid excuse.

The only problems being encountered are if you have an older version of MySQL, the code needs to be changed a little. If your PHP version is older than 3.0.9 the new script won't work either.

Or if you have a heavily hacked board you may have to back out some of the hacks.
Reply With Quote
  #26  
Old 02-16-2001, 04:38 AM
Guest
 
Posts: n/a
Default

Thats what I am saying! I have added several of the HACKs to the board. I thought that was EDITED Templates! SheesH!

Its not my fault that the only way to get a great vB is to hack it up and down like a TREE!
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 12:27 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.04015 seconds
  • Memory Usage 2,235KB
  • Queries Executed 20 (?)
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
  • (5)bbcode_code
  • (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
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)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
  • 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