vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Show Thread Enhancements - CES Dynamic [IMG] Resize (Plugin Version) (https://vborg.vbsupport.ru/showthread.php?t=157428)

xandizitxu 09-14-2007 01:42 AM

Quote:

Originally Posted by thincom2000 (Post 1338691)
I checked your site and it seems to be working as designed in IE.

on my IE 7.0 don't :(

thincom2000 09-14-2007 02:08 AM

Hm... I don't know what to say. I have tested your site in both normal and 64-bit Internet Explorer 7, and haven't seen any issues. Try clearing your browser cache, maybe?

Dave_W 09-14-2007 09:18 AM

Hey, installed on my site, works a charm, although I seem to be getting the problem where Sig images get turned into URL's. I think you addressed this problem already so i'll check and get back to you. Either way this works great, i'm clicking installed because me and my members love this.

-Dave (http://www.TheBestCaseScenario.com/forum)

EDIT: Fixed by rebuilding Sig cache, nominated for MOTM.

offline 09-14-2007 02:23 PM

I have installed your mod and it resizes everything properly but I have a few issues...

1. When using in conjunction with vbadvanced I get the "resized" message no mater what my setting are. View my front page, I have a test image posted... http://www.chattanoogans.com/

2. When viewing the message it doesnt make the image clicable to view the orginal image even when I have the option set. You can view the message at...
http://www.chattanoogans.com/forums/...size-test.html

PS. Using IE 7

mrghostno1 09-14-2007 03:14 PM

Quote:

What mods are you using with plugins using the bbcode_parse_start hook?
I'm not sure about this, but i'm using SID's hide hack and I had vBAnonymizer (unistalled atm).

thincom2000 09-14-2007 03:14 PM

@offline, I don't know if you changed something or not. I checked and saw it working as you described in IE 7. Then after 30 mins of trying to figure it out I refreshed the page and it's working as designed...

@mrghostno1, thanks for getting back to me with this. It gives me somewhere to start looking.

thincom2000 09-14-2007 03:41 PM

For users using sid's [hide] hack...

The issue is that AFTER all the parsing is done for a post, the [hide] hack reparses the post. This would not be a problem if the post was reparsed properly. But a huge number of coders are under the misconception that using the function $bbcode->do_parse() is the best way to do this.

The truth is, that do_parse bypasses the bbcode_parse_start hook, which breaks any modifications that may be using it. Not only that, but it still runs bbcode_parse_complete, which can create even more problems when bbcode_parse_start was never called.

So if you're using the hide hack (or potentially any other hack that runs do_parse)

In the postbit_display_complete plugin, find:
PHP Code:

                $hide_post['message'] = $parser->do_parse($hide_post['message'],true); 

Replace with:
PHP Code:

                $hide_post['message'] = $parser->parse($hide_post['message'], $this->thread['forumid']); 


mrghostno1 09-14-2007 05:47 PM

Thnks thincom200, but... didn't work :( still got the same.
btw, i found this code only under "hide hack ajax request"
There's also a "fetch hide tag" with postbit_display_complete, but couldn't find that code.

Other plugins using postbit_display_complete
  • Last seen online (Postbit)
  • Warning System (Postbit)

offline 09-14-2007 06:25 PM

Quote:

Originally Posted by thincom2000 (Post 1338956)
@offline, I don't know if you changed something or not. I checked and saw it working as you described in IE 7. Then after 30 mins of trying to figure it out I refreshed the page and it's working as designed...

@mrghostno1, thanks for getting back to me with this. It gives me somewhere to start looking.

Wierd, it still doesnt work for me, give me an error on the bottom of the page and I still can't click on the image.

offline 09-14-2007 06:52 PM

I went home and tried it and when I first viewed chattanoogans.com home page it loaded with no errors then I click on the message title above it "Image Resize Test" viewing the message then I click the back button to bring me back to the home page and then the error came up.

thincom2000 09-14-2007 07:24 PM

In the template, find:
HTML Code:

* html .resizeimage, .resizednote { width: expression((this.width > intval(600 - 1))) ? '600px' : 'auto'); }
Replace it with:
HTML Code:

* html .resizeimage, .resizednote { width: expression((this.width > intval(600 - 1)) ? '600px' : 'auto'); }
That's the only place I could find an expected ';', so let me know if that changes anything.

mrghostno1 09-14-2007 09:07 PM

Is this for me? Anyway, what's the difference between the 2 codes? for me they look the same...

Once more thnks for ultra fast support :)

edit: tried to reinstall, still no image at all when enabled.

offline 09-14-2007 09:10 PM

Well it still doesn't work properly but I can now click on the image to make it bigger on the fornt page but when viewing the message itself it is still not clickable.

By the way I wanted to say thanks for the mod and thank a million for trying to help me get it working.

thincom2000 09-14-2007 11:22 PM

The "image was resized" message is not clickable in the public version. Is this what you meant?

EDIT: It depends on how you navigate to the post for some reason. Doing so through the forums and it functions normally. Doing so from your vBa module and it breaks. Hitting back after going through vBa, then clicking it again and it functions normally. I'm at a loss.

ForYou 09-15-2007 12:57 PM

Hello ,

I was installed the hack and work good but all the image was appear links not image , when i do edit the post the image will show ,

http://dardasha.net/montada/showpost...&postcount=116

but my forums is big and alot of posts and i can't do edit for all posts ,

Regards

impuLsive 09-15-2007 01:24 PM

All images turned into links in signatures, and I can't un-do this. I tried running the things in "Update Counters", but no luck. Please post a fix as this mod just broke 800 of my users sigs :-\

thincom2000 09-15-2007 02:22 PM

Quote:

Originally Posted by ForYou (Post 1339470)
but my forums is big and alot of posts and i can't do edit for all posts

If editing the post works, then the update counters method should fix it for you.

thincom2000 09-15-2007 02:27 PM

Quote:

Originally Posted by impuLsive (Post 1339479)
All images turned into links in signatures, and I can't un-do this. I tried running the things in "Update Counters", but no luck. Please post a fix

I have posted many times in this thread that I am unable to duplicate this behavior at all on my board. If someone can create a test board where this DOES happen, I will gladly take a look and post the fix.

mrghostno1 09-16-2007 04:39 PM

Editing the post works for me too, updating the counter works too.

However, all the images that were in the single line now became each on a line, editing shows the code ok, but it places on per line, making posts get a real long scroll down...
After disabling, the post became ok again. But when i enable CES Dynamic Resize, again all images showing as links, so i would need to update counters all again...

Bug report: Images with link

https://vborg.vbsupport.ru/

Dont show up when resize is enabled

thincom2000 09-16-2007 05:41 PM

Quote:

Originally Posted by mrghostno1 (Post 1340245)
all the images that were in the single line now became each on a line, editing shows the code ok, but it places on per line, making posts get a real long scroll down...

This should only occur if the resize message is enabled. This occurs because the message can only be rendered on a new line. I will look into adjusting this in the next version, but it would complicate the code.

Quote:

Originally Posted by mrghostno1 (Post 1340245)
Bug report: Images with link

[URL=http][IMG]image.gif[/IMG][/url]

Dont show up when resize is enabled

This is very odd. Perhaps it is related to stack order. I will look into this.

mrghostno1 09-16-2007 07:34 PM

Actually i'm with the image disclaimer disabled, and still getting one per line...
I'm doing a rebuild befor and after each enable/disable of this mod. :(
And every image got 1 per line, even the ones wich didn't need to be resized.
When disclaimer is disabled the linked images show ok, but you can't reach the link since the full image is opened, this isn't possible to fix i think. Unless you added the link to full image only on the disclaimer text.

thincom2000 09-16-2007 08:40 PM

Quote:

Originally Posted by mrghostno1 (Post 1340347)
When disclaimer is disabled the linked images show ok, but you can't reach the link since the full image is opened, this isn't possible to fix i think. Unless you added the link to full image only on the disclaimer text.

This sounds like a good solution. Unfortunately I am having a great deal of trouble getting images to go by % and be on the same line without the % having weird results. See here: http://www.crackedeggstudios.com/project.php?issueid=36

mrghostno1 09-16-2007 11:52 PM

I don't get it, shouldn't the second image be shown under the other? Since it's over width.
In may case i have small thumbs. I'm confuse

Dave_W 09-17-2007 08:44 AM

Hey, as I've said before, this is a great mod. I just have one small problem. Members of my website have Sig Images that are made up in parts, so they can link them to different places, but it still looks like one large image (basically, to get around our signature size rules).

Unfortunately, since installing this mod a newline appears between the images, ruining the effect. I've enclosed a screen-shot for your perusal. Although I could fix it myself, I'd rather you did it-it's your code and I want everyone to get the benefits of this mod.

http://www.thebestcasescenario.com/davew/sig1.png


http://www.thebestcasescenario.com/davew/sig2.png

Thanks,

-Dave

thincom2000 09-17-2007 11:55 AM

Hi, it took a bit of searching around on some forums, but I figured out why the javascript in my test version stopped working, so I will be addressing all these issues quite shortly.

thincom2000 09-17-2007 04:10 PM

Quote:

Originally Posted by mrghostno1 (Post 1340517)
shouldn't the second image be shown under the other? Since it's over width.
In may case i have small thumbs. I'm confuse

Okay, I think I am done with the updates to the mod and should be uploading it relatively soon. What will happen now is that all images remain on the same line if they were entered on the same line (that is, original line breaks are maintained).

This would be a bad thing if multiple images in a line were oversized, because even after resize, leaving them together would probably still be too big. This was the original reason for forcing the images to separate lines.

Now, however, the mod will treat ALL images on a line together as a single image, and resize them accordingly. Basically this means they will all have to share the maximum width, and each will be smaller than if they were the only image. I think this is the best solution without getting invasive on post layout again.

The code structure has changed. In order to accomplish the "width sharing" all widths have to be calculated first (otherwise the ones resized first would mess up the calculations). Once that is complete the images are finally resized. A new plugin had to be added to avoid the onload() bug. This is the bug (or feature?) where Javascript will only run 1 onload command in an entire page. This was partially your issue if sometimes the images weren't clickable. Although the real thing to blame is the session hash vBulletin hides in every URL. Somehow this prevents Javascript functions from running more than once. It must be the session hash because clicking a vBulletin link doesn't work as expected, yet directly typing the URL does work (and this is the only difference I can tell between the URLs). Anyone (staff?) care to comment?

All resize commands have been moved to the $onload variable in the body tag. In addition, a second new plugin had to be added to insert a regex to prevent each image from breaking the intended layout and eventually style (this is the line break fix).

To address the [url][img]https://vborg.vbsupport.ru/[/img][/url] reported bug, where the link opens the image and not the address in the url bb-code: this is actually not a bug, but intended functionality. For now, if you want to link resized images elsewhere, use captions. Or right click and open the link that way. I will add a feature so that the link to the original image moves to the disclaimer if wrapped in a URL tag. If the disclaimer is disabled and this is the case, the link to the original image will disappear.

mrghostno1 09-17-2007 10:57 PM

Quote:

Now, however, the mod will treat ALL images on a line together as a single image, and resize them accordingly.
But this doesn't apply to images wich have (each one) smaller size then the limit right?
Just to make it clear, for me and others, because vbulletin already break-line if the width of all images is too long.

thincom2000 09-18-2007 01:42 AM

As I said, images in these cases are not treated individually. vBulletin cannot word wrap because the disclaimer forces a line break anyway (even when disabled), so this is the method that is used. The javascript cannot suppress one form of a line break instead of another. Though this is possible, the entire mod would have to be rewritten, and then a user with javascript disabled will still be seeing huge images. If a user doesn't like the overall resize, they should edit their posts. That's what post preview is for.

I have spent 2 days changing up this mod so that users who were breaking site rules anyway (using a workaround to essentially use huge images) wouldn't be affected by line breaks. If a user is smart enough to figure out the workaround, they should also know that the simplest way to stop a block-level div from adding line breaks is to enclose it in a table cell. There are some excellent table bb-codes available (for example, NuHit packages [table], [tr], [td] with NuWiki) so admins wouldn't have to enable HTML to allow something like this.

But that's enough of a rant. I think I've squashed most of the bugs with this new version finally. All I have left to do now is add the [url] checks.

thincom2000 09-21-2007 04:08 AM

The new version has been posted.

@offline, all of the bugs you reported have been fixed in this version.
@Dave_W, the "bug" you reported has been fixed in this version through "width-sharing."
@mrghostno1, the [url] (and other tags) bug you reported has been fixed in this version.

New options have been added. You may wish to configure.

Note: The width sharing interferes with word wrapping for the sake of speed. I just don't think it would be efficient to add 2 more regexes to have a word wrap work on images again. Plus it is likely that images placed together on a line are intended to be viewed side-by-side anyway, and word wrap could become frustrating to these users.

Changing it back would have to be done entirely on the Javascript side (adding 2 nicely slow regexes), so users with Javascript disabled would experience it as is anyway.

xandizitxu 09-21-2007 02:59 PM

Thx for the update \o/ already installed ^^

A good feature is to implement Highslide JS ^^

Thanks again for the mod!

xandizitxu 09-21-2007 03:07 PM

Okay, broke my template :/

http://www.hakkeshu.com/forums/showt...?p=133#post133 Take a look

The image should be on top not down

thincom2000 09-21-2007 06:33 PM

This is the stupidest bug I have seen. It is impossible to run the bbcode_parse_complete code in showthread. Why does this only work in Project Tools? The variable has been globalized and I have even tried storing the recurse value in a $vbulletin->dynamicpic object with no luck.

The recurse value is ALWAYS zero on showthread, and even when skipping the check the regex is too lazy to bother on showthread. Does anyone have any solution? I am so fed up with the postbit at this point and on the verge of only supporting use of this mod in Project Tools.

Until someone else finds a fix, I'm out.

xandizitxu 09-21-2007 06:37 PM

Oh, no problem, could u send me the last version? it was working for me :\

thincom2000 09-21-2007 09:19 PM

I would, but I try not to archive out-of-date versions of my mods. Hopefully someone else has not updated yet.

xandizitxu 09-21-2007 09:31 PM

I found a backup here

^^

thincom2000 09-21-2007 11:57 PM

Could you upload it? lol

Maybe I can find something in the old plugins that would explain wth is wrong.

Charlie98902 09-22-2007 12:15 AM

Sorry I over wrote the old plugin.

Charlie98902 09-22-2007 12:18 AM

Quote:

Originally Posted by Charlie98902 (Post 1344205)
Sorry I over wrote the old plugin.

I posted in the wrong section here is the error I get with the new update and this didn't happen on the older version.

With the new update on this mod I am now getting an error in firefox I know for sure.

I am running VB 3.6.8 the last version of this mod was fine now I get this when navigating the forum. The only thing I did was turn it on and lowered the size settings on this mod, everything else is at default.
Attached Thumbnails

mrghostno1 09-22-2007 12:51 AM

Not working here, style get all buged out. I can't be doing cache update all the time.
Sorry.

thincom2000 09-22-2007 06:56 PM

This has been established. The current version only works in Project Tools. If anyone still has a copy of the old zip archive, it would be extremely helpful in finding out what broke.


All times are GMT. The time now is 11:51 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.01466 seconds
  • Memory Usage 1,849KB
  • 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
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (11)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
  • (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