The Arcive of vBulletin Modifications Site. |
|
Old school (WebBBS-style) quoting Details »»
|
|||||||||||||||||||||||||
This is as much for my own benefit as others. The hack is working fine, but there is a known bug in that the quoting only applies to forum posts and not private messages.
In newreply.php just below the line... Code:
$pagetext = trim(strip_quotes($pagetext)); Code:
// HACK BEGIN
function word_wrap ($string)
{
$cols = 80;
$prefix = "?";
$t_lines = split("\n", $string);
$outlines = "";
while(list(, $thisline) = each($t_lines))
{
$thisline = trim($thisline);
if(strlen($thisline) > $cols)
{
$newline = "";
$t_l_lines = split(" ", $thisline);
while(list(, $thisword) = each($t_l_lines))
{
while((strlen($thisword) + strlen($prefix)) > $cols-15)
{
$cur_pos = 0;
$outlines .= $prefix;
for($num=0; $num < $cols-16; $num++)
{
$outlines .= $thisword[$num];
$cur_pos++;
}
$outlines .= "\n";
$thisword = substr($thisword, $cur_pos, (strlen($thisword)-$cur_pos));
}
if((strlen($newline) + strlen($thisword)) > $cols-15)
{
$outlines .= $prefix.$newline."\n";
$newline = $thisword." ";
}
else
{
$newline .= $thisword." ";
}
}
$outlines .= $prefix.$newline."\n";
}
else
{
$outlines .= $prefix.$thisline."\n";
}
}
return $outlines;
}
$pagetext = word_wrap($pagetext);
// HACK END
Best wishes, Edit: I forgot. In order to not make it look crazy, you have to leave the "newpost_quote"-template empty except for "$pagetext" Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Thanks Martin CX for sharing your mod... i'm sure many will find it useful...
|
|
#3
|
|||
|
|||
|
So this does nothing but change the way quotes look, so it looks like the old style quotes sytem on older software boards?
Do you still need to use quote tags and it just converts it, or would you need to use >>'s? |
|
#4
|
|||
|
|||
|
Quote:
In this case, had I replied to your message, this is what it would have given me: ?So this does nothing but change the way quotes look, so it looks ?like the old style quotes sytem on older software boards? ? ?Do you still need to use quote tags and it just converts it, or ?would you need to use >>'s? BTW, I use the prefix '?' as I think it looks nice, but if you want to use '>' or '> ' you can just change it. (It is the prefix variable in the beginning of the script.) And if you want to change the number of characters before the line wraps it is the cols variable. And thank you, Polo. I hope so. |
|
#5
|
||||
|
||||
|
Great idea. Definitely old school.
|
|
#6
|
||||
|
||||
|
Is there a way to add the name of the person you are quoting also?
|
|
#7
|
|||
|
|||
|
Quote:
Code:
?(b)$originalposter wrote:(/b) ? $pagetext Best wishes, |
|
#8
|
||||
|
||||
|
Nice hack !
Thanks Martin CX /me installs |
|
#9
|
|||
|
|||
|
lovin the bbs style! =)
|
![]() |
|
|