vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   BB Code Enhancements - KX - Image Not Found (https://vborg.vbsupport.ru/showthread.php?t=196718)

Ziki 11-18-2008 10:00 PM

KX - Image Not Found
 
This modification was brought to you by
KXDesign
http://www.kxdesign.com/


~Modification name
Image Not Found

~Modification description
This modification shows an "Image not found" image if the image in the [IMG] bbcode could not be found.Very good if you have lots of posts with images from imageshack or photobucket.

~Modification options
  • Enable?
  • Image Path?

~Modification info
File uploads: 0
File edits: 1
Templates: 0
Template edits: 0
Plugins: 0
SQL Queries: 0
Phrases: 5
Settings: 2
Hooks: 0

Install time: 1 min
Install level: Light

~Modification installation

Step 1: Import product

Step 2: Open file includes/class_bbcode.php and find:

Code:

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

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

                return '<img src="' .  $link . '" border="0" alt="" />';
        }

Replace with:

Code:

function handle_bbcode_img_match($link)
        { 
                $link = $this->strip_smilies(str_replace('\\"', '"', $link));
                // remove double spaces -- fixes issues with wordwrap
                $link = str_replace(array('  ', '"'), '', $link);
               
                if ($this->registry->options['kx_noimg_onoff'])
                {
                $check = @fsockopen($link, 80, $errno, $errstr, $this->registry->GPC['timeout']);
               
                if ($check == true)
                {
        $link = $this->registry->options['kx_noimg_path'];         
        }
            unset($check);
            }

                return '<img src="' .  $link . '" border="0" alt="" />';
        }


~Modification screenshots
None


~Modification changelog
  • 1.0.0 - First Release


~Modification copyright
This may not be distributed,released or claimed as your work without author's permission.

Ziki 11-19-2008 07:11 PM

~Reserved~

gwerzal 11-20-2008 12:17 AM

Thanks for sharing

anhpt 11-20-2008 01:25 AM

Nice work! Thanks!

Q-v-n-s-Q 11-21-2008 02:35 AM

not bad, thanks

maxicep 11-25-2008 01:42 PM

Would be better if u working with plugins only ..

Ziki 11-25-2008 02:32 PM

I can't :)


All times are GMT. The time now is 03:38 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.01764 seconds
  • Memory Usage 1,731KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete