vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   New Posting Features - Maximum Embedded Image (File) Size Restriction by BOP5 (https://vborg.vbsupport.ru/showthread.php?t=281601)

BirdOPrey5 04-15-2012 10:00 PM

Maximum Embedded Image (File) Size Restriction by BOP5
 
1 Attachment(s)
Brought to you by BirdOPrey5
www.Qapla.com


Version 1,5 - Fixed new bugs - Added yes/no option for edits
Version 1.4 - Simplified code - should fix any remaining issues
Version 1.3 - Fixes big with WYSIWYG Editor on New Threads in VB 4.1.4 and lower (Including 3.x)
Version 1.2 - Fixes "Cannot Re-declare function" error with some mods
Version 1.1 - Better support for CKEDITOR in VB4
Version 1.0 - Initial Release

Live Demo:Max Image Size Restrictions Demo at Qapla.com

The purpose of this mod is to make forum pages load faster. Too often users don't care how big (in bytes) the images they link to are. If you have an image resizer all they care about is that it fits on the page but not how long it may take to download. If you have a post with several or even dozens of these images you can quickly create a slow loading page. Search Engines give priority to faster loading pages so it could even be damaging SEO.

This mod will automatically check every image being embedded via [IMG] BBCode. If the file size is over a value you specify the mod will automatically change the [IMG] code to a [URL] link instead. You can choose to include the file size (in kB) next to the link and you can specify the text of link as well- or simply use the URL as the link text. Go to the mod settings after installation to set these options.

Note- Changes are made at the time the post is submitted or edited so it will not change existing posts.

Should be compatible with all VB 3.6.x +

Please Mark as Installed if you use this. :)
Donations Always Appreciated. :up:

BirdOPrey5 04-15-2012 10:31 PM

Reserved.

v123shine 04-16-2012 11:35 AM

save bandwidth...thank you BOP5 :)

Sayid 04-16-2012 05:00 PM

Very brilliant and simple mod,

home9000 04-19-2012 05:35 AM

Thanks BirdOPrey5 for your effort

I just try it but I get this error :


Fatal error: Cannot redeclare getsizefilebop() (previously declared in /home/dor/public_html/BB/includes/class_dm_threadpost.php(744) : eval()'d code:38) in /home/dor/public_html/BB/includes/class_dm_threadpost.php(744) : eval()'d code on line 4

BirdOPrey5 04-19-2012 10:37 AM

Quote:

Originally Posted by home9000 (Post 2321483)
Thanks BirdOPrey5 for your effort


I just try it but I get this error :


Fatal error: Cannot redeclare getsizefilebop() (previously declared in /home/dor/public_html/BB/includes/class_dm_threadpost.php(744) : eval()'d code:38) in /home/dor/public_html/BB/includes/class_dm_threadpost.php(744) : eval()'d code on line 4

There must be another mod reusing the same hook twice.

I added new code to prevent this error- please try version 1.2, just released. :)

ricardoNJ 04-19-2012 03:28 PM

It does not work vB3.8.4

BirdOPrey5 04-19-2012 03:36 PM

Quote:

Originally Posted by ricardoNJ (Post 2321613)
It does not work vB3.8.4

Can I get a link to your forum? If the mod is enabled let me know what your size setting is as well.

Thanks.

I assume by "doesn't work" you mean the image just posts as normal? Or do you get an error message?

ricardoNJ 04-19-2012 03:48 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2321614)
Can I get a link to your forum? If the mod is enabled let me know what your size setting is as well.

Thanks.

I assume by "doesn't work" you mean the image just posts as normal? Or do you get an error message?


http://www.arteforos.com/showthread.php?p=106#post106


it is enabled.

Update info:

Settings is similar to yours in the link

BirdOPrey5 04-19-2012 03:55 PM

Sorry about that- try this new version, 1.3.

ricardoNJ 04-19-2012 04:12 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2321621)
Sorry about that- try this new version, 1.3.

I did it too, but nothing happened.

BirdOPrey5 04-19-2012 04:18 PM

It's not going to fix old posts- did you make a new one?

I can't register at your forum to try because I don't know the answer to your verification question. I tried agua and cepillar but neither worked. I'm stumped. :o

ricardoNJ 04-19-2012 04:41 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2321632)
It's not going to fix old posts- did you make a new one?

I can't register at your forum to try because I don't know the answer to your verification question. I tried agua and cepillar but neither worked. I'm stumped. :o

I sent you a PM

BirdOPrey5 04-19-2012 05:35 PM

What is you max file size set to, exactly?

ricardoNJ 04-19-2012 05:38 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2321659)
What is you max file size set to, exactly?

I'm not sure where can I see it. Do you know where? :D

BirdOPrey5 04-19-2012 05:44 PM

Maybe that is the problem.

You have to go to Admin CP -> Settings -> vBulletin Options and choose Max Image Size Restriction by BOP5 from the list.

Double-click on it and you can enable the mod and set the file size.

ricardoNJ 04-19-2012 05:49 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2321663)
Maybe that is the problem.

You have to go to Admin CP -> Settings -> vBulletin Options and choose Max Image Size Restriction by BOP5 from the list.

Double-click on it and you can enable the mod and set the file size.

Enable Mod?: Yes

Max Image File Size: 1024

Show File Size?: Yes

Link Text: Large Image Link

Disable in These Forums: None



Like your example. :confused:

ricardoNJ 04-19-2012 05:51 PM

If you select right click- info you can see:

Dimensions: 1,536px × 2,048px (scaled to 700px × 933px)

in the picture that you posted in my forum

BirdOPrey5 04-19-2012 05:56 PM

1024 is the file size in kilobytes. The mod doesn't care about the image dimensions. But it should be working with the test image regardless... http://www.qapla.com/ju/DSC01846.JPG

I will pm you back.

ricardoNJ 04-19-2012 06:21 PM

Uninstalled....sorry
Thanks for help anyway!

home9000 04-20-2012 06:01 AM

Dear BirdOPrey5

I test it with new large image but nothing happen
It's ignore the hack and insert the images as image not link

BirdOPrey5 04-20-2012 03:47 PM

Quote:

Originally Posted by home9000 (Post 2321807)
Dear BirdOPrey5

I test it with new large image but nothing happen
It's ignore the hack and insert the images as image not link

And you are sure you enabled the mod in settings?

I don't know what the issue is- if you want to give me temporary admin access PM me and I will take a look and figure out the problem.

home9000 04-26-2012 06:11 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2321941)
And you are sure you enabled the mod in settings?

I don't know what the issue is- if you want to give me temporary admin access PM me and I will take a look and figure out the problem.

Yes I am sure this the mod is enabled

I can't give you access because this forum owned by a company I am just a worker with them

BirdOPrey5 04-26-2012 12:52 PM

Do you use a lot of other mods? Can you go to product manger and paste a list of the mods installed here?

Maybe something will stick out.

BirdOPrey5 04-28-2012 12:55 PM

updated to 1.4 - simplified code - suggest everyone upgrade. Anyone who was having problems, please try this new version.

BirdOPrey5 05-03-2012 07:57 PM

Updated to 1.5 - Fixed a bug where the mod wouldn't disable on new threads even on forums listed as disabled.

Added new Yes/No option to enable on post edits or not.

home9000 11-05-2012 08:45 PM

BirdOPrey5

I use the following hack :
https://vborg.vbsupport.ru/showthread.php?t=123338

but desent work if the file size rech the maximum size

Can I make the following order :

1- if there is any image first Image Cache hack will run
2- after that Maximum Embedded Image will run

now what is happen is opposite Maximum Embedded Image run then Image Cache hack

BirdOPrey5 11-10-2012 08:09 PM

You can do whatever you want if you can figure it out- I'm sorry I don't have time to look into how the image cache hack works.

al2thero 11-13-2012 06:36 AM

thanks a lot

Dwarden 04-01-2013 10:43 PM

is there known issue on 4.2.x with this plugin ? I tried use your example picture and it fails to be replaced , yet on some other hosting it is replaced ....

BirdOPrey5 04-09-2013 01:00 PM

It is known to work fine on 4.2.0.

I'm told some image hosts have problems with this mod- I think it is because they are sending dummy data to prevent people from hotlinking images, but not sure. Would need a specific link to an image with the problem to be sure.


All times are GMT. The time now is 05: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.01379 seconds
  • Memory Usage 1,779KB
  • 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
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (31)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete