Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Mod Name / Version: Correct Multiple Quote Spacing

Description: If you use multiple quotes in a reply, they will now be spaced correctly/evenly without having to do your own funky spacing when composing the message.

Example of how you would now space it out after the mod is applied (ie. normally)...


[ quote] quoted text [/ quote]

response

[ quote] quoted text [/ quote]

response

[ quote] quoted text [/ quote]

response


It will display in the same manner afterwards, whereas before the reply would be nestled too close to the following quote and too far away from the original one.

I'm not sure in what other versions this may work, probably more than what is listed though. But since I can't confirm, I'll only mention 6.3 :-)


Working Under: UBB.Threads 6.3

Mod Status: Finished

Any pre-requisites: none

Author(s): Twisty

Date: 11/25/03

Credits: none

Files Altered: ubbt.inc.php

New Files: none

Database Altered: no

Info/Instructions: In ubbt.inc.php...

CHANGE THIS:

// -------------
// Quote markup
$Body = str_replace("[{$ubbt_lang['TEXT_QUOTE']}]","</font><blockquote><font class="small">{$ubbt_lang['IN_REPLY']}:</font><hr /><br />",$Body);
$Body = str_replace("[/{$ubbt_lang['TEXT_QUOTE']}]","<br /><br /><hr /></blockquote><font class="post">",$Body);

TO THIS:

// -------------
// Quote markup
$Body = str_replace("[{$ubbt_lang['TEXT_QUOTE']}]","</font><br /><blockquote><font class="small">{$ubbt_lang['IN_REPLY']}:</font><hr /><br />",$Body);
$Body = str_replace("[/{$ubbt_lang['TEXT_QUOTE']}]","<br /><br /><br /></blockquote><font
class="post">",$Body);


Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.

Sponsored Links
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
On a related topic, here's another small fix for flatmode only. This will add 2 spaces before and after the actual message when viewed (just like threaded currently does).

As it is now, the message hugs right up against the table borders on top/bottom, which doesn't look right imo.

In showflat.tmpl...

CHANGE THIS:

<tr>
<td width="83%" class="lighttable" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td valign="top" style="height: 80px">
<span class="post">
{$postrow[$i]['Body']}
{$postrow[$i]['PrintLastEdit']}
</span>
</td></tr>
<tr><td height="1">
<span class="small">{$postrow[$i]['Signature']}</span>
</td>
</tr>
</table>


TO THIS:


<tr>
<td width="83%" class="lighttable" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td valign="top" style="height: 80px">
<span class="post">
<br />
<br />
{$postrow[$i]['Body']}
{$postrow[$i]['PrintLastEdit']}
</span>
</td></tr>
<tr><td height="1">
<span class="small">{$postrow[$i]['Signature']}</span>
<br />
<br />
</td>
</tr>
</table>

Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Oops, I forget something here (in regard to my 1st post).

You'll also need to change the following in the same file - ubbt.inc.php (line 904)...

CHANGE FROM:

Code
    // ------------- <br />    // Quote markup <br />       $Body = preg_replace("/<\/font><blockquote><font class=\"small\">.*?:<\/font><hr \/><br \/>/","[{$ubbt_lang['TEXT_QUOTE']}]",$Body); <br />       $Body = str_replace("<br /><br /><hr /></blockquote><font class=\"post\">","[/{$ubbt_lang['TEXT_QUOTE']}]",$Body);



CHANGE TO:

Code
    // ------------- <br />    // Quote markup <br />       $Body = preg_replace("/<\/font><br \/><blockquote><font class=\"small\">.*?:<\/font><hr \/><br \/>/","[{$ubbt_lang['TEXT_QUOTE']}]",$Body); <br />       $Body = str_replace("<br /><br /><br /></blockquote><font class=\"post\">","[/{$ubbt_lang['TEXT_QUOTE']}]",$Body);



Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Thx, I will give this a try.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)