![]() |
Quote:
Remember I'm not a coder, I just took two hacks and tried to combine them. I have no clue why it's not working in Opera. Maybe you'll have to let Opera identify itself as MS-IE. Quote:
Yes, there are three instances where you have to change the size to the one you want. The IE one is 800 ? 800. Quote:
When you're not, you can easely change the phrases to hardcode text. Quote:
And you're welcome. I needed this for myself, that's why I looked in to it :) |
Quote:
The code in the first post is the official hack by ggiegersdorf. I just costumized this code. The latest revision of my code is in post #38. This will resize every image when it's wider than the specified width. It does work in IE and Firefox. It doesn't seeme to work in Opera. |
S@NL - it's the funniest thing. My opera was setup to identify as IE. After your comment I went to check, switched it to "Identify as Opera" and it works :) Now it's working flawlessly, except I gotta work out how to properly add the tag on the bottom. Will get it tonight, and post here.
|
LOL, just let Opera work as designed (as itself that is) and it works :)
OK, that's good to know. I found a little bug though. It seemes that image url's with al space in it, that translates to %20, can not be displayed by this hack. Have to look into that.... |
Quote:
Thankx Man.. Its does'nt work on opera.....it could be okay some time..tho personally i use opera.. but theres a porbs ..it also resize sigs.....infact image posted in a post that image will be resize or thumnail (100X75) . our sigs limit is : 300X100. all of the sigs turn to 100X75 ... :ermm: can u tell me how to do that...this modification only works on image that posted in a post..& it will ignore the image in sigs.. plz let us know urgently...getting lots of complain from user..... :surprised: |
S@NL, now if you only could place the code in for the border with the "Click to see full size image" so that I dont have to break my brain trying to figure it out and fail, that would be awesome.
|
Quote:
Quote:
I don't know how to not make this work on sigs. As I said, I'm not a coder, nor do I support this hack. I just want to share some modifications I made to the code from ggiegersdorf. If you can't use it, then don't. I'm not gonna code stuff I don't want to use on my own board. The only thing I will do is try to sort out why some images aren't showing when there is some special character in it's url. For the rest you're on your own ;) |
got ur word.. S@NL - BlackBik
as i read it..it wont touch the image if the image, is smaller than defined size inside hack.... so now i can change resized image hack larger than sigs(300X100) like 300X225.. in that case it wont touch the sigs.. in that case it wont create thumbnail & wont touch the sigs?? hehe so many qus? rater should i PM the main author? :surprised: |
got ur word.. S@NL - BlackBik
as i read it..it wont touch the image if the image, is smaller than defined size inside hack.... so now i can change resized image hack larger than sigs(300X100) like 300X225.. in that case it wont touch the sigs.. in that case it wont create thumbnail & wont touch the sigs?? hehe so many qus? rater should i PM the main author? :surprised: umm want that this mod will create thumbnail to 100X100 but it wont touch sigs.so sigs size will remain as it is/was |
Quote:
Just to make images smaller so they don't mess up the forumlayout. That's why the sizecheck ONLY checks the width of the image and NOT the height. But now I understand your problem. And you understood ok, if you define the maximum width of a image bigger or as big as your signature images, it won't touch the them. |
Is it possible to have this resize modification only affect bbcode parsing when it is called from the vBadvanced news.php module?
I'd like to do something like the following, but I'm not sure of the exact syntax and whether or not I can determine the page/script name within class_bbcode.php. EDIT: Nevermind, I got it working 5 seconds after I posted with the following: Code:
if (THIS_SCRIPT == 'adv_index'){ |
OK guys,
Here is the last revision of my code. Finaly got it working: Code:
/* Start hack Image RESIZE */ Check if the database server is online Check if the image is available Check the width of the image If > 600 width, resize to 600 and place a link under it to click for the orginal image It doesn't touch the image when =< 600 width. The problem with not being able to cope with spaces or ampersands in the url is solved. If you are gonna use this, be sure to add the three phrases. You can costumize the width that you want as limit for resizing by changing the three instanses of "600" in the code to the limit you want. I don't want to take credit for this code because I did nothing else than changing the existing code that was allready there :) Enjoy :) |
seems to make the pages take alot longer to load...or is it just me?
|
Quote:
|
Quote:
That's because each picture is validated and that's a extra process in opening the page. Pages with no pictures of just a few will not be affected. |
Quote:
With "under it" I meant that when you hoover over the picture you see a resize message and the cursor changes into a hand. Then you can click the picture for a larger image. If you want this text litteraly under the picture, you might try this: Find: Code:
return '<a href="' . $link . '" target="_blank"><img src="' . $link . '" border="0" alt="' . $vbphrase['click_for_larger_image'] . '" style="width: expression(this.width > 600 ? 600 : true);" /></a>'; Code:
return '<a href="' . $link . '" target="_blank"><img src="' . $link . '" border="0" alt="' . $vbphrase['click_for_larger_image'] . '" style="width: expression(this.width > 600 ? 600 : true);" /><br><br>' . $vbphrase['click_for_larger_image'] . '</a>'; Again, don't forget to add the vbphrases, or substitute in above code ' . $vbphrase['click_for_larger_image'] .' for hard coded text like "Click for larger image". |
Quote:
Find in the code of post #52 the next code: Code:
// Image not found Code:
// Image not found |
Your code is good, but I have a lot of pictures in my forums. It took some seconds to saw the thread while the pictures are checked before the thread would be visible. The user think my forum is slow. Any chance to modify this, because I know the original code was f*cking fast
|
Sorry A-handreas, as I said before I'm not realy a coder. I just combined two pieces of code to make another one and succeeded (to my own suprise) to make that work.
I lowered the time-out variable on the @fsockopen() command from 5 to 2. That might speed things up a little. But I'm not aware of php code that could do those checks faster. Maybe some *real* coders know a quicker way. |
so it this hack like what you get on invision power boards?
when someone posts and image linked from another site/gallery it will resize the image so it keeps the thread structure aligned? if so, how do i insert this code? whats the final code that works? |
The final code that works is in the first post of the thread.
The code I tweaked is in post #52. Just read this thread and choose what you like. And as I don't know Invisionboard.... Well it may be the same and then again, it may not :D |
wicked mate cheers.
yeah work exactly like IPB. |
Heres the problem with this, it turns every [img] tag into a resize and link.
so now signature images are clickable. BOO |
yes i get the same error.
|
Quote:
But when you don't set your max image resize size in the hack to small and the sigpic max size to high, they will not be affected by this hack. On my board it's not a problem ;) |
Quote:
lots of my members created hyperlinked images in their signatures. sue to this hack the hyperlinks dont work. |
I looked at your forum and I see what you mean. That ain't cool, I agree.
But what is the size that you entered in the hack to let it kick in? When you set that to 600 pixels, you won't have a problem I guess. |
Quote:
|
which part of the code to i need to change to 600?
|
This (in bold)
Code:
if (stristr($navigator_user_agent, "msie")) { In the first line, the number after the greater then sign is the width above wich the hack will resize for Internet Explorer In the second line the number is just the width above wich the hack will do it's worst for Firefox and other browsers :) |
ok mine is exactly like that, so i need to change both to 600 or just the 640 ? 480?
|
Both is OK.
Than it will resize if the picture is bigger than 600 and will resize it to 600. But now I realize that the original hack by ggiegsdorf will always put a link on a picture. My version in post #52 doesn't do that, but it's performance is less quick in threads with a lot of pics. |
so if i use your code i won't have a problem?
Code:
/* Start hack Image RESIZE */ |
Thanks, installed
|
@Puntoboy, yes technicaly it works. It may slow down some pages with many pictures on it, but it doesn't touch images smaller than the width variable you use in the code.
Try it, and if you don't like it, than just get rid of it :) |
Quote:
after that I pm to the main coder... i got a reply that,,hes bizi with another hack.... i gez..he should have informed about this,,,taht lots of us are facing this problem.. we want it will re-size (thumbnail) every image hosted on imageshack or photobucket ...but it should ignore sigs image.. i think u can imform him abut ur probs.... Thankx Friendz |
Well, this isn't or ever was supported.
It's just a piece of code he has shared with us ;) I guess that if you don't like it, you just uninstall. The code in post #52 doesn't touch the sigs, but it has a performance problem. Because I don't know how to fix that I won't release it as a hack either ;) Just take the original code or my version if you like it. If not, don't use it. Maybe someone will come along that can sort the problems out and will release it as a working hack that doesn't get replies like "BOO". |
I have been reading this thread and working on a few things myself here. I have finally gotten the code to work 99.9% of the time in IE and Firefox I dont have nor want Opera so I have not tested this new code on it. The image are clickable but I'm working on one last thing which should make everyone here pretty happy.
(anyone who know the exact location of where signatures are displayed in the code of vbulletin please PM me I have a hack for hopefully fixing this issue also) Hopefully once I work out this issue it will be ready to upload to you.. Code and Hack required. |
Quote:
any one know it ? really a lots people will be benifited with this.. |
Quote:
PHP Code:
|
All times are GMT. The time now is 05:58 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:
|