[Snippet] Signature parsing in posting review V1 + V2

Signature parsing in posting review V1
V1: Basic version
With this snippet you see signatures in posting topic review under postbox
Credit: BNa
Credit: Code Inspiration by Perlchamp, posted here
Instruction
open
includes/functions_posting.php
find
replace with
find
after add
find
after add
find
after add
find
before add
find
after add
find
after add
find
after add
open
styles/prosilver/template/posting_review.html
find
after add
open
styles/prosilver/template/posting_topic_review.html
find
after add
clear all board-, template, style and browser-caches
V1: Basic version
With this snippet you see signatures in posting topic review under postbox
Credit: BNa
Credit: Code Inspiration by Perlchamp, posted here
Instruction
open
includes/functions_posting.php
find
- Code: Select all
'SELECT' => 'u.username, u.user_id, u.user_colour, p.*, z.friend, z.foe',
replace with
- Code: Select all
'SELECT' => 'u.username, u.user_id, u.user_colour, u.user_sig, u.user_sig_bbcode_uid, u.user_sig_bbcode_bitfield, p.*, z.friend, z.foe',
find
- Code: Select all
$bbcode_bitfield = '';
after add
- Code: Select all
// Signature parsing in posting review / BNa / 2012
$sig_bbcode_bitfield = '';
// Signature parsing in posting review / BNa / 2012
find
- Code: Select all
$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
after add
- Code: Select all
// Signature parsing in posting review / BNa / 2012
$sig_bbcode_bitfield = $sig_bbcode_bitfield | base64_decode($row['user_sig_bbcode_bitfield']);
// Signature parsing in posting review / BNa / 2012
find
- Code: Select all
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
after add
- Code: Select all
// Signature parsing in posting review / BNa / 2012
$sig_bbcode = new bbcode(base64_encode($sig_bbcode_bitfield));
// Signature parsing in posting review / BNa / 2012
find
- Code: Select all
// Grab extensions
$extensions = $attachments = array();
before add
- Code: Select all
// Signature parsing in posting review / BNa / 2012
// Instantiate Sig BBCode Class
if (!isset($bbcode) && $sig_bbcode_bitfield !== '')
{
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
$sig_bbcode = new bbcode(base64_encode($sig_bbcode_bitfield));
}
// Signature parsing in posting review / BNa / 2012
find
- Code: Select all
$message = censor_text($row['post_text']);
after add
- Code: Select all
// Signature parsing in posting review / BNa / 2012
$prev_signature = censor_text($row['user_sig']);
// Signature parsing in posting review / BNa / 2012
find
- Code: Select all
$message = smiley_text($message, !$row['enable_smilies']);
after add
- Code: Select all
// Signature parsing in posting review / BNa / 2012
if ($row['user_sig_bbcode_bitfield'])
{
$sig_bbcode->bbcode_second_pass($prev_signature, $row['user_sig_bbcode_uid'], $row['user_sig_bbcode_bitfield']);
}
$prev_signature = bbcode_nl2br($prev_signature);
$prev_signature = smiley_text($prev_signature);
// Signature parsing in posting review / BNa / 2012
find
- Code: Select all
'DECODED_MESSAGE' => $decoded_message,
after add
- Code: Select all
// Signature parsing in posting review / BNa / 2012
'PREV_SIGNATURE' => $prev_signature,
// Signature parsing in posting review / BNa / 2012
open
styles/prosilver/template/posting_review.html
find
- Code: Select all
<div class="content">{post_review_row.MESSAGE}</div>
after add
- Code: Select all
<!-- IF post_review_row.PREV_SIGNATURE --><div id="sig{post_review_row.POST_ID}" class="signature">{post_review_row.PREV_SIGNATURE}</div><!-- ENDIF -->
open
styles/prosilver/template/posting_topic_review.html
find
- Code: Select all
<div class="content">{topic_review_row.MESSAGE}</div>
after add
- Code: Select all
<!-- IF topic_review_row.PREV_SIGNATURE --><div id="sig{topic_review_row.POST_ID}" class="signature">{topic_review_row.PREV_SIGNATURE}</div><!-- ENDIF -->
clear all board-, template, style and browser-caches