vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   KX - Image Not Found (https://vborg.vbsupport.ru/showthread.php?t=196719)

Ziki 11-18-2008 10:00 PM

KX - Image Not Found
 
1 Attachment(s)
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:14 PM

~Reserved~

nerofix 11-19-2008 08:47 PM

Very nice idea :)

Would need this for deleted user album pictures... somethings there still exists links to a user album picture, but the user has already deleted this picture again and it causes the error messages "invalid picture, if you followed a valid link, please contact the administrator" ... this message is just wrong and I don't want to be contacted lol.

Hornstar 11-20-2008 05:23 AM

Thanks for this, ill check it out in a bit :)

Barakat 11-20-2008 11:02 AM

Code:

Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in /home/southcalif//public_html/forums/includes/class_bbcode.php on line 1990
.

Ziki 11-20-2008 11:28 AM

Ah sorry I forgot.

Barakat 11-20-2008 12:52 PM

Quote:

Originally Posted by Ziki (Post 1669280)
Ah sorry I forgot.

okay waitting for u

Ziki 11-20-2008 01:05 PM

Yes it is already fixed

Leo Brazil 11-21-2008 06:26 PM

Great Idea. Installed !!!

laurens800 12-29-2008 07:20 PM

but remember fsocketopen uses pretty much of your memory resources,

well could not harm your site but if you got alot of users it could increase your memory usage alot

cheech47 02-10-2009 11:45 AM

No image shows, have Rebuild Post Cache and have the "no image" URL in place but still just shows as nothing :(

ackack 02-13-2009 09:49 AM

I can't find this code in class_core :((
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="" />';
        }


Ziki 02-13-2009 11:55 AM

It's in class_bbcode.php :)

cjwinternet 03-11-2009 08:10 PM

What's the point in this? After all, if you're linking to photobucket and there's no image, they display their own message with no load penalty to yourself.

Ziki 03-12-2009 11:55 AM

But not every host displays such images.

Sunka 03-13-2009 09:09 AM

Quote:

Originally Posted by laurens800 (Post 1696665)
but remember fsocketopen uses pretty much of your memory resources,

well could not harm your site but if you got alot of users it could increase your memory usage alot

Is that true?
If I have many deleted images...will that with that MOD be to bad for forum when users read topics?

Ramya108 08-22-2009 11:36 PM

Does not work!!!

TheLastSuperman 08-22-2009 11:40 PM

Quote:

Originally Posted by Ramya108 (Post 1872393)
Does not work!!!

Why? Can you be more specific?? Have you thought it just might be on your end? I have no need for this but yet again another quick "this don't work" and nothing else to go off of!

Come on people, we're already sitting behind a computer no sense being lazy type us up some info!

Gunturz 10-21-2009 02:06 AM

does this compatible to img resize ?
i've replace the code from class_bbcode.php, but it doesn't work.
only blank post appear when the img path is broken

DamasGate 06-10-2016 11:22 PM

Installed but not working on my forum 3.8.5

Nothing changed, the old X images still on all pages

Installed
edited class_bbcode.php
Updated Post Cache
Sitting the hack ON

Any one can help please ?


All times are GMT. The time now is 05:28 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.01114 seconds
  • Memory Usage 1,757KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)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