vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Add-On Releases - Add default avatar picture on ministats block (https://vborg.vbsupport.ru/showthread.php?t=207525)

macc 03-05-2009 10:00 PM

Add default avatar picture on ministats block
 
1 Attachment(s)
Hello! With this modification you can add default avatar picture to users mini statistics block for those who did not select avatars!

Open memberinfo template - found memberinfo_block_ministats templete and find this code
PHP Code:

<if condition="$prepared['avatarurl']">
  <
td><img src="$prepared[avatarurl]alt="<phrase 1="$prepared[username]">$vbphrase[xs_avatar]</phrase>" $prepared[avatarsize] class="alt2" id="user_avatar" /> 

and after this add this code below

PHP Code:

<else />
<if 
condition="$bbuserinfo[showavatars]">
 <
td class="alt2"><a href="profile.php?$session[sessionurl]do=editavatar"><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> 

Done!

Upload novatar.gif in "your template"/images/misc folder.

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

Regards,

macc

UKBusinessLive 03-06-2009 03:55 PM

Excellent, well done Macc :D

macc 03-06-2009 06:18 PM

Quote:

Originally Posted by UKBusinessLive (Post 1761864)
Excellent, well done Macc :D

Thanks UK!

regards

macc

Sweeks 03-06-2009 11:08 PM

Site timed out loading
________
Creampie bbw

macc 03-06-2009 11:45 PM

Quote:

Originally Posted by Sweeks (Post 1762120)
Site timed out loading

yes - that was problem with hostage - (server upgrade) - but now works fine!


regards

macc

Jasem 03-07-2009 10:33 AM

Quote:

Originally Posted by Sweeks (Post 1762120)
Site timed out loading

Internet Explorer cannot display the webpage :(

macc 03-07-2009 11:36 AM

Quote:

Originally Posted by Jasem (Post 1762382)
Internet Explorer cannot display the webpage :(

site works fine now and i myself use IE and no problems ...


reg

macc

Dr. Bantham 03-08-2009 01:05 PM

I like this concept, but I am experiencing the following issues:
  • The rollover text does not display the username ('s avatar).
  • Cilicking on the avatar creates the following link and corresponding error message:
    http://www.xxxxxxx.xxx/member.php?u=
    This user has not registered and therefore does not have a profile to view.
  • The "Set Avatar" link appears to everyone, which implies that you can select an avatar for the user, but instead takes you to perform your own avatar selection.

I believe it would be ideal if the "Set Avatar" link were removed and the avatar link was only active if the user is viewing their own profile, whereby the link would take them to:
http://www.xxxxxxx.xxx/profile.php?do=editavatar

macc 03-08-2009 01:52 PM

Quote:

Originally Posted by Dr. Bantham (Post 1763161)
I like this concept, but I am experiencing the following issues:
  • The rollover text does not display the username ('s avatar).
  • Cilicking on the avatar creates the following link and corresponding error message:
    http://www.xxxxxxx.xxx/member.php?u=
    This user has not registered and therefore does not have a profile to view.
  • The "Set Avatar" link appears to everyone, which implies that you can select an avatar for the user, but instead takes you to perform your own avatar selection.
I believe it would be ideal if the "Set Avatar" link were removed and the avatar link was only active if the user is viewing their own profile, whereby the link would take them to:
http://www.xxxxxxx.xxx/profile.php?do=editavatar

YES - you can make like this and that is point that one user can not change avatar for another user!

PHP Code:

<td class="alt2"><a href="profile.php?$session[sessionurl]do=editavatar"><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

regards

macc

updated first post!

Saviour 08-03-2009 03:33 AM

Installed...

Thank you...working fine on vB 3.8.3.


All times are GMT. The time now is 11:49 AM.

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.01066 seconds
  • Memory Usage 1,753KB
  • 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
  • (3)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete