Link and Date in quotes

Guides & Snippets for phpBB3.
Try the Snippets here and share Your own Snippets

Link and Date in quotes

Post by Post Bot »

Link and Date in quotes
Written by cherokee_red

This little snippet enables a link back to the quoted post and date.

Open posting.php
Find:

Code: Select all

$message_parser->message = '[quote="' . $post_data['quote_username'] . '"]' . censor_text(trim($message_parser->message)) . "[/quote]\n"; 
Replace with:

Code: Select all

// $message_parser->message = '[quote="' . $post_data['quote_username'] . '"]' . censor_text(trim($message_parser->message)) . "[/quote]\n";
         $message_parser->message = '[quote="' . '[url=' . generate_board_url() . "/viewtopic.$phpEx?p=$post_id#p$post_id" . ']' . $post_data['quote_username'] . ' » ' .     date("d M Y, H:i", $post_data['post_time']) . '[/url]' . '"]' . censor_text(trim($message_parser->message)) . "[/quote]\n"; 
Demo (a post I quoted in another topic):
(Its also in use on this board)
BBCode Bot » 06 Mar 2010, 12:12 wrote:Warning BBCode

Author: Unknown
Description: Can be used to gives users a visible warning

BBCode:

Code: Select all

[Warning]{TEXT}[/Warning]
HTML:

Code: Select all

<table style='margin:0;width:450px;min-height:100px;border:1px dashed #740000;'><tr><td align='middle' bgcolor='#ff6060' valign='center' width='1%'><br /><FONT color='#ffffff' size='+7'><b> ! </b></font><br /></td>
<td valign='top' cellpadding="5" style='background:#F2DDDD' >{TEXT}</td>
</tr></table>
Helpline:

Code: Select all

[Warning]Your text[/Warning]

Demo:
[warning]Spam is not allowed![/warning]