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

Reply
 
Thread Tools
Add Alt Text to Linked Images by BOP5 (VB 4.1.10+) Details »»
Add Alt Text to Linked Images by BOP5 (VB 4.1.10+)
Version: 1.5, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: New Posting Features - Version: 4.1.10 Rating:
Released: 01-14-2012 Last Update: 03-15-2012 Installs: 97
Uses Plugins
Re-useable Code  
No support by the author.



Current Version: 1.5

This is the Standard Version. The GOLD Version is FREE but available only from:
Qapla.com - Add Alt Text GOLD VB4 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.

The purpose of this mod is to automatically add "alt" and / or "title" tags to linked images in vBulletin forums.

By default vBulletin leaves the alt tag blank on all linked images. However image searches like Google scan for alt and/or title tags to determine what the image is and having these tags can increase your SEO in regards to images and perhaps regular SEO as well.

It can also benefit visually impaired users who may be using a screen reader.

Demo: http://www.qapla.com/mods/showthread...?p=325#post325

VB 4.1.10+ Preferred. No manual file edits necessary.
VB 4.0.0 - VB 4.1.9 - 1 manual file edit required. Directions in .zip.

Please Mark as Installed if you use this.
Donations always appreciated. :up:

Download Now

File Type: zip Add Alt Text to Linked Images VB4 by BOP5.zip (5.0 KB, 352 views)

Screenshots

File Type: jpg vb4_alt_text_demo.jpg (39.7 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.
2 благодарности(ей) от:
RichieBoy67, rodriiverduguez

Comments
  #2  
Old 01-15-2012, 09:49 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
Благодарность от:
muhakeme
  #3  
Old 01-15-2012, 11:52 PM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice,...

Will check it out. Thanks
Reply With Quote
Благодарность от:
BirdOPrey5
  #4  
Old 01-16-2012, 12:51 AM
fizzow fizzow is offline
 
Join Date: Oct 2009
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this mod work if members upload images via 3rd party image hosting like Photobucket?
Reply With Quote
  #5  
Old 01-16-2012, 01:08 AM
datoneer datoneer is offline
 
Join Date: Jul 2011
Posts: 453
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why only 4.1.10 i want this mod, can you make it work for 4.1.8 please. Thanks
Reply With Quote
  #6  
Old 01-16-2012, 03:22 AM
OldSchoolDSL OldSchoolDSL is offline
 
Join Date: Oct 2010
Posts: 1,196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by datoneer View Post
Why only 4.1.10 i want this mod, can you make it work for 4.1.8 please. Thanks
4.1.8 was very troublesome for many modifications (buggy as all hell).

4.1.10 re-does alot of the style vars.

You're best to upgrade (my option)
Reply With Quote
  #7  
Old 01-16-2012, 11:59 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fizzow View Post
Will this mod work if members upload images via 3rd party image hosting like Photobucket?
Looking at this example URL from Photobucket:
Code:
http://i170.photobucket.com/albums/u267/bcblondie05/Bunny.jpg
It appears Photobucket does keep the original file name *Bunny" in this case, so yes it should work with Photobucket uploaded images.

Quote:
Originally Posted by datoneer View Post
Why only 4.1.10 i want this mod, can you make it work for 4.1.8 please. Thanks
Because the hook used by this mod was introduced in version 4.1.10, the only way it would work on older versions is with a manual file edit.

If you want to try in 4.1.8 you will need to edit your file /includes/class_bbcode.php

Find the function:

PHP Code:
    function handle_bbcode_img_match($link$fullsize false)
    {
        
$link $this->strip_smilies(str_replace('\\"''"'$link));

        
// remove double spaces -- fixes issues with wordwrap
        
$link str_replace(array('  ''"'), ''$link);

        
$retval = ($fullsize '<div class="size_fullsize">' '')  . '<img src="' .  $link '" border="0" alt="" />' . ($fullsize '</div>' '');

        return 
$retval;
    } 
and add the hook manually so it becomes:

PHP Code:
    function handle_bbcode_img_match($link$fullsize false)
    {
        
$link $this->strip_smilies(str_replace('\\"''"'$link));

        
// remove double spaces -- fixes issues with wordwrap
        
$link str_replace(array('  ''"'), ''$link);

        
$retval = ($fullsize '<div class="size_fullsize">' '')  . '<img src="' .  $link '" border="0" alt="" />' . ($fullsize '</div>' '');

        (
$hook vBulletinHook::fetch_hook('bbcode_img_match')) ? eval($hook) : false;

        return 
$retval;
    } 
You would also need to edit the xml file in the zip and change the min version near the top to 4.1.0 or any number less than or equal to your version.

Be warned though there were over 30 new hooks added to 4.1.10- there will be a lot of new mods coming that will only work with 4.1.10 and above- you should upgrade.
Reply With Quote
Благодарность от:
OldSchoolDSL
  #8  
Old 01-16-2012, 05:05 PM
dacho's Avatar
dacho dacho is offline
 
Join Date: Dec 2004
Location: Tell-Aviv
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice mate... I will check it on my forum
Reply With Quote
  #9  
Old 01-16-2012, 06:40 PM
datoneer datoneer is offline
 
Join Date: Jul 2011
Posts: 453
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks man i'm waitin response from ry215 to ugrade my style...
Reply With Quote
Благодарность от:
BirdOPrey5
  #10  
Old 01-17-2012, 03:28 AM
puertoblack2003's Avatar
puertoblack2003 puertoblack2003 is offline
 
Join Date: Aug 2005
Location: Philadelphia
Posts: 1,073
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
Looking at this example URL from Photobucket:
Code:
http://i170.photobucket.com/albums/u267/bcblondie05/Bunny.jpg
It appears Photobucket does keep the original file name *Bunny" in this case, so yes it should work with Photobucket uploaded images.



Because the hook used by this mod was introduced in version 4.1.10, the only way it would work on older versions is with a manual file edit.

If you want to try in 4.1.8 you will need to edit your file /includes/class_bbcode.php

Find the function:

PHP Code:
    function handle_bbcode_img_match($link$fullsize false)
    {
        
$link $this->strip_smilies(str_replace('\\"''"'$link));

        
// remove double spaces -- fixes issues with wordwrap
        
$link str_replace(array('  ''"'), ''$link);

        
$retval = ($fullsize '<div class="size_fullsize">' '')  . '<img src="' .  $link '" border="0" alt="" />' . ($fullsize '</div>' '');

        return 
$retval;
    } 
and add the hook manually so it becomes:

PHP Code:
    function handle_bbcode_img_match($link$fullsize false)
    {
        
$link $this->strip_smilies(str_replace('\\"''"'$link));

        
// remove double spaces -- fixes issues with wordwrap
        
$link str_replace(array('  ''"'), ''$link);

        
$retval = ($fullsize '<div class="size_fullsize">' '')  . '<img src="' .  $link '" border="0" alt="" />' . ($fullsize '</div>' '');

        (
$hook vBulletinHook::fetch_hook('bbcode_img_match')) ? eval($hook) : false;

        return 
$retval;
    } 
You would also need to edit the xml file in the zip and change the min version near the top to 4.1.0 or any number less than or equal to your version.

Be warned though there were over 30 new hooks added to 4.1.10- there will be a lot of new mods coming that will only work with 4.1.10 and above- you should upgrade.
in 4.1.9 is different

from this

Code:
function handle_bbcode_img_match($link, $fullsize = false)
	{
		$link = $this->strip_smilies(str_replace('\\"', '"', $link));

		// remove double spaces -- fixes issues with wordwrap
		$link = str_replace(array('  ', '"'), '', $link);

		return  ($fullsize ? '<div class="size_fullsize">' : '')  . '<img src="' .  $link . '" border="0" alt="" />'
			. ($fullsize ? '</div>' : '');
	}
to this

Code:
function handle_bbcode_img_match($link, $fullsize = false)
	{
		$link = $this->strip_smilies(str_replace('\\"', '"', $link));

		// remove double spaces -- fixes issues with wordwrap
		$link = str_replace(array('  ', '"'), '', $link);

		return  ($fullsize ? '<div class="size_fullsize">' : '')  . '<img src="' .  $link . '" border="0" alt="" />'
			. ($fullsize ? '</div>' : '');
	 ($hook = vBulletinHook::fetch_hook('bbcode_img_match')) ? eval($hook) : false;
	}
and it worked thanks buddy:up:
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 08:42 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05182 seconds
  • Memory Usage 2,378KB
  • Queries Executed 24 (?)
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
  • (4)bbcode_code
  • (4)bbcode_php
  • (4)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
  • (6)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (3)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_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
  • 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
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete