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)
-   -   Wide image automatic resize for html and vB tags in posts - fixes template problems (https://vborg.vbsupport.ru/showthread.php?t=67743)

johnnyb 10-03-2004 11:35 PM

Bump!

Agent XY 10-10-2004 10:20 AM

?hm, the attach in 1st posting are stable running? Or must I modify the code with answer of this thread??

.. on vB 3.0.3


(sorry for the bad english :))

johnnyb 10-10-2004 06:16 PM

This script takes forever to load on my forum, is becoming a pain! Anyway of fixing this?

MrD 10-25-2004 02:55 AM

Hi,

Quote:

Originally Posted by johnnyb

vBulletin Message is this:

PHP Code:

Unable to add cookiesheader already sent.
File: /home/blazini/public_html/forums/includes/functions_bbcodeparse.php
Line
1134 


i become the same error :(

EricR 10-25-2004 04:27 PM

Quote:

Originally Posted by johnnyb
This script takes forever to load on my forum, is becoming a pain! Anyway of fixing this?

Ditto, I had to remove it :( For threads with many images it fell to a crawl, and often my browser would time out on it. I removed this hack and the speed is back, but I sure do miss the resizing. Large images just screw everything up.

Steve, any thoughts on how to make this more friendly with multiple images?

Yevgeny 11-01-2004 01:18 PM

Works great for me. Tahnks

SVTBlackLight01 11-06-2004 11:39 AM

Quote:

Originally Posted by EricR
Ditto, I had to remove it :( For threads with many images it fell to a crawl, and often my browser would time out on it. I removed this hack and the speed is back, but I sure do miss the resizing. Large images just screw everything up.

Steve, any thoughts on how to make this more friendly with multiple images?

Same here. Any follow up in this?

seraphex 12-02-2004 04:03 AM

I've removed the hack because it slowed down the forums.. I then installed dis.pater's instead and it works great. Just a note for people with the inline moderation tools. I used this for the <body onload:

Code:

<body onload="$onload; inline_init($thread[threadid], 'post'); fiImageResize()">
Seems to have worked out ok :)

Nice work Dis.pater!

j_86 12-02-2004 05:36 PM

I'm using the javascript version above. Any reason why this would cause my Post Reply (bottom) button to have the same dotted border when there is a post that has been resized?

Tradjick 12-03-2004 12:04 PM

The server downloads the image, then resizes it, gives all of the images to the client and only then the html must been sent to the browser. That?s probably why it takes so long.
This will also probably timeout the spiders. :(

Tradjick 12-03-2004 01:50 PM

Here?s the one I just found. It?s client side and very quick!

https://vborg.vbsupport.ru/showthread.php?t=68677

I thought i should inform some of the people that didn?t notice that hack.

Have a nice day.

dwh 12-13-2004 08:10 PM

I went through a few pages but haven't seen this question. Apologies if someone asked this. I just want to turn all outside images into links rather than an inline display while leaving attached images to thumbnails (as it works now)

dwh 12-17-2004 08:45 PM

Quote:

Originally Posted by dwh
I went through a few pages but haven't seen this question. Apologies if someone asked this. I just want to turn all outside images into links rather than an inline display while leaving attached images to thumbnails (as it works now)

Anyone have ideas?

Mechanical Mind 12-18-2004 11:11 AM

Quote:

Originally Posted by dwh
Anyone have ideas?

This should be an option already available in vBulletin 3.0.3. You just disallow IMG in the affected forum and any images attempted to be posted will be a link.

dwh 12-18-2004 03:20 PM

Quote:

Originally Posted by Mechanical Mind
This should be an option already available in vBulletin 3.0.3. You just disallow IMG in the affected forum and any images attempted to be posted will be a link.

It doesn't seem to be an option. But I got a workaround http://www.vbulletin.com/forum/showt...810#post779810

SVTBlackLight01 12-18-2004 10:50 PM

Quote:

Originally Posted by Mechanical Mind
This should be an option already available in vBulletin 3.0.3. You just disallow IMG in the affected forum and any images attempted to be posted will be a link.

What would be nice would be to turn any image over a certain size into a link instead of resizing it.

Steve St.Lauren 12-19-2004 04:32 PM

Quote:

Originally Posted by SVTBlackLight01
What would be nice would be to turn any image over a certain size into a link instead of resizing it.

That wouldn't be hard at all - this hack could be easily modified to do that. Just change lines 90 and 91 in the hack file from this:

$bbtag = '<table><tr><td align="center"><a href="' . $link . '"><img src="' . $link . '" width="'.$max_imgsize.'" border="0"'.substr($bbtag,$linkclose+1,strlen($bbt ag)-$linkclose+1).'<br>Picture has been resized, click for full size pic</a></td></tr></table>';

to this:

$bbtag = '<table><tr><td align="center"><a href="' . $link . '">' . $link . '</a></td></tr></table>';

and lines 214 & 215 of the hack file from:

$biglink = '<table><tr><td align="center"><a href="' . $link . '" ><img src="' . $link . '" width="'.$max_imgsize.'" border="0" alt=""><br>Picture has been resized, click for full size pic</a></td></tr></table>';

to:

$biglink = '<table><tr><td align="center"><a href="' . $link . '" >' . $link . '</a></td></tr></table>';

That should do what you are looking for. If you want to add some text in there as well as the link address put it right after the > just before ' . $link

If you want to replace the link address with text remove the ' . $link . ' between the > and < and place whatever text you want there.

Gnappy 12-22-2004 04:54 PM

this hack really rox, thx Steve!

[high]* Gnappy install ^^
[/high]



but i have a little question.. on my forums many ppl uses to upload images on forum, and for these images i added this tag, used to see this kind of pictures(with url dont finish with .jpg, .gif, .jpeg, etc..) i called this tag [card] (i think many other ppl here uses this tag) and it works like this:
Code:

<img src="{param}">
now, when i use [img] tag ur hack works nicely, but when i use the tag card for a forum uploaded images, the hack dont work. Its obviously that this hack is made just to be applicated to [img] tag, BUT can u tell me how can i use this nice hack to my [card] tags?

thx a lot for replies :o

HaloImpulse 12-22-2004 07:25 PM

alright, I used this on my forums when we were hosted by a hosting company called EPGservers, but we recently rented a dedicated machine from http://servermatrix.com/, the 2.4 machine, and now this hack doesnt work. Any suggestions?

Steve St.Lauren 12-23-2004 01:21 AM

Quote:

Originally Posted by HaloImpulse
alright, I used this on my forums when we were hosted by a hosting company called EPGservers, but we recently rented a dedicated machine from http://servermatrix.com/, the 2.4 machine, and now this hack doesnt work. Any suggestions?

What version of php are you running on that server? Some versions of php have trouble with the imagesize function.

HaloImpulse 12-24-2004 05:42 PM

Apache version 1.3.33 (Unix)

PHP version 4.3.9

MySQL version 4.0.22-standard

Steve St.Lauren 12-27-2004 03:11 PM

Quote:

Originally Posted by HaloImpulse
Apache version 1.3.33 (Unix)

PHP version 4.3.9

MySQL version 4.0.22-standard

I'm running Apache 1.3.29 and PHP version 4.3.6 and it's working fine here. Not sure what your problem is. Is it not resizing the pictures at all? Error message?

HaloImpulse 12-27-2004 07:20 PM

Error message, something about T-Strings. I replaced the files with the originals so i forget what teh exact message was...

Steve St.Lauren 12-28-2004 01:27 AM

Quote:

Originally Posted by HaloImpulse
Error message, something about T-Strings. I replaced the files with the originals so i forget what teh exact message was...

I'd need to know what that error message was but my guess would be that a mistake was made in installing the hack. Were you using the exact same files you were on the other server or did you start fresh? The php issue won't give an error message it just won't function correctly.

Steve St.Lauren 12-28-2004 01:28 AM

Quote:

Originally Posted by Gnappy
this hack really rox, thx Steve!

[high]* Gnappy install ^^
[/high]



but i have a little question.. on my forums many ppl uses to upload images on forum, and for these images i added this tag, used to see this kind of pictures(with url dont finish with .jpg, .gif, .jpeg, etc..) i called this tag [card] (i think many other ppl here uses this tag) and it works like this:
Code:

<img src="{param}">
now, when i use [img] tag ur hack works nicely, but when i use the tag card for a forum uploaded images, the hack dont work. Its obviously that this hack is made just to be applicated to [img] tag, BUT can u tell me how can i use this nice hack to my [card] tags?

thx a lot for replies :o

I'll take a look at this when I get a chance. I'm recovering from working 90+ hrs a week for a few weeks and don't really feel like digging into code right now.

HaloImpulse 12-31-2004 01:21 AM

Quote:

Originally Posted by Steve St.Lauren
I'd need to know what that error message was but my guess would be that a mistake was made in installing the hack. Were you using the exact same files you were on the other server or did you start fresh? The php issue won't give an error message it just won't function correctly.

yes, i used the same files. When that didnt work, i reinstalled the hack, and it still didnt work. Then to insure that another hack wasnt screwing wiht it, i installed vb all over again and tried it on a brand new installation. No workage. Im running 3.0.3, if thats any consolation

HaloImpulse 01-04-2005 01:40 PM

were switching to a new more powerful server soon, so hopefully it will work after that

FWF 01-11-2005 11:55 PM

ive got this installed, and i have a section where people post more then 1 image and its taking FOREVER for a page to load with all the images....any ideas ?

EricR 01-17-2005 09:56 PM

Quote:

Originally Posted by FWF
ive got this installed, and i have a section where people post more then 1 image and its taking FOREVER for a page to load with all the images....any ideas ?

Go back to post #83 and start reading from there. Steve has a possible solution in post #97 but I haven't tried it yet. I removed the hack because of the slowdown with multiple images, but I may give his suggestion a try and see if it helps.

Gnappy 01-18-2005 03:17 PM

Quote:

Originally Posted by Steve St.Lauren
I'll take a look at this when I get a chance. I'm recovering from working 90+ hrs a week for a few weeks and don't really feel like digging into code right now.

thx a lot for assistance, ill wait for ur reply.. ^^

rodriguez 01-19-2005 09:47 PM

Fit perfectly. There is some display probleme if you are using The "Attachments Styles with Attachments in Events" but hey .. that only in Template ;)

Thanks u

BlasterT3 01-25-2005 10:08 PM

flawless install on vb 3.0.6

thanks

alfata 02-02-2005 05:04 AM

it works fine with me on 3.0.6

but i wonder is there a way to make the pic open in new window ,also adding alt var for the pic to give "Picture has been resized, click for full size pic" msg, it is better than shown below the pic....


many thax to the coder :D
*install

Steve St.Lauren 02-05-2005 01:48 AM

Quote:

Originally Posted by alfata
it works fine with me on 3.0.6

but i wonder is there a way to make the pic open in new window ,also adding alt var for the pic to give "Picture has been resized, click for full size pic" msg, it is better than shown below the pic....


many thax to the coder :D
*install

The mod to change it to open in another window was near the beginning of this thread. Here it is again with your request of adding the "Picture has been resi"....... msg to the alt tag as well:

You would add it into these lines:

in the first part:

$bbtag = '<table><tr><td align="center"><a href="' . $link . '"><img src="' . $link . '" width="'.$max_imgsize.'" border="0"'.substr($bbtag,$linkclose+1,strlen($bbt ag)-$linkclose+1).'<br>Picture has been resized, click for full size pic</a></td></tr></table>';

would become:

$bbtag = '<table><tr><td align="center"><a href="' . $link . '" target="_blank"><img src="' . $link . '" width="'.$max_imgsize.'" border="0"' alt="Picture has been resized, click for full size pic".substr($bbtag,$linkclose+1,strlen($bbtag)-$linkclose+1).'<br>Picture has been resized, click for full size pic</a></td></tr></table>';

and in the second section:

$biglink = '<table><tr><td align="center"><a href="' . $link . '" ><img src="' . $link . '" width="'.$max_imgsize.'" border="0" alt=""><br>Picture has been resized, click for full size pic</a></td></tr></table>';

would become:

$biglink = '<table><tr><td align="center"><a href="' . $link . '" target="_blank"><img src="' . $link . '" width="'.$max_imgsize.'" border="0" alt="Picture has been resized, click for full size pic"><br>Picture has been resized, click for full size pic</a></td></tr></table>';

If you want to remove the "Picture has been resiz".... text from below the pic just remove the

<br>Picture has been resize, click for full size pic

text out of both of those sections.

Reece D 03-01-2005 10:29 AM

*installed* great hack cheers mate

AllJin.com 03-10-2005 10:34 PM

Does this work for Sigs as well?

Scarab 03-22-2005 08:52 AM

My thanks to you for this.
Now I don't have to worry about the idiots that can't read the forum rules for image restrictions. :banana:

AllenMead 03-23-2005 09:11 PM

This is absolutely superb!!!! Clicks install

ThePimp 03-29-2005 09:43 PM

Quote:

Originally Posted by dis.pater
Correct :)


I placed it in a separate javascript file which I called resizeall.js and uploaded it to the clientscript directory of vB.
All you should do then is add this line at the bottom of headinclude (you find it under common templates in the template manager).
Code:

<script type="text/javascript" src="clientscript/resizeall.js"></script>
At last you should change the onload in the body tag of the showthread template.
On my board, with vB3.3 the body tag now looks like this
Code:

<body onload="$onload; fiImageResize()">

Is there a way to get your image resize method to work on "threadreviewbits", in the "New Reply" page?

knetgummi 04-14-2005 09:21 PM

thank u very much and *installed*

greetZ
knetgummi


All times are GMT. The time now is 09:20 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.01531 seconds
  • Memory Usage 1,842KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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