Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-13-2003, 04:05 PM
Big J Big J is offline
 
Join Date: Nov 2002
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Want a graphic to show instead of point value.. HELP!!

I'm using the Lesane store hack, and I'm trying to figure out how to make different graphics appear in place of the point value that appears under the users avatars based on their number of points. Anyone know how to do this?

Example - If the user has 100 points, 1 star will appear. 200 points then 2 stars will appear, and so on.

Thanks!!!
Reply With Quote
  #2  
Old 09-13-2003, 05:46 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You'll need to edit the part of functions.php.

A start:

PHP Code:
if($bbuserinfo['storep'] < 100)
{
        
$userstars '<img src="{imagesfolder}/1stars.gif" border="0" alt="" />';

It would probably be easiest to do it with a switch statement but hey
Reply With Quote
  #3  
Old 09-13-2003, 07:26 PM
Big J Big J is offline
 
Join Date: Nov 2002
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks! I'll start working on it.
Reply With Quote
  #4  
Old 09-13-2003, 07:44 PM
Big J Big J is offline
 
Join Date: Nov 2002
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I have no idea where to go from here.
Reply With Quote
  #5  
Old 09-21-2003, 05:08 PM
Big J Big J is offline
 
Join Date: Nov 2002
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bump again!

Also, does anyone have an add-on for the store where you can add a comment as to why you Approved/disapproved the persons post that you rated?
Reply With Quote
  #6  
Old 09-27-2003, 07:37 AM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mist
You'll need to edit the part of functions.php.

A start:

PHP Code:
if($bbuserinfo['storep'] < 100)
{
        
$userstars '<img src="{imagesfolder}/1stars.gif" border="0" alt="" />';

It would probably be easiest to do it with a switch statement but hey
Mist, $bbuserinfo['storep'] will display the points of the user wich is viewing the post (you) and not the points of the author of the post.

Big J, open admin/functions.php and find:

PHP Code:
eval("\$post[buddy] = \"".gettemplate("postbit_buddy")."\";"); 
Add after it:

PHP Code:
if ($post[storep]<100) {
    
$post[storestar] = "<img src=\"images/stars/1.gif\" border=\"0\">";
    } elseif (
$post[storep]<200) {
    
$post[storestar] = "<img src=\"images/stars/2.gif\" border=\"0\"><img src=\"images/stars/2.gif\" border=\"0\">";
    } elseif (
$post[storep]<300) {
    
$post[storestar] = "<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[storep]<400) {
    
$post[storestar] = "<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[storep]<500) {
    
$post[storestar] = "<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[storep]<600) {
    
$post[storestar] = "<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[storep]<700) {
    
$post[storestar] = "<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\">";
    } 
Play with it. Put $post[storestar] in your postbit template to display the stars.
Reply With Quote
  #7  
Old 09-27-2003, 09:50 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops - that's what you get for not paying attention

Don't forget to single quote your key strings though Lesane
Reply With Quote
  #8  
Old 09-27-2003, 10:11 AM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The stars are messed up, lesane, you only need to use 2/3/4/5 star once - otherwise the use will end up with 16 stars.
and since by default there isnt 6/7 stars and they arent in a folder called strats,
try this:

PHP Code:
if ($post['storep']<100) { 
    
$post['storestar'] = "<img src=\"{imagesfolder}/1stars.gif\" border=\"0\">"
    } elseif (
$post['storep']<200) { 
    
$post['storestar'] = "<img src=\"{imagesfolder}/2stars.gif\" border=\"0\">"
    } elseif (
$post['storep']<300) { 
    
$post['storestar'] = "<img src=\"{imagesfolder}/3stars.gif\" border=\"0\">"
    } elseif (
$post['storep']<400) { 
    
$post['storestar'] = "<img src=\"{imagesfolder}/4stars.gif\" border=\"0\">"
    } elseif (
$post['storep']<500) { 
    
$post['storestar'] = "<img src=\"{imagesfolder}/5stars.gif\" border=\"0\">"
    } elseif (
$post['storep']<600) { 
    
$post['storestar'] = "<img src=\"{imagesfolder}//5stars.gif\" border=\"0\"><img src=\"{imagesfolder}/1stars.gif\" border=\"0\">"
    } elseif (
$post['storep']<700) { 
    
$post['storestar'] = "<img src=\"{imagesfolder}/5stars.gif\" border=\"0\"><img src=\"{imagesfolder}/2stars.gif\" border=\"0\">"
    } 
Reply With Quote
  #9  
Old 09-27-2003, 12:04 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, i have it so that all my 7 stars are 1 star. 7 different colors, so when i want the red star displayed 2 times i do the above. It's just an other way, but that's why i say "play with it".
Reply With Quote
  #10  
Old 09-27-2003, 04:17 PM
Big J Big J is offline
 
Join Date: Nov 2002
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I Love You Man!!!! Thank You!!!!!!!!!!!!!!!!
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 11:51 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.04440 seconds
  • Memory Usage 2,277KB
  • Queries Executed 13 (?)
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
  • (5)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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