![]() |
Big Picture messing up your design? Install this
What does this hack do?
This hack will check if an image that a member of your forums has inserted in the post is below the allowable width. If not, the image will be replaced with a small button that basicly says "Image too big, click here to view". When clicked, the image will appear right in the post but without messing up your forum design one bit. Example? Working example can be found here: http://www.designworldwide.com/forum/t35-s.html (note: This is on VB2 but should have the same effect. If you installed it on Vb3, send me a link so I can post it here) VB2 thread if anyone wants it: https://vborg.vbsupport.ru/showthread.php?t=63429 Please post any bugs/comments/questions here. While making this hack I had some trouble with reg. expressions and had to go around them a little (php developers can see this). Ive been coding for years now but never had the need to learn those :p Image: https://vborg.vbsupport.ru/showthrea...725#post495725 (Image now included in ZIP) Anyways, Enjoy! Dimitry |
u got a pic we can use?
|
Completely slipped my mind
Here's one I made quickly Dimitry |
if there have many images in on post the getimagesize function maybe slowly.
|
interesting, but does it work for images that link from other servers?
|
a nice mode you have
|
object js error :( (object required: line 722 - character 2 in showthread.php)
It is displaying the image but with that error |
oooh now this is handy :D thnx a lot this is gonna save a few headaches with clients :D
|
I tried this on VB3, nothing changed. Doesnt display the image too big button, doesnt give errors. Strange.
|
very very nice mod
|
Is there a way to have the button say "Close this image" (or something like that) after clicking it to open it? I had to play with it to figure out I had to hit the same button to close the image. ;)
|
I dont have VB3 myself (Have Vb2 installed on my server), so I cant test the hack. It was made blindfolded (after testing with Vb2 of course).
If anyone whos having trouble is willing to give me access to their server, Ill be willing to figure it out and fix the hack. Sorry, not much time this morning, Ill reply to all posts in a few hours Dimitry |
Installed at: www.scifi-meshes.com and working fine.
It turns on a layer with the image when you click on the button. I'm concerned that this will work in all browsers.. but it looks fine in IE for me. Aceman |
I've found that for images that are say 1024x768 the icon shows up fine. But for some reason I have to reload the page sometimes to get it to work and show the layer with the image when you click on it. Additionally, some images only showed part of the images, it's like it would only show upto the hieght of the post. I think this pertained to threads that were posted before I put in the hack. But new threads seemed to show all the image. It's like it didn't know how tall the image was. (pulled this hack from server pending a revision.. but I really would like to use it.)
Is it possible to modify the code so that it just pops up another window completely with just the image, rather then show it in a hidden layer? Aceman |
Quote:
Yes, it's really easy to make it open in a new window. I will add 2 revisions of the hack later today. One will be so you can use text instead of an image. And 2nd, to open in a new window. Thanks for the ideas Dimitry |
Any solution for the javascript error? :)
|
Quote:
Dimitry |
very nice mod.
I would still display the image with the limitation of width=$img_max_width PHP Code:
|
It runs perfectly ( No Problems in Opera with the js )
THANK YOU! |
Nice,
Glad to hear that. I really dont see a reason why JS would give problems. Its very basic code (1 line). Can you post a link? :) Dimitry |
a very nice idea.
Heard from it in the german vB-Forums and tried it. But , unfortunately the hack did not work quite properly. Esp. in Mozilla and Netscape the window with the picture did not open itself. Also it is not working with IE5, only with IE 6. The 2nd problem: If there is a thread with many pictures u can not klick one of the samll replacements pics at once. u have to wait until all pictures in the thread are loaded. If u klick to early no picture will load properly anymore and the pics will open for example 1/ 3rd of its size. But when these problems are dealed with then i might insatll again because its a good idea. THX |
There was a problem with Javascript. Not the actual JS, but the code executed an extra command that is NOT needed (This is a personal mod I did on my forum and forgot to undo changes)
Fix is attached (Tried just putting it in the reply but VB was replacing my code for some reason) Dimitry |
Tnx for the fix, works great now. :)
|
Another Problem:
Sometimes i get this Error: Quote:
And if a whole Thread isnt reachable this Hack is not so good at all. Without this Error it is an absolut galant and beautiful way to solve this Problem. But can you fix this error? That would be great! |
This is the error I seemed to be getting a LOT lately on my server after it took about 2 mins of loading time.
The problem seems to be with that function retrieving the image at times. This is not the code's fault. It's either server's, GD library's, or PHP, I have yet to figure it out. Ill post here as soon as I get more info on this. On my forum I had to completely disable the hack which sux because I made it :p Dimitry |
Yes, i know that the fault isnt in the code. But there must be a way to handle it. :ermm:
|
I figured everything out.
Had to restart some processes on my server to get it working so it wasnt the hacks fault. Ive added a security check that checks if the file actually exists or not. And also added a Slowdown function, which will wait 1500 miliseconds before checking each minute. This helps the previous check to be finished and server doesnt get overloaded with constant outgoing connections piled up one on one (if you have a bunch [img] in thread). This barely slows down the load of the thread, 1500 miliseconds is nothing really, but enough (or SHOULD be enough) for server to complete previous task). I will post the upgrade and update the hack later today when I get home :) Dimitry [edit] Here's what broken images look like :) Replaced with text: http://www.designworldwide.com/forum...id=172#post172 |
Quote:
Thats awesome! |
Something new bout the security check update?
|
to check if the file/image exists, replace the following in functions_bbcodeparse.php
Code:
// ###################### Start handle_bbcode_img_match ####################### Code:
// ###################### Start handle_bbcode_img_match ####################### |
Thanks, i think it works!
|
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: |
Quote:
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? |
Hello
Quote:
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 alkahf |
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) |
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.
|
Quote:
|
It shows the image correct but text under the image is underlined a behaves as a link. (??)
|
<a href="http://justget.org/showpost.php?p=102313&postcount=18" target="_blank">http://justget.org/showpost.php?p=102313&postcount=18</a>
|
Quote:
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 04:47 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|