Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 31

Thread: Add Alt Text to Images GOLD by BOP5 for VB3

    1. Add Alt Text to Images GOLD by BOP5 for VB3 Details »»

      Add Alt Text to Images GOLD by BOP5 for VB3

      Version: 1.0, by (Administrator) BirdOPrey5 is offline
      Developer Last Online: May 2019 Show Printable Version Email this Page
      Category: VB 3.8.x
      vB Version: 3.8.x Rating:  (1 votes - 5.00 average) Installs: 4
      Released: 03-15-2012 Last Update: Never Downloads: 56
      Supported Uses Plugins Code Changes Additional Files

      The purpose if this mod is to add "alt" and/or "title" text to all <img> tags created by the forum for linked images in posts.

      For example, mouse-over this image:

      You will see the file name has been converted into "alt" text and is now visible when the mouse is over the image. Far more importantly however Google and other search engines will now pick up the text in the alt and/or title tags and consider that when determining the content of the image and overall content of the page. (Granted the above is the slightly different VB4 version of this mod, but you get the point.)

      To see this mod in action on a real VB 3.8 forum visit this post at: Forum

      It can be argued that if your filename is already a good description of the image it doesn't add much to simply copy it for the alt text- and there is some truth to this although with SEO it does not hurt to reinforce the keywords in a perfectly legitimate and accepted way.

      However what about images straight from a digital camera with names like DCS101010.JPG or IMG282828.JPG or even a vBulletin attachment filename like attachment.php?blah-blah-blah=9192. None of these file names contain any useful information so without an "alt" or "title" tag to describe them it is lost SEO. On VB forums this has been a major concern over the years since VB lacked any way to add alt or title tags to these images.

      This mod now allows you to use the "Thread Title" as the alt or title text of the image. You can Set the title text to the file name and the alt text to the thread title, or vice-versa. Even better with this GOLD version you can use "Smart Tag" which will decide if the filename is a useful filename, and if not use the thread title.

      This mod requires a manual fie edit of one default vBulletin php file. If you ever uninstall the mod you will not need to undo the change, the forum will still continue to work exactly the same with the edit in place.

      Since we know vBulletin does not intend to release any further 3.x versions of vBulletin we know VB 3.8.7 is the final release. You can be confident if you make this file edit once you will not have to worry about making it again unless you find need to re-install your forum.

      For this reason I suggest you upgrade to 3.8.7 before installing this mod if an upgrade is in your future. This mod however will work with all VB 3.8, 3,7, and possibly earlier versions as well.

      EDIT- I have updated the zip file with fixed instructions for the file edit. The version of the mod however has not changed.

      Download Now


      vb3_alt_text_filename.jpg   vb3_alt_text_threadtitle.jpg   vb3_settings.jpg  

      Show Your Support

      • If you like this modification support the author by donating.
      • This modification may not be copied, reproduced or published elsewhere without author's permission.
  1. #2
    I'll give it a go tomorrow morning.

  2. #3
    Installed but having some issues. I'm not exactly using a stock version of that image resizer. I got a couple ideas of what could be the problem. My class_bbcode has been modified as well. I'm wondering if I did a fresh install of the resizer and reverting the class_bbcode would be the way to go.

  3. #4
    For some reason, when I implement the file edit it is giving me this in the source code:

    <img . $boptitle . src="http://link-to-some-photo.jpg" border="0" alt="" /><br />

  4. #5
    For some reason it isn't parsing the $boptitle variable.

  5. #6
    Quote Originally Posted by jimsflies View Post
    For some reason, when I implement the file edit it is giving me this in the source code:

    <img . $boptitle . src="http://link-to-some-photo.jpg" border="0" alt="" /><br />
    That was an example I used in the text document for what a default VB image tag looks like. Is it possible you copied the wrong line during the file edit?

    The file edit is in /includes/class_bbcode.php

    PHP Code:
       return '<img src="' .  $link '" border="0" alt="" />'

    Change it 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.' />';    

    Quote Originally Posted by jimsflies View Post
    For some reason it isn't parsing the $boptitle variable.

    To go back to the basics please make sure the option Add Title Text is set to "YES" in the settings. It can get lost being in the middle of the settings page like it is.

    [EDIT: Fixed replacement code]

  6. #7
    Yup I think I did all that. This line of your class_bbcode.php file is what it is returning in the page's html when I "view source", but it isn't providing the variable contents, just returning the variable as html:

    PHP Code:
    return '<img . $boptitle . src="' .  $link '" border="0" alt="" />'
    I put the class_bbcode.php back temporarily. But I can reupload the one with edits so you can see if you have a few...or I can send you admin.

  7. #8

    Sorry, looks like I included the wrong file edit in the original instructions.

    This is the real replacement for the file edit.

    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.' />';    
    I edited the post above and will upload a new zip with the fixed instructions now. Thanks for letting me know.

  8. #9
    That got me heading in the right direction. The images are resizing and the alt tags are in place.

    Now I just need to get the class rel attributes back in there so that it works as normal.

  9. #10
    Jim, If you can give me the code that is in the page source with the mod off I can find you the right code to add to the resizer code setting.

    Basically we're just going to copy and paste it into that last setting in the mod.

Similar Threads

  1. Problems with album images
    By cykelmyggen in forum More Share Options TNG & More Open Graph Images - $25
    Replies: 1
    Last Post: 11-18-2011, 03:11 PM

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts