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
Show "No Avatar" Image If No Avatar is Selected Details »»
Show "No Avatar" Image If No Avatar is Selected
Version: 1.00, by MW[MWGN] MW[MWGN] is offline
Developer Last Online: Jan 2003 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-19-2002 Last Update: Never Installs: 91
 
No support by the author.

]What is it?
If the user has selected to not use avatar, then in the threads where the avatar will normally appear, instead of being blank because there is no avatar chosen, it will display a "No Avatar" image instead.

Credits
I would like to thank trilOByte, the creator of the Welcome Panel hack, for the "No Avatar" image, because there's where I stole...err...taken it from

Future Plans
Add an option to turn it on/off in the Admin CP.

Screenshot of the hack....

And the installation is in the next post

Show Your Support

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

Comments
  #42  
Old 10-24-2002, 11:53 AM
Mathieu Mathieu is offline
 
Join Date: Mar 2002
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for this i'll install it now.
Reply With Quote
  #43  
Old 10-26-2002, 05:31 AM
Glenn379's Avatar
Glenn379 Glenn379 is offline
 
Join Date: Aug 2002
Location: San Francisco, California
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

simple but effective *installs*
Reply With Quote
  #44  
Old 11-08-2002, 07:37 PM
deFunx deFunx is offline
 
Join Date: Jun 2002
Location: New Zealand
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Err, well it works on my 2.2.8 version.
Reply With Quote
  #45  
Old 02-16-2003, 05:19 AM
andyrose andyrose is offline
 
Join Date: Feb 2003
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Worked perfectly at www.neomega.net/forum, I actually altered the image to encourage the user to change the avatar perhaps a bit more. Thanks a lot for putting the time into coding it.
Reply With Quote
  #46  
Old 03-22-2003, 09:47 PM
kevinnguyen kevinnguyen is offline
 
Join Date: Feb 2003
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

work great w/ 2.3.0
Reply With Quote
  #47  
Old 06-06-2003, 08:28 AM
PixelFx PixelFx is offline
 
Join Date: Dec 2002
Posts: 1,117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I remember this old hack :P just tested it, works great with vb2.30 :P
Reply With Quote
  #48  
Old 08-25-2003, 01:59 AM
Michael's Avatar
Michael Michael is offline
 
Join Date: Aug 2003
Location: New Jersey
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I have version 2.3.2 and after I did this it said:

Parse error: parse error in /home/mikelevy/public_html/forums/admin/functions.php on line 945

Fatal error: Call to undefined function: vbdate() in /home/mikelevy/public_html/forums/admin/sessions.php on line 400

-- And I followed all the directions as followed and I even edited the parts that were mentioned in this thread. And I found everything perfectly, so WHAT DO I DO???
Reply With Quote
  #49  
Old 10-06-2003, 10:13 AM
PixelFx PixelFx is offline
 
Join Date: Dec 2002
Posts: 1,117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was working on my site, I thought I'd post an updated version of this hack for vb2.3.2

Intro:
Think of this as a remix of MW[MWGN] no avatar script, only I had to change things to make it work with vb2.3.2 and I made new art.

Credits:
Vincent "MW" Chan - Show "No Avatar" Image If No Avatar is Selected
trilOByte - welcome panel final, please note I didn't use his code in this hack, but it can be used with the welcome panel hack.

WORKS WITH: vBulletin v2.3.2

As always before you install anything BACK UP YOUR DATABASE!, aka use this hack at your own risk. This is tested on my site and works well

Files to Edit: 1 forum/admin/functions.php

1) FIND:

Code:
$avatarurl="";

REPLACE WITH:

Code:
$avatarurl="{imagesfolder}/avatars/noavatar.gif";
NEXT FIND:

Code:
if ($avatarurl=="" or ($bbuserinfo[userid]>0 and !($bbuserinfo[showavatars]))) {
			$post[avatar]="";
		} else {
			eval("\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
		}
REPLACE IT WITH:

Code:
if ($avatarurl=="" or ($bbuserinfo[userid]>0 and !($bbuserinfo[showavatars]))) {
			$post[avatar]="{imagesfolder}/avatars/noavatar.gif";
		} else {
			eval("\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
		}
NEXT FIND:

Code:
return '';
Note: '' is ' ' not "

CHANGE IT TO:

Code:
return "{imagesfolder}/avatars/noavatar.gif";
Save, and Upload:

NEXT:

Goto your admin CP: Replacements, Modify, [expand list], then find: {imagesfolder}

Click Edit and change contents of replacement to your sites FULL URL + /images

example: http://www.domain.com/forum/images

Note: no end slash.

save...

NEXT GOTO:

Admin Cp: Options, [Avatars]

FIND: Maximum Dimensions
Maximum width and height (in pixels) that the custom avatar image can be.

Change the number from 50 to 64 goto the button and click save changes.

FTP to your Website: make dirdctory called "avatars" in the following location

example: forum/images/avatars/

Then upload the new art images I made for hack.

PS: I've created a GuestAvatar Image, that matches my noavatar image, for those that use the welcome panel final hack by trilOByte | below

If you used this hack, please click install here, and on Vincent "MW" Chan No avatar hack

Comments and or suggestions about this hack in this thread for this hack here only please.

DEMO: http://www.pixelfx.ca/forum/index.php

PS: please let me know if I missed anyone for credits... enjoy the new avatars below
Reply With Quote
  #50  
Old 10-06-2003, 10:23 AM
PixelFx PixelFx is offline
 
Join Date: Dec 2002
Posts: 1,117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

screenshot to follow...
Reply With Quote
  #51  
Old 10-06-2003, 01:48 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please post such modifications and tweakings in the original hack thread.. Merged..
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:56 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.07326 seconds
  • Memory Usage 2,305KB
  • 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
  • (6)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
  • (3)pagenav_pagelink
  • (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