The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Prevent Oversized Images Breaking Message Tables & Sigs 2.1 Details »» | |||||||||||||||||||||||||||
Prevent Oversized Images Breaking Message Tables & Sigs 2.1
Developer Last Online: Nov 2023
Description: Using the CSS "overflow" attribute you can prevent large images from breaking your message column. This helps extremely for the people who use fixed widths. Images that display larger than the message column width will show a horizontal bar.
But it has already been done: Yes, but the other (non) CSS methods affect the overall performance of the forum. The CSS method previously provided required editing a .php file. Plus, in Internet Explorer both the horizontal and vertical scrollbar displayed. This method eliminates the vertical scrollbar. The modification only requires editing the postbit and/or postbit_legacy template and Main CSS. What else to expect: The horizontal scrollbar will affect the entire post of the oversized image. That's the nature of the modification. No biggie. Targeted Layout Type: Fixed width layout Browsers tested: Internet Explorer and Firefox Compatible vB versions: 3.5.3, 3.5.4, 3.5.5 and 3.6+ Thank yous: CyberAlien (Correction on ID to Class); kennn (PM resize - conditional code below) Optional Modifications Added (3.14.06)!: A) Signature (Cuts off oversized signatures in message bits by width & height.) B) vBadvanced Newsbit (Same like the original, just with vBadvanced.) C) vBadvanced Newsbit Signatures (Same like the original signature mod, just with vBadvanced.) D) Private Message conditional posted by kennn (click here to post) ----------------- Finally, let's edit! (Or you can download the .txt file for the installation instructions) 1. Back up your templates! 2. In your postbit or postbit_legacy template find this or something similar to: Code:
<!-- message --> <div id="post_message_$post[postid]">$post[message]</div> <!-- / message --> Code:
<!-- message --> <div id="post_message_$post[postid]" class="hidemsg">$post[message]</div> <!-- / message --> 4. In Main CSS go to the bottom at Additional CSS Definitions and add code bit: Code:
.hidemsg { width:700px; padding-bottom:20px; overflow:auto; overflow-x:auto; overflow-y:hidden; } 6. Click "Save". 7. Click if you use it. Finished! *For those of you who use a fluid layout take a look at this post. Thanks 007 for sharing. ===================== Optional Modifications (Below)!!!: *The 3 (A, B & C) optional modifications below follow the same steps as above with the exception of #2, #4 and #5. A) For Signatures (Hide Oversized Images width & height): 2. In your postbit or postbit_legacy template find this or something similar to: Code:
<!-- sig --> <div> __________________<br /> $post[signature] </div> <!-- / sig --> Code:
<!-- sig --> <div class="hidesig"> __________________<br /> $post[signature] </div> <!-- / sig --> Code:
.hidesig { width:700px; height:400px; overflow:hidden; } *If the center tag doesn't work in the signature after implementing the code above see this post for the solution. --------------------------------- B) For vBAdvanced Newsbits: 2. In your vBadvanced CMPS Templates --> adv_portal_newsbits template find this or something similar to: Code:
$news[message] Code:
<!-- message --> <div class="hideadvnews"> $news[message] </div> <!-- / message --> Code:
.hideadvnews { width:700px; padding-bottom:20px; overflow:auto; overflow-x:auto; overflow-y:hidden; } --------------------------------- C) For vBAdvanced Newsbits (Signature): 2. In your vBadvanced CMPS Templates --> adv_portal_newsbits template find this or something similar to: Code:
<if condition="$show['signature']"> <div>__________________<br /> $news[signature]</div> </if> Code:
<if condition="$show['signature']"> <div class="hideadvsig">__________________<br /> $news[signature]</div> </if> Code:
.hideadvsig { width:700px; height:400px; overflow:hidden; } *If the center tag doesn't work in the signature after implementing the code above see this post for the solution. Finished (Once More)! 7. Click if you use it. Show Your Support
|
Comments |
#92
|
|||
|
|||
I have noticed that this hack does not resize images when replying to a post. When replying, the firs\original post is usually listed below the reply box. If that post contains a large image, it will not resize.
How can this be fixed? Thanks in advance. |
#93
|
||||
|
||||
The hack only adds a scrollbar if an enlarge image is posted on fixed width layouts; it doesn't resize them.
|
#94
|
|||
|
|||
can we use this ??
Code:
<div id="post_message_$post[postid]" STYLE="width: 700px; padding-bottom:20px; overflow: auto; overflow-x:auto; overflow-y:hidden; ">$post[message]</div> |
#95
|
|||
|
|||
Quote:
|
#96
|
||||
|
||||
@dinodonk: If it works, sure.
@Bernd: Can you please give me a screenshot and the codes you layed out so I can help with resolving the issue.? I just tested it and for me it's working in IE and Firefox (screenshot here). The second post is a quote of the first post. |
#97
|
|||
|
|||
<a href="http://www.c4dportal.com/issue/newreply.php.htm" target="_blank">http://www.c4dportal.com/issue/newreply.php.htm</a>
Here is a screenshot (scroll all the way down). And thanks. |
#98
|
||||
|
||||
Ahh, that's what you meant.
It's not an issue as that was never part of the modification. Nevertheless, try either these two codes to correct the reviewbit: Assuming you already have the hack installed...In "newreply_reviewbit" template find: Code:
<td class="alt2">$reviewmessage</td> Code:
<td class="hidemsg alt2">$reviewmessage</td> Code:
<td class="alt2"><div class="hidemsg">$reviewmessage</div></td> |
#99
|
|||
|
|||
Hello Everyone,
First of all I really like this hack. However I just noticed that the width that its set to becomes the width of all forum posts regardless of having a oversized image or not as well as the width of PM's. So this hack seems to be affecting the width of not just all forum posts but also PM's. Is there a way to fix the width of forum posts that don't have oversized images and PM's without losing the ability to have the scroll bar on posts with oversized images? Thank You, Nuguru |
#100
|
||||
|
||||
Hmm...Those are good questions that I didn't really consider for this mod. I believe you can use a conditional for the PM's in the postbit such as:
Code:
<if condition="THIS_SCRIPT == 'private'"> pm_postbit_code_here <else /> regular_postbit_code_here </if> |
#101
|
||||
|
||||
Edit: Fixed.. I miss Private Message conditional posted by kennn
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|