Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Add ALT and/or TITLE text to linked images in VB3 by BOP5 Details »»
Add ALT and/or TITLE text to linked images in VB3 by BOP5
Version: 1.00, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.x Rating:
Released: 03-14-2012 Last Update: 03-15-2012 Installs: 27
Supported Uses Plugins
Code Changes Additional Files  


The purpose of this mod is to add alt text and/or title text to to the <img> tags generated in VB3.x when an image is linked in a post.

This is the Standard Version. The GOLD Version is FREE but available only from:
Qapla.com - Add Alt Text GOLD by BOP5 Mod

The GOLD edition has 1 additional feature: Smart Tagging
Smart Tagging will check the filename of an image for useful information. If the mod believes the filename can be useful to describing the image it will use a cleaned and formatted version of the filename as the alt or title text. If the mod sees that the filename is all numeric, or a common digital camera format, or a vbulletin attachment filename it will instead use the thread title as the alt/title text for the image.

The Standard edition has only 3 options for alt or title text, each of which can be set independently. - Use Filename, Use Thread Title, or use both Filename AND Thread Title to create the tag.

THIS MOD REQUIRES 1 MANUAL FILE EDIT
Instructions included, the class_bbcode.php file must be edited. Detailed instructions are included on the ONE edit that must be made.

Since VB 3.8.7 is the last VB 3.x release a manual file edit isn't very annoying since you'll never have to worry about re-doing it unless you re-install your forum.

If you ever upgrade to VB4 there is a separate VB4 version that doesn't require any file edits.

Live Demo: A random image posted on JUOT Forums

------------------------------------------------------

Please "Mark as Installed" if you use this.
Donations always appreciated. :up:
Nominate MOTM if you LOVE it!

Download Now

File Type: zip Add Alt Tag to Images VB3 by BOP5a.zip (6.0 KB, 172 views)

Screenshots

File Type: jpg vb3_alt_text_filename.jpg (153.0 KB, 0 views)
File Type: jpg vb3_alt_text_threadtitle.jpg (97.5 KB, 0 views)
File Type: jpg vb3_settings.jpg (112.2 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 03-15-2012, 02:26 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved.
Reply With Quote
  #3  
Old 03-16-2012, 03:01 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I updated the zip file, I had included the wrong instructions for the manual file edit- my apologies.

The real edit, which has been fixed in the instructions now is:

Open file /includes/class_bbcode.php

Find in file: function handle_bbcode_img_match
or
Go to line #: 1993(in VB 3.8.7, may vary in other versions)

Change:
PHP Code:
    return '<img src="' .  $link '" border="0" alt="" />'
To:
PHP Code:
    //return '<img src="' .  $link . '" border="0" alt="" />';
        
($hook vBulletinHook::fetch_hook('bbcode_img_match_vb3')) ? eval($hook) : false;
    
$retval '<img src="' .  $link '" border="0" alt="'.$bop5alt.'" '.$bop5title.$bop5rscode.' />';    
    return 
$retval
Reply With Quote
  #4  
Old 03-19-2012, 05:10 PM
Abu2's Avatar
Abu2 Abu2 is offline
 
Join Date: Sep 2007
Location: Russia,Moscow
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
//return '<img src="' . $link . '" border="0" alt="" />';
($hook = vBulletinHook::fetch_hook('bbcode_img_match_vb3')) ? eval($hook) : false;
$retval = '<img src="' . $link . '" border="0" alt="'.$bop5alt.'" '.$bop5title.$bop5rscode.' />';
return $retval;
It works perfect in FireFox, but not in IE9.
Image resizer not working in IE9 at all with this code. (I use ncode)
Why?
Reply With Quote
  #5  
Old 03-19-2012, 09:11 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's working on my IE9...

Does it work for you on this page:
http://www.juot.net/forums/showthrea...13#post1286813

Please give me a link to a thread on your site with the problem.
Reply With Quote
  #6  
Old 03-20-2012, 10:01 PM
htscpl's Avatar
htscpl htscpl is offline
 
Join Date: Sep 2003
Location: Houston
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just installed on my vb3.8 and it seems to be working just fine. Thanks!
Reply With Quote
Благодарность от:
BirdOPrey5
  #7  
Old 03-21-2012, 09:25 PM
weindians weindians is offline
 
Join Date: Sep 2006
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has this anything to do with [img] tag which normaly used while posting
Reply With Quote
  #8  
Old 03-21-2012, 11:07 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, this works specifically with the regular [img] tag.
Reply With Quote
  #9  
Old 03-23-2012, 05:30 PM
weindians weindians is offline
 
Join Date: Sep 2006
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great BOP5... thanx for the mod.. also is there a option to add alt text to images exits... also "image linked in post" means <img src"link"/> ??? what if images inserted like [img]link[/img] or is it hotlinking images??
Reply With Quote
  #10  
Old 03-23-2012, 06:28 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This will work for all images added via the [IMG] BBCode- It works all existing posts as well, not just new ones.

If it isn't showing on an old post it may mean the post cache needs to be cleared. You can edit-and-resave the post to force the cache to update.
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 04:15 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.06436 seconds
  • Memory Usage 2,336KB
  • Queries Executed 26 (?)
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
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (4)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete