vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   New Posting Features - Add Alt Text to Linked Images by BOP5 (VB 4.1.10+) (https://vborg.vbsupport.ru/showthread.php?t=277033)

BirdOPrey5 01-14-2012 11:00 PM

Add Alt Text to Linked Images by BOP5 (VB 4.1.10+)
 
1 Attachment(s)


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:

BirdOPrey5 01-15-2012 09:49 PM

Reserved.

Merjawy 01-15-2012 11:52 PM

Nice,...

Will check it out. Thanks

fizzow 01-16-2012 12:51 AM

Will this mod work if members upload images via 3rd party image hosting like Photobucket?

datoneer 01-16-2012 01:08 AM

Why only 4.1.10 i want this mod, can you make it work for 4.1.8 please. Thanks

OldSchoolDSL 01-16-2012 03:22 AM

Quote:

Originally Posted by datoneer (Post 2288365)
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)

BirdOPrey5 01-16-2012 11:59 AM

Quote:

Originally Posted by fizzow (Post 2288358)
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 (Post 2288365)
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.

dacho 01-16-2012 05:05 PM

nice mate... I will check it on my forum

datoneer 01-16-2012 06:40 PM

Thanks man i'm waitin response from ry215 to ugrade my style...

puertoblack2003 01-17-2012 03:28 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2288511)
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:


All times are GMT. The time now is 02:05 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.01104 seconds
  • Memory Usage 1,785KB
  • 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
  • (4)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete