vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Avatar alt tags that actually work (https://vborg.vbsupport.ru/showthread.php?t=32274)

SFishy 11-09-2001 02:02 PM

Because I don't want there to be any confusion about what I'm looking for, and because I don't want to step on anyone's toes, I posting this in a new thread. I'm thinking it's a hack only because it doesn't work in VB "out of the box", but I've posted it over on vbulletin.com in the "how do I" area as well.

- - - - -

I am using avatars on my board, avatars provided by me, no custom avatars allowed. Each avatar has a title/name, just like post-icons do. Post icons show the alt= tag as the title/name. (example below)...

http://www.fishy.com/test/images/posticon.gif

...Avatars don't have this. How can I get it so that an avatar uses it's given title/name as it's alt= tag, just like post icons do?

In the postbit template I tried "alt=$avatar[title]" but that didn't work. Is there something I have to change in a .php file so it does work, the same way it does by default on Avatars Info Page?

Any help would be greatly appreciated.

Matt 11-09-2001 06:20 PM

Don't get your hopes up but maybe this will work?

Try :

title=$avatar[title]

SFishy 11-09-2001 07:46 PM

try that where?

JJR512 11-09-2001 08:12 PM

The postbit_avatar template. The default template is this:
Code:

<img src="$avatarurl" border="0" alt="">
Try this (based on what Matt said):
Code:

<img src="$avatarurl" border="0" alt="title=$avatar[title]">

JJR512 11-09-2001 08:15 PM

BTW, that doesn't work. It only shows title= as the alt bit. But whatever the code is to display it, you want to stick it where I just showed you.

JJR512 11-09-2001 08:18 PM

And the avatar is also displayed by the following templates, so you would need to make similar changes there, too:
  • modifyavatar_custom
  • modifyoptions
  • getinfo

SFishy 11-10-2001 12:28 AM

And I said in my first post, "alt=$avatar[title]" doesn't work. I had tried that before even posting (in postbit template).

It DOES work in the modifyoptions template.

From what I can tell, the members profile stores the avatar id (avatarid), and in a post is told to display that id based on $avatarurl -- I do not how to get the $avatar[title] to relate to this information so that it will show up in the member's post and profile.

Any ideas coding gurus?

Thanks

Matt 11-10-2001 03:03 PM

<img src="$avatarurl" border="0" title="$avatar[title]">

Try that.

JJR512 11-10-2001 07:31 PM

You already had us try $avatar[title].

Admin 11-11-2001 11:50 AM

In showthread.php find this:
Code:

".iif($avatarenabled,",avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
and replace it with this:
Code:

".iif($avatarenabled,",avatar.avatarpath,avatar.title AS avatartitle,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
Now you can use $post[avatartitle] in your postbit_avatar template.

SFishy 11-13-2001 01:04 PM

Hey Firefly...

AWESOME... that worked perfect! THANKS! Was exactly what I needed!

:D

Admin 11-13-2001 01:58 PM

Glad I could help. :)

SirLANcelot 11-17-2001 03:18 PM

It works!! Great, absolutely!!! I love it!! :)

Thanks, FireFly!

- LANce

SFishy 11-23-2001 03:21 PM

Another question ;)

How about if I want the same effect in the user's profile??

Thanks!

Aim

Scott MacVicar 11-23-2001 08:55 PM

the one for the profile relies on a function called getavatarurl and all it does is get the avatarurl and return it so you would have to make the $avatarinfo a global variable in the getavatarurl function and then adjust the query within it to take the avatar title as well then you could use $avatarinfo[avatartitle]


All times are GMT. The time now is 01:58 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.01659 seconds
  • Memory Usage 1,740KB
  • 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
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)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