Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Replace large images in posts with links to the images Details »»
Replace large images in posts with links to the images
Version: 1.2, by buro9 buro9 is offline
Developer Last Online: Jul 2012 Show Printable Version Email this Page

Category: Board Optimization - Version: 3.5.2 Rating:
Released: 10-30-2005 Last Update: 10-31-2005 Installs: 13
Code Changes Additional Files  
No support by the author.

No longer supported by the author.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 11-02-2005, 04:47 AM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #33  
Old 11-02-2005, 05:30 AM
djr's Avatar
djr djr is offline
 
Join Date: Nov 2001
Location: Amsterdam
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #34  
Old 12-11-2005, 10:23 PM
LambHyjoo LambHyjoo is offline
 
Join Date: Apr 2005
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?
Reply With Quote
  #35  
Old 12-12-2005, 05:36 AM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #36  
Old 12-12-2005, 05:37 AM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh no, misunderstanding. It does already search for post_message_POSTID. My instructions are crap, not my code
Reply With Quote
  #37  
Old 12-12-2005, 05:44 AM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #38  
Old 12-12-2005, 06:57 AM
LambHyjoo LambHyjoo is offline
 
Join Date: Apr 2005
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Thanks for your answear, David !
Reply With Quote
  #39  
Old 05-12-2006, 06:50 PM
Razasharp's Avatar
Razasharp Razasharp is offline
 
Join Date: Feb 2005
Location: UK
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #40  
Old 05-13-2006, 02:52 AM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #41  
Old 05-13-2006, 03:20 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:06 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04820 seconds
  • Memory Usage 2,307KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete