vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Board Optimization - Replace large images in posts with links to the images (https://vborg.vbsupport.ru/showthread.php?t=99776)

buro9 11-02-2005 04:47 AM

Quote:

Originally Posted by djr
Haven't installed yet, but from the screenshots it seems this is not a feature: could you please add a "[This picture is auto-linked because the original picture is too large]". Even better would be to have this in a legend-div, but I can easily whip that up myself :)

Not a feature? Well, I'm not sure what you mean by that, but I've been thanked by lots of users who have to user dial-up from middle-America, Portugal, etc.

I can add an edited message, either in the post itself (I'm loathed to do this as I'd rather not be inserting text when it may change the context of text within the post in any way) or in the editlog so that it appears at the foot as 'edited by', but I'd rather not do this as it then appears that someone is manually editing everyone's post and people can get uppity about that.

Instead, I communicate it globally via an announcement in my "About A Board" forum, and by including image dimensions and what happens when images exceed it to my "Forum Rules".

I think this is best as people don't complain about automatic processes that apply the rules universally, but do complain if they perceive that they are being manually edited by admins. That, and if I communicate it as a core rule, I can actually hope to educate them about what happens and why, and thus they may start to do things properly like resize the image and attach it if they really want people to see it, etc.

All that said... if most of the people here want text inserted to reflect that a change was made, then I shall do so.

There is always the other option though, that you simply look within trimOversizedImages.php and where I insert [/url] append whatever text you want just there.

Cheers

David K

djr 11-02-2005 05:30 AM

Quote:

Originally Posted by buro9
Not a feature? Well, I'm not sure what you mean by that, but I've been thanked by lots of users who have to user dial-up from middle-America, Portugal, etc.

Hi David,

No, no, you misunderstood! I really like this hack and will definitely use this when I finally upgrade my board to 3.5. What I meant was: the text insertion isn't a feature yet, hence the request. But I can see where you coming from, and maybe a global announcement is the better way to go. But thanks for the pointer where to put it if I still feel like doing it myself.

Thanks again for this great hack, I share the sentiments on the other hacks that try to do the same thing.

LambHyjoo 12-11-2005 10:23 PM

Hello,

this hack is great and is exactly what I was looking for !

But is there a way to make it vb3.0 compliant ? I suppose I will need to edit my "postbit_legacy" template to insert the postId in the Div, but which Div is concerned, and would it be enought to make it work ?

buro9 12-12-2005 05:36 AM

Quote:

Originally Posted by LambHyjoo
Hello,

this hack is great and is exactly what I was looking for !

But is there a way to make it vb3.0 compliant ? I suppose I will need to edit my "postbit_legacy" template to insert the postId in the Div, but which Div is concerned, and would it be enought to make it work ?


A very good point... the original templates never included an identifier, the new templates now include:
[code]
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->
[code]


So I should now be using post_message_POSTID as the div to search for.

I'll update it now for you :)

buro9 12-12-2005 05:37 AM

Oh no, misunderstanding. It does already search for post_message_POSTID. My instructions are crap, not my code :)

buro9 12-12-2005 05:44 AM

The key message is: If you are not using the original/default postbit templates, then you will need to double check that the post_message_$post[postid] DIV exists.

You can view the original version of the template, and DIFF against it to see which DIV should have this.

All those who have installed against a default install will be fine.

If you are not on a vb3.5 variant... then the code above WILL work all the way back to vb 2.x, but you need to insert the DIV yourself:

FIND:
Code:

$post[message]
REPLACE WITH:
Code:

<div id="post_message_$post[postid]">$post[message]</div>

LambHyjoo 12-12-2005 06:57 AM

Ok that's what I thought. I'm going to test it, and I'll keep you informed ;)

Thanks for your answear, David ! :)

Razasharp 05-12-2006 06:50 PM

Does this make a call to the server 'every time' an image is viewed? If so wouldn't it be more efficient to make the call only when a user 'posts' an image, and if it's too big, either make it the url then or notify the poster to resize the image?

There was a hack for phpbb that did it that way :)

buro9 05-13-2006 02:52 AM

When a large image is viewed, a call is made to the server, but as it is then replaced with a link, no more calls are made to the server as no large image is detected. So... only one call is made per large image.

Boofo 05-13-2006 03:20 AM

If you have more than 1 image in a post and one is over the dimensions but the other is not, does it make a link for the both of them? ;)


All times are GMT. The time now is 10:36 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.01407 seconds
  • Memory Usage 1,741KB
  • 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_code_printable
  • (3)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
  • (10)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