vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - Default avatar for users with no selected avatar (https://vborg.vbsupport.ru/showthread.php?t=207517)

macc 03-05-2009 10:00 PM

Default avatar for users with no selected avatar
 
1 Attachment(s)
Just some help if you want to set the default avatar to users who did not select any avatar. It is for postbit, postbit_legacy and member list template.

In your postbit template find -
PHP Code:

<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]$post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if> 

and put this below code before </if> -
PHP Code:

<else />
<if 
condition="$bbuserinfo[showavatars]">
 <
td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$stylevar[imgdir_misc]/noavatar.gif" $post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a><br /><a href="profile.php?$session[sessionurl]do=editavatar"><b>Set Avatar</b></a></td>
</if> 

upload(copy) image noavatar.gif in "your template" /images/misc folder.




In your templete memberlist_resultbits find this:

PHP Code:

<if condition="$show['avatar']"><img src="$avatarurlborder="0" $avwidth $avheight alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /><else />&nbsp;</if></td></if> 

and &nbsp; replace with this
PHP Code:

<img src="$stylevar[imgdir_misc]/noavatar.gif" border="0" $avwidth $avheight alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /> 


For postbit_legacy find

PHP Code:

<if condition="$show['avatar']">
    <
div class="smallfont">
     &
nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]$post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
    </
div>
   </if> 

and after </div> add this

PHP Code:

<else />
    <if 
condition="$bbuserinfo[showavatars]">
     <
div class="smallfont">
      &
nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="your url link/noavatar.gif" $post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
     </
div>
</if> 


Change "your url link" to your link to picture (avatar)!

You can make your own pictures (avatar) for users who did not select any avatar!


Hope this will help someone!

Want to see this in action? - http://libar-libar.com


Regards,

macc

UKBusinessLive 03-06-2009 03:56 PM

Great Idea :up:

acegames 03-06-2009 04:30 PM

Nice , makes the site look neater , thanks

macc 03-06-2009 06:15 PM

Quote:

Originally Posted by UKBusinessLive (Post 1761866)
Great Idea :up:


Thanks! :rolleyes:

macc

macc 03-06-2009 06:16 PM

Quote:

Originally Posted by acegames (Post 1761878)
Nice , makes the site look neater , thanks

Glad that you like it!

regards

macc

TimberFloorAu 03-06-2009 06:42 PM

Thanks.

Your postbit legacy addition is missing a </if>

:)

TimberFloorAu 03-06-2009 06:44 PM

*****

and its memberlist_resultsbit

macc 03-06-2009 11:31 PM

Quote:

Originally Posted by TimberFloorAu (Post 1761951)
Thanks.

Your postbit legacy addition is missing a </if>

:)

Thanks that you see - corrected the first post - code for postbit_legacy (added </if> )

Regards

macc

macc 03-06-2009 11:43 PM

Quote:

Originally Posted by TimberFloorAu (Post 1761954)
*****

and its memberlist_resultsbit

Thanks for suggestions but could not find that "</if>" is missing!

whole code in memberinfo - memberlist_resultsbit template should be like this:

PHP Code:

<if condition="$show['avatarcol'] AND exec_switch_bg()"><td class="$bgclass"><if condition="$show['avatar']"><img src="$avatarurlborder="0" $avwidth $avheight alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /><else /><img src="$stylevar[imgdir_misc]/noavatar.gif" border="0" $avwidth $avheight alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /></if></td></if> 

regards

macc

FFTFTCEd 03-11-2009 05:38 PM

Got it working, but the install info up top is kinda hard to understand, (and put this below code before </if> -) I wasn't sure if I had to put before or below, it seems to say both & I had to delete one of those </if> at the end to get it to work, never did fine the right place for the template memberlist_resultbits because I don't know what and &nbsp; replace with this means, do you mean after &nbsp; ? if so, what text do I replace?

The last edit was fine.

macc 03-11-2009 07:40 PM

Hello!

You should replace &nbsp; with this code (not after, not before - just instead &nbsp; )
PHP Code:

<img src="$stylevar[imgdir_misc]/noavatar.gif" border="0" $avwidth $avheight alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /> 

macc

FFTFTCEd 03-13-2009 06:12 PM

Got it, thanks Macc.

macc 03-14-2009 09:42 PM

Quote:

Originally Posted by FFTFTCEd (Post 1767360)
Got it, thanks Macc.

you are welcome

macc

RiSqq 03-15-2009 01:18 AM

Done as the instructions said and it's not working. The instruction really aren't easy to follow. Anyway anyone can make this a plug in?

wcguy 03-15-2009 01:27 AM

I just got it to work, but this insruction...

PHP Code:

<img src="your url link/noavatar.gif" 

and the written instruction....

Quote:

Change "your url link" to your link to picture (avatar)!
I had to modify.

to

PHP Code:

<img src="./images/misc/noavatar.gif" 

and like other posters above noted, in the first mod, removed the extra
</if>


PS and I'm not sure why but the postbit legacy search code didn't match. I had to hand find it.

RiSqq 03-15-2009 01:53 AM

wcguy, to shorten it further use $stylevar[imgdir_misc]/noavatar.gif.

this is what the script should be as default. Maybe OP should update?

y2krazy 03-16-2009 12:36 PM

How can I get the "Set Avatar" text to show up for just THAT user. With the code, as it is in the original post. Everyone will see "Set Avatar" under a user's avatar that isn't set. When they click on it, it will take them to edit their own avatar.

Thanks in advance!

~ Sean

Wyzrd 03-19-2009 01:03 AM

I'm having a slight problem with this. I have it set for where members can choose whether or not they want the new horizontal postbit, or the old vertical postbit. When doing this, it will only work on the horizontal postbit. How can I get it to work for the old vertical postbit.

--------------------------------
EDIT: I figured out my problem. Thanks. for this great edition to vB.

Fastbird 03-19-2009 03:42 AM

Quote:

Originally Posted by y2krazy (Post 1769577)
How can I get the "Set Avatar" text to show up for just THAT user. With the code, as it is in the original post. Everyone will see "Set Avatar" under a user's avatar that isn't set. When they click on it, it will take them to edit their own avatar.

Thanks in advance!

~ Sean

+1 I'd like to know this also!

Bowromir 03-19-2009 07:33 PM

thanks! works great :)

newguy 03-23-2009 02:21 PM

Just wondering if the instructions have been updated, since some posts suggested some changes?

jonah1892 03-23-2009 02:59 PM

how would i go about doing this on the ipbroarcade avatars

newguy 03-23-2009 04:27 PM

Quote:

Originally Posted by jonah1892 (Post 1775065)
how would i go about doing this on the ipbroarcade avatars

Are you talking about the no avatar that shows in the arcade when that member does not have a avatar installed?

If so I just found the directory of the no avatar for the arcade and uploaded the one I wanted to show, and made it the same file name and over write the no avatar.gif

jonah1892 03-24-2009 03:04 AM

thank you

Saviour 03-25-2009 06:23 PM

I hate template edits...

Any way to package this as a product?

Saviour 03-25-2009 07:05 PM

Just tried your manual install instructions...and it doesn't work...

I think you need to take a look at the coding so it's compatible with 3.8.1 PL1.

Also...this mod conflicts with [tk] Egg Avatar mod.

Installed...then Uninstalled.

Sorry...

macc 03-25-2009 07:14 PM

i use myself vbulletin 3.8.1 PL1 and this code works fine !

never used [tk] Egg Avatar mod...


regards

macc

powerful_rogue 04-02-2009 06:57 PM

Shame this dosent work with [tk] egg avatar :(

Magnumutz 04-05-2009 12:48 AM

This is NOT an add-on, but a template modification.

y2krazy 04-06-2009 03:33 PM

Quote:

Originally Posted by y2krazy (Post 1769577)
How can I get the "Set Avatar" text to show up for just THAT user. With the code, as it is in the original post. Everyone will see "Set Avatar" under a user's avatar that isn't set. When they click on it, it will take them to edit their own avatar.

Thanks in advance!

~ Sean

3 weeks and no help. Anyone have any ideas? :/

~ Sean

Alfa1 04-06-2009 03:35 PM

Does this work on the blog / blog list as well?

pigpog 05-06-2009 12:35 AM

I did the first two steps relatively easily, but when I put the postbit_legacy bit in, my threads got completely messed up (with bits here, bits there) and I immediately had to revert back to an old version of postbit_legacy. :(

I think this is a great idea so I'm not giving up on it now, and and I'm going to keep fiddling with the code until I either get it working or.... give up. :rolleyes:

ubcforums 06-16-2009 11:19 AM

Thanks...works perfectly ;)

rrudeboy 06-17-2009 01:51 AM

works great on version 3.8.2...

idoL1 06-18-2009 11:08 PM

no avatars work on my site at all now....not the default or the people who had avatars before??? any idea?

macc 06-19-2009 11:16 AM

Quote:

Originally Posted by idoL1 (Post 1832283)
no avatars work on my site at all now....not the default or the people who had avatars before??? any idea?

have no idea...maybe you make some wrong in your code!

regards

macc

theforumplace 06-20-2009 01:49 AM

Very sloppy code and instructions.

Sean try removing this line from the edited postbit code.

It has not solved the issue but instead just removed the link which cleans it up.

PHP Code:

<a href="profile.php?$session[sessionurl]do=editavatar"><b>Set Avatar</b></a></td>
</if> 

Regards

Andy

xxxclubk1dxxx 06-23-2009 06:56 AM

thank you once again! :)

TAIFUN_T 06-23-2009 12:35 PM

after each update the forum again to edit the template? Hm...
I like https://vborg.vbsupport.ru/showthread.php?t=165563

macc 06-23-2009 01:01 PM

Quote:

Originally Posted by TAIFUN_T (Post 1835566)
after each update the forum again to edit the template? Hm...
I like https://vborg.vbsupport.ru/showthread.php?t=165563

after forum update you do not need make any changes in your templates for this modifications!

regards

macc


All times are GMT. The time now is 04:59 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.01528 seconds
  • Memory Usage 1,866KB
  • 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
  • (11)bbcode_php_printable
  • (11)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