Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 09-01-2003, 01:33 AM
MaDCaT75 MaDCaT75 is offline
 
Join Date: Jul 2003
Location: Southern California
Posts: 718
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How can I make it so that...

so that users who dont have an avatar get the "no avatar selected" avatar put into their user CP and then it shows up in postbit? Or if that isnt possible.... then just put the avatar into the postbit part?
Reply With Quote
  #2  
Old 09-01-2003, 02:13 AM
Sylvus Sylvus is offline
 
Join Date: Apr 2003
Location: Toronto
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ug. How did I do this.

Well, what I did for my forum was break it down on the number of posts required to receive an avatar. This crossed the entire forum and I kept it simple and did not have different avatars available based on different post count totals. Anyone on my forum can receive an avatar once they've reached 201 posts.

With that said, I simply force it in functions.php to display the guestavatar.gif image (or you can call it whatever you want if you use a different filename).

The code below does the following.

If a poster has less than 200 posts, default to the guestavatar.gif image.

If a poster has no avatar selected, even if they have over 200+ posts, default to the guestavatar.gif image.

This modification is based on VB v2.3.0.

Open up functions.php

### FIND:

Code:
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);
### BENEATH IT, ADD:

Code:
if($post[posts] <= 200) { $post[avatar] = "<img src={imagesfolder}/guestavatar.gif"; }
if($post[avatar] == "") { $post[avatar] = "<img src={imagesfolder}/guestavatar.gif"; }
That should do it. $post[avatar] is a variable used by VB to display a users avatar in the postbit.

guestavatar.gif is the filename of the avatar you want to display if someone has less than 200 posts OR has not selected an avatar.

If your own forum allows avatars at 50 posts or 100 posts, simply change the <=200 to the number of required posts needed on your own forum.

Rename guestavatar.gif to your own image.gif file if you are using a different filename.

This modification will only change the Postbit and not the Control Panel.

When a member is able to choose their own avatar, the above code will not stop it from being displayed.

Hope that's what you're looking for.

Syl...
Reply With Quote
  #3  
Old 09-01-2003, 02:17 AM
MaDCaT75 MaDCaT75 is offline
 
Join Date: Jul 2003
Location: Southern California
Posts: 718
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes I think that will do nicley. Thank you!
Reply With Quote
  #4  
Old 09-01-2003, 02:28 AM
MaDCaT75 MaDCaT75 is offline
 
Join Date: Jul 2003
Location: Southern California
Posts: 718
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

erm actually something weird is going on here:

the avatar is showing up as a red X because the URL to the avatar is:

http://www.sims2forums.com/images/Si...X/noavatar.gif<BR

WTF? How did a <BR get in there? I didnt put a <BR into the functions.php!
Reply With Quote
  #5  
Old 09-01-2003, 04:17 AM
SmEdD's Avatar
SmEdD SmEdD is offline
 
Join Date: Mar 2003
Location: Ontario, Canada
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try checking in the avatars in the admincp. Where it has default avatar or atleast I thought I seen that some time put it to that.
Reply With Quote
  #6  
Old 09-01-2003, 05:18 AM
MaDCaT75 MaDCaT75 is offline
 
Join Date: Jul 2003
Location: Southern California
Posts: 718
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did.... this makes no sense!
Reply With Quote
  #7  
Old 09-01-2003, 05:49 AM
SmEdD's Avatar
SmEdD SmEdD is offline
 
Join Date: Mar 2003
Location: Ontario, Canada
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if($post['avatar'] == "") { $post['avatar'] = "<img src=http://yourdomin.com/forum/inages/guestavatar.gif"; }

Plop that some where in a file where it calls the avatars. Showthread would be one area and the user cp another.
Reply With Quote
  #8  
Old 09-01-2003, 05:59 AM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can check my Avatar in UserCP and then finish the if statement with the code SmEdD posted

(Also, you can use {imagesfolder} )
Reply With Quote
  #9  
Old 09-01-2003, 08:35 AM
MaDCaT75 MaDCaT75 is offline
 
Join Date: Jul 2003
Location: Southern California
Posts: 718
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks guys
Reply With Quote
  #10  
Old 09-01-2003, 01:24 PM
SmEdD's Avatar
SmEdD SmEdD is offline
 
Join Date: Mar 2003
Location: Ontario, Canada
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 02:59 AM assassingod said this in Post #8
(Also, you can use {imagesfolder} )
Not in a file only template

Unless they changed that . . .
Reply With Quote
Reply

Thread Tools
Display Modes

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 01:44 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.04059 seconds
  • Memory Usage 2,251KB
  • 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
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete