vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=280080

Add ALT and/or TITLE text to linked images in VB3 by BOP5
by BirdOPrey5
15 Mar 2012 15:25

4 Attachment(s)

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! ;)

BirdOPrey5 15 Mar 2012 15:26

Reserved.

BirdOPrey5 16 Mar 2012 16:01

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

To:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Abu2 19 Mar 2012 18:10

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?

BirdOPrey5 19 Mar 2012 22:11

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.

htscpl 20 Mar 2012 23:01

Just installed on my vb3.8 and it seems to be working just fine. Thanks! :D

weindians 21 Mar 2012 22:25

Has this anything to do with [img] tag which normaly used while posting

BirdOPrey5 22 Mar 2012 00:07

Yes, this works specifically with the regular [img] tag.

weindians 23 Mar 2012 18:30

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??

BirdOPrey5 23 Mar 2012 19:28

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.

weindians 24 Mar 2012 01:44

editing and saving posts will be bit time consuming, to check which images in threads are not showing when u have 73k+ threads.... i'm going to install it... thanx..

Update: i installed the gold version from Qapla... used 'alt text' only with 'thead title ' option... its giving all images including signature images same alt tag...?? also i feel smart tag is bad for tinypic hosted images , just numbers u get in alt text

BirdOPrey5 24 Mar 2012 02:46

If you used the "thread title" option then yes, every image in the thread (signature or otherwise) will have the thread title as the alt text... That's what it's supposed to do.

Next version will have an option to disable it on signatures. I actually posted code to do it now if you want in the Qapla.com thread, somewhere on the first page or two.

I'll look at fixing tinypic in the next update as well, thanks for the info.

weindians 26 Mar 2012 18:27

no worries BOP5.... for tinypic any image uploaded gets just numbers.jpg ..do they actually store the orig image name which can be pulled using that number? are u going to exclude tinypic from adding alt/title text

BirdOPrey5 26 Mar 2012 20:43

I just uploaded this to tnypic and it's not all numbers... can you give me an example link?

https://www.vbulletin.org/forum/external/2012/03/10.jpg

weindians 26 Mar 2012 23:34

its not only numbers letters to.. random way,....

http://i42.tinypic.com/5lbbb6.jpg.... uploaded with name 'boink' and extension 'gif'. i have an account with tinypic..... it never gave me original file name..


All times are GMT. The time now is 04:11.

Powered by vBulletin® Version 3.8.13
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.