vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Show "No Avatar" Image If No Avatar is Selected (https://vborg.vbsupport.ru/showthread.php?t=36363)

MW[MWGN] 03-19-2002 10:00 PM

Show "No Avatar" Image If No Avatar is Selected
 
]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

MW[MWGN] 03-20-2002 08:50 PM

Installation file is here... with the "No Avatar" image

Edit: OK, I've added the other modifications to the installation file just incase the hack doesn't quite work for some. I've tested this on my 2.2.6 and it works fine.

Neo 03-20-2002 08:52 PM

Errr... nothing agaist you but why would you post someone elses code, that is already posted?

MW[MWGN] 03-20-2002 09:00 PM

is it? oops..sorry

wooolF[RM] 03-20-2002 09:12 PM

]lol :D

Neo 03-21-2002 12:06 AM

I mean the Welcome Panel hack

Recluse 03-21-2002 07:18 AM

thanks dident work on mine :( surly i dident mess something this simple up

fonzerelli_79 03-21-2002 07:37 AM

as far as i can remember, the welcome hack only adds the no avatar image on the foum hom page

MW[MWGN] hack (well i line changed) changes it in the posts and threads, yes they are very similar but not the same

anyhoo, cheers MW[MWGN]

MW[MWGN] 03-21-2002 11:09 AM

Yes, the welcome panel hack has the changed line in INDEX.PHP, while mine changes in functions.php to apply to posts and threads.

Recluse, what version are you running? And how does it not work..i.e. any errors?

69-FLy-gUy 03-24-2002 04:48 PM

does'nt work here either

MW[MWGN] 03-25-2002 12:05 PM

version you running? Can you explain more HOW it doesnt work?

69-FLy-gUy 03-25-2002 04:30 PM

easy. in the thread it doesn't show the No avatar selected image... want to see my funtions.php?

running 2.2.4

MW[MWGN] 03-26-2002 11:02 PM

]I think if the user dont have the ability to use a custom avatar, then the hack doesnt work...I'm working on a fix.

Edit: OK, at the moment I cant test the fix because my board's domain is switching DNS to point to the new server, so please give me a day or two and I'll post the update here :)

MW[MWGN] 03-27-2002 09:30 PM

]OK, try this for those who cant get the hack working.
Find in /admin/functions.php:
PHP Code:

if ($avatarurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showavatars]))) {
            
$post[avatar]=""

Replace with:
PHP Code:

if ($avatarurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showavatars]))) {
            
$post[avatar]="<img src=images/avatars/noavatar.gif border=0>"

I dont see why I can get it working with the code in the readme file but some can't... but try the above as well as the one in the readme and report if it works...thanks

ZiRu$ 03-27-2002 10:01 PM

The original hack worked perfectly on 2.2.4

i didnt need to use your code MW[MWGN]!

Can someone please give me an update so the noavatar image under our name will be linked to the editavatar url?

please?

MW[MWGN] 03-27-2002 11:26 PM

yea but for some strange reasons some it doesnt work for some...

69-FLy-gUy 03-28-2002 06:52 AM

Weird. still won't work for me. i will see if it still isn't working in a dayt and let you know. thakns for trying though=)

Recluse 03-28-2002 07:22 AM

Quote:

Originally posted by MW[MWGN]
Yes, the welcome panel hack has the changed line in INDEX.PHP, while mine changes in functions.php to apply to posts and threads.

Recluse, what version are you running? And how does it not work..i.e. any errors?

2.2.2 heavly hacked, but all the code was there as in the txt file. no errors. just dont show

MW[MWGN] 03-28-2002 03:19 PM

]have you got avatar enabled? :) and do you allow custom avatars?

Recluse 03-28-2002 03:37 PM

yes and yes :) i tired you fix to functions.php and it dont do anything either :(

MW[MWGN] 03-28-2002 10:03 PM

]Try this

Find in /admin/functions.php:
PHP Code:

return ''

Replace with:
PHP Code:

return "images/avatars/noavatar.gif"


ZiRu$ 03-29-2002 01:25 AM

how do i link it so they can edit there avatar?

69-FLy-gUy 03-29-2002 08:01 AM

Still didn't work:(

MW[MWGN] 03-29-2002 11:03 AM

Oh well I have no idea on how to get it to work with those who can't... On my forums they are fine, whether it's someone who has the ability to use custom avatars or not.

Hot Dogg: You need to get FireFly's avatar thingy hack and use it as a reference... I am a newbie hacker and at the moment I'm too busy sorting all the problems on my server...

Raptor 03-29-2002 07:17 PM

worked straight away for me no problems

vb 2.2.4

i have no clue how some peeps cannot get it to work - its very very simple

Gholsie 06-09-2002 11:19 PM

Guys, the original instructions in the ZIP file are wrong. I followed MW[MWGN]'s instructions and it finally worked for me. I followed both of these steps:

Find:
PHP Code:

if ($avatarurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showavatars]))) {
            
$post[avatar]=""

Replace with:
PHP Code:

if ($avatarurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showavatars]))) {
            
$post[avatar]="<img src=images/avatars/noavatar.gif border=0>"

And the second step:

Find:
PHP Code:

return ''

Replace with:
PHP Code:

return "images/avatars/noavatar.gif"

The first step alone didn't work. But, after I performed the second step, it worked great. So, I'm not sure which one did it for me. I'm not going to f' with it.

Boofo 06-10-2002 12:28 AM

Try this. It works here.

Code:

<a href="member.php?s=$session[sessionhash]&action=editavatar"><img src="https://vborg.vbsupport.ru/images/noavatar.jpg">
or whatever the name of your image file is. Let me know if that works for you. :)

Quote:

Originally posted by Hot Dogg
how do i link it so they can edit there avatar?

Grealm 06-10-2002 03:16 AM

works perfect to me.. im using 2.2.6
thanks MW.. ive been looking for this hack.. finally found one :)

MW[MWGN] 06-10-2002 02:53 PM

]Actually the original instructions (now I've updated with the other instructions as well :)) aren't wrong, because I just use that in my 2.2.6 and it works, however on some others (dont know why) other changes are needed in functions.php...well..don't look at me, I know about vB hacking as much as my dog does :)

Prophet2002 07-10-2002 03:47 AM

it worked on my pratice board, but not on the real thing.. with either version of the code, go figure

Heineken77 07-19-2002 06:26 PM

nice! hopefully this will make people start choosing avs :)

thanks buddy!

LOD-squa 08-18-2002 01:07 AM

is there a way I can set the guest image when guestpost?

Diva 08-23-2002 04:32 AM

I was really looking forward to using this, but it is not compatible with my avatars in categories/avatar taken hacks. I hope it will be at some time. Great hack though.

Boofo 08-23-2002 05:25 AM

What is it doing or not doing? I'm sure there is a way to get it to work with it. :)

Quote:

Originally posted by Diva
I was really looking forward to using this, but it is not compatible with my avatars in categories/avatar taken hacks. I hope it will be at some time. Great hack though.

Diva 08-23-2002 06:24 AM

My avatars cannot be selected anymore from the user cp. I have to go into the Admin control panel to choose them. :/

g-force2k2 08-23-2002 06:35 AM

Diva :: try this coding

open admin/functions.php

find:

PHP Code:

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

and replace it with this:

PHP Code:

        if ($avatarurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showavatars]))) {
            
$post[avatar]="<img src=\"/forum/images/avatars/No Avatar.gif\" border=\"0\">";
        } else {
            eval(
"\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
        } 

Then create a new directory in the forum/images folder and call it avatar.

Then upload your No Avatar Img... save it as No Avatar.gif

hope that helps :) regards...

g-force2k2

Diva 08-23-2002 03:50 PM

Is this instead of another code change or ontop of one for this hack? Or is this a code update? Sorry so blonde... :/

Diva 08-23-2002 05:03 PM

It doesn't work.... :(

KrisP 09-07-2002 12:41 PM

Really cool. Been looking for that.

Great!

/me clicks install...

- KrisP (Poof! Installed...)

PHiXTiT 09-13-2002 12:51 AM

Simple...

5 Stars.


All times are GMT. The time now is 06: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.02201 seconds
  • Memory Usage 1,825KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (10)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete