Back to vBulletin 3.7 Add-ons

KX - Image Not Found
Mod Version: 1.0.0, by Ziki

This modification is in the archives.
vB Version: 3.7.x Rating: (1 vote - 5.00 average) Installs: 12
Released: 19 Nov 2008 Last Update: 20 Nov 2008 Downloads: 45
Not Supported Code Changes Translations  

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.

Download

This modification is archived, downloads are still allowed.

File Type: %1$s kx_noimg.zip (1.3 KB, 45 downloads)

Similar Mods

KX - Image Not Found vBulletin 3.8 Add-ons

vblts.ru supports vBulletin®, 2022-2024