Helpful Information
 
 
Category: vBulletin 3.0 Beta Releases
Old school (WebBBS-style) quoting

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...
$pagetext = trim(strip_quotes($pagetext));
...insert the following
// 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 ENDScreenshot attached.

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"

Thanks Martin CX for sharing your mod... i'm sure many will find it useful...

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?

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?You don't need to use quote tags, it automatically >>'s the text from the post you are replying to.

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.

Great idea. Definitely old school. :)

Is there a way to add the name of the person you are quoting also? ;)

Is there a way to add the name of the person you are quoting also? ;)Sure, but I think it is perhaps easiest achieved by just editing the "newpost_quote"-template and leave something like...›(b)$originalposter wrote:(/b)

$pagetext...or whatever you have in mind (brackets instead of parenthesis, of course).

Best wishes,

Nice hack !

Thanks Martin CX

/me installs

lovin the bbs style! =)










privacy (GDPR)