Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-29-2003, 04:28 AM
Tigerdude Tigerdude is offline
 
Join Date: Aug 2002
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Star rating by post count?

I know there has to be several hacks for this but I can't find em.

I just want a simple hack that will use a 1-5 star graphic under the member's name to indicate their general post total. ie 1-25 posts= 1 star. 25-100 posts= 2 stars, etc.

I'm using version 2.3 and I would really prefer one that is simple and stable as opposed to a hack that is loaded with options and buggy.

Can anyone help?

Thanks.
Reply With Quote
  #2  
Old 04-29-2003, 08:09 AM
flup's Avatar
flup flup is offline
 
Join Date: Jan 2002
Location: Maastricht, NL
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

These have been released many times.

Just use an if-else-then statement
Reply With Quote
  #3  
Old 04-29-2003, 08:12 AM
flup's Avatar
flup flup is offline
 
Join Date: Jan 2002
Location: Maastricht, NL
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is made by lesane in another post [USE SEARCH FUNCTION ]

_________________________________________________
In functions.php find:

PHP Code:
eval("\$post[buddy] = \"".gettemplate("postbit_buddy")."\";"); 
After it add:
PHP Code:
if ($post[posts]<30) {
    
$post[stars] = "<img src=\"images/stars/1.gif\" border=\"0\">";
    } elseif (
$post[posts]<100) {
    
$post[stars] = "<img src=\"images/stars/2.gif\" border=\"0\"><img src=\"images/stars/2.gif\" border=\"0\">";
    } elseif (
$post[posts]<250) {
    
$post[stars] = "<img src=\"images/stars/3.gif\" border=\"0\"><img src=\"images/stars/3.gif\" border=\"0\"><img src=\"images/stars/3.gif\" border=\"0\">";
    } elseif (
$post[posts]<500) {
    
$post[stars] = "<img src=\"images/stars/4.gif\" border=\"0\"><img src=\"images/stars/4.gif\" border=\"0\"><img src=\"images/stars/4.gif\" border=\"0\"><img src=\"images/stars/4.gif\" border=\"0\">";
    } elseif (
$post[posts]<1000) {
    
$post[stars] = "<img src=\"images/stars/5.gif\" border=\"0\"><img src=\"images/stars/5.gif\" border=\"0\"><img src=\"images/stars/5.gif\" border=\"0\"><img src=\"images/stars/5.gif\" border=\"0\"><img src=\"images/stars/5.gif\" border=\"0\">";
    } elseif (
$post[posts]<2000) {
    
$post[stars] = "<img src=\"images/stars/6.gif\" border=\"0\"><img src=\"images/stars/6.gif\" border=\"0\"><img src=\"images/stars/6.gif\" border=\"0\"><img src=\"images/stars/6.gif\" border=\"0\"><img src=\"images/stars/6.gif\" border=\"0\"><img src=\"images/stars/6.gif\" border=\"0\">";
    } elseif (
$post[posts]>2000) {
    
$post[stars] = "<img src=\"images/stars/7.gif\" border=\"0\"><img src=\"images/stars/7.gif\" border=\"0\"><img src=\"images/stars/7.gif\" border=\"0\"><img src=\"images/stars/7.gif\" border=\"0\"><img src=\"images/stars/7.gif\" border=\"0\"><img src=\"images/stars/7.gif\" border=\"0\"><img src=\"images/stars/7.gif\" border=\"0\">";
    } 
You need to edit the path to the stars images though. And you could also edit the post amounts wich the user must have to display the stars.

Then you can put $post[stars] in your postbit to show the stars.

Goodluck
Reply With Quote
  #4  
Old 04-29-2003, 09:55 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Flup, can you give me the link to that by Lesane?
Reply With Quote
  #5  
Old 04-29-2003, 10:06 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No need to hack - just put this in the Member's Title section of Admin CP:

Normal Member<br><img src="http://yoursite.com/images/star1.gif">

HTML works.
Reply With Quote
  #6  
Old 04-29-2003, 10:31 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That'll work. Thank you, sir.
Reply With Quote
  #7  
Old 04-29-2003, 02:17 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 12:06 PM Erwin said this in Post #5
No need to hack - just put this in the Member's Title section of Admin CP:

Normal Member<br><img src="http://yoursite.com/images/star1.gif">

HTML works.

Actually that won't work if your users have custom titles (about 70% of my users do).

The way that flup posted (using if & else statements) will work even with custom titles. I posted a mini-hack to do this which includes a set of rank images a few months ago. Look in my profile for "simple rank images hack".

If you don't like those rank images you can find alot more here: http://www.forumimages.com/

Dewayne
Reply With Quote
  #8  
Old 04-29-2003, 07:48 PM
flup's Avatar
flup flup is offline
 
Join Date: Jan 2002
Location: Maastricht, NL
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hahah this is kinda lol.
When someone posted this question to, i answerd with Erwins answer, and lesane with mine, and also EvilS1 answered that it would work with custom titles.

And Boofo:
Search this forum @ Starhack
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 08:28 PM.


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.04092 seconds
  • Memory Usage 2,239KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete