vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Big Picture messing up your design? Install this (https://vborg.vbsupport.ru/showthread.php?t=63458)

vau7 04-17-2004 04:37 PM

Thanks, i think it works!

mikeee 04-17-2004 09:20 PM

Can anyone tell me why this doesnt work on my board? The install is quite simple, I double checked everything and it is installed correctly on my VB3

I am not getting any java error, no board error, it's as if I never modified anything. Any ideas? :ermm:

mtha 05-16-2004 06:19 PM

Quote:

Originally Posted by Raimund
to check if the file/image exists, replace the following in functions_bbcodeparse.php
Code:

...
        $image= ($link);
 
        if (@fclose(@fopen("$image", "r"))) {
        $img_width = getimagesize($link);
...
        }

Raimund

:) this is nice, but I run into another problem. My member sometime post WRONG images, they post html links as image something like [img]http://w.w.w/a.html[/img]
which would give errors:
"Unable to add cookies, header already sent..."
and
"Warning: getimagesize(): stream does not support seeking ..."

how should I check if the link IS image (based on image extension?), before checking if it exist?

should I use
$ext = strrchr($image, ".");
or use
exif_imagetype("$image")
or something else?

alkahf 05-18-2004 12:56 PM

Hello
Quote:

Originally Posted by Raimund
to check if the file/image exists, replace the following in functions_bbcodeparse.php
with

Code:

// ###################### Start handle_bbcode_img_match #######################
// this is only called by handle_bbcode_img
function handle_bbcode_img_match($link)
{
        // IMPORTANT - REPLACE THE FOLLOWING 3 VARIALBS WITH YOUR INFORMATION
        $img_replacement = "images/buttons/imagebig.gif"; // <-- This is the button/image that will be displayed instead of the big image.
        $img_replacement2 = "images/buttons/imagenotexist.gif"; // <-- This is the button/image that will be displayed if file does not exist.
        $img_max_width = 640; // <-- This is the maximum width that an image is allowed to be viewed safely.
       
        $link = strip_smilies(str_replace('\\"', '"', $link));
       
        // remove double spaces -- fixes issues with wordwrap
        $link = str_replace('  ', '', $link);
        $image= ($link);

        if (@fclose(@fopen("$image", "r"))) {
        $img_width = getimagesize($link);
        if ($img_width[0] > $img_max_width) {
                srand((double)microtime()*1000000);
                $number = rand(10,100);

                $inp_string = "<a href=\"javascript:toggle_imgview('bigimg".$number."')\"><img src=\"".$img_replacement."\" alt=\"\" border=\"0\" /></a><br />\n";
                $inp_string .= "<div style=\"position:absolute;display:none;z-index:1;\" id=\"bigimg".$number."\"><img src=\"".$link."\" border=\"0\" alt=\"\" /></div>";

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

Raimund


What about these errors?

Code:

Warning: getimagesize(): stream does not support seeking in /home/client/public_html/vb/includes/functions_bbcodeparse.php on line 1023

Warning: getimagesize(): stream does not support seeking in /home/client/public_html/vb/includes/functions_bbcodeparse.php on line 1023

Warning: getimagesize(): stream does not support seeking in /home/client/public_html/vb/includes/functions_bbcodeparse.php on line 1023

Warning: getimagesize(): stream does not support seeking in /home/client/public_html/vb/includes/functions_bbcodeparse.php on line 1023

Thank you
alkahf

WEForums 05-24-2004 04:13 AM

Installed this and got errors galore. I'm guessing it has to do with my server, though.

What is required?

(I'd post the errors but there were so many that I had to fix it immediately. I'll post them later if you're interested)

marcjd 06-16-2004 05:06 PM

It would be nice to have a feature like this for signatures. I want to allow the use of the image tag in sigs., but would also like to control the size of the displayed image. Thanks.

Sir_Yaro 06-26-2004 06:41 PM

Quote:

Originally Posted by Raimund
to check if the file/image exists, replace the following in functions_bbcodeparse.php

Code:

// ###################### Start handle_bbcode_img_match #######################
// this is only called by handle_bbcode_img
function handle_bbcode_img_match($link)
{
        // IMPORTANT - REPLACE THE FOLLOWING 3 VARIALBS WITH YOUR INFORMATION
        $img_replacement = "images/buttons/imagebig.gif"; // <-- This is the button/image that will be displayed instead of the big image.
        $img_replacement2 = "images/buttons/imagenotexist.gif"; // <-- This is the button/image that will be displayed if file does not exist.
        $img_max_width = 640; // <-- This is the maximum width that an image is allowed to be viewed safely.
       
        $link = strip_smilies(str_replace('\\"', '"', $link));
       
        // remove double spaces -- fixes issues with wordwrap
        $link = str_replace('  ', '', $link);
        $image= ($link);

        if (@fclose(@fopen("$image", "r"))) {
        $img_width = getimagesize($link);
        if ($img_width[0] > $img_max_width) {
                srand((double)microtime()*1000000);
                $number = rand(10,100);

                $inp_string = "<a href=\"javascript:toggle_imgview('bigimg".$number."')\"><img src=\"".$img_replacement."\" alt=\"\" border=\"0\" /></a><br />\n";
                $inp_string .= "<div style=\"position:absolute;display:none;z-index:1;\" id=\"bigimg".$number."\"><img src=\"".$link."\" border=\"0\" alt=\"\" /></div>";

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

Raimund

after this modyfication i can see right pictures but after clicking on them nothing is happening

NuclioN 06-27-2004 03:26 PM

It shows the image correct but text under the image is underlined a behaves as a link. (??)

Sir_Yaro 06-28-2004 08:53 AM

<a href="http://justget.org/showpost.php?p=102313&postcount=18" target="_blank">http://justget.org/showpost.php?p=102313&postcount=18</a>

jugo 07-13-2004 11:53 PM

Quote:

Originally Posted by tnguy3n
interesting, but does it work for images that link from other servers?


YES.....BUT READ THIS:

If the image is not found on the remote host wether it be that the image was deleted or the host no longer responds, 2 things happen:

1. The thread takes forever to load.
2. It errors out and it does not display the thread.

I tried to get the correct error in here but while trying to get the error to display I lost my patience and put my mouse through my monitor.

I just got back from CompUSA (sale on 19inch monitors by the way...good deals)....and I was not going to risk losing it again.

P.S. the mouse survived.


All times are GMT. The time now is 06:45 AM.

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.01611 seconds
  • Memory Usage 1,755KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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