[Snippet] Signature Preview / Comparison

Signature Preview / Comparison
Request Topic: http://www.phpbb.com/community/viewtopi ... &t=2151006
Request by: NiceBoardGuy
With this Snippet you have an additional fixed preview of current signature in signature area
Demo: ucp.php?i=profile&mode=signature (un: test / pw: testuser)
Instruction
open
includes/ucp/ucp_profile.php
find
replace with
find
before add
open
language/en/ucp.php
find
replace with
open
styles/prosilver/template/ucp_profile_signature.html
find
before add
Clear all Board-, Template-, Style- and Browser-Caches
Request Topic: http://www.phpbb.com/community/viewtopi ... &t=2151006
Request by: NiceBoardGuy
With this Snippet you have an additional fixed preview of current signature in signature area
Demo: ucp.php?i=profile&mode=signature (un: test / pw: testuser)
Instruction
open
includes/ucp/ucp_profile.php
find
- Code: Select all
$signature = utf8_normalize_nfc(request_var('signature', (string) $user->data['user_sig'], true));
add_form_key('ucp_sig');
if ($submit || $preview)
{
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
replace with
- Code: Select all
// Signature Preview / Comparison / 4seven / 2012
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
$signature_prev = (isset($user->data['user_sig']) && !empty($user->data['user_sig'])) ? generate_text_for_display($user->data['user_sig'], $user->data['user_sig_bbcode_uid'], $user->data['user_sig_bbcode_bitfield'], $user->data['user_options']) : '';
// Signature Preview / Comparison / 4seven / 2012
$signature = utf8_normalize_nfc(request_var('signature', (string) $user->data['user_sig'], true));
add_form_key('ucp_sig');
if ($submit || $preview)
{
// Removed by: Signature Preview / Comparison / 4seven / 2012
// include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
// Removed by: Signature Preview / Comparison / 4seven / 2012
find
- Code: Select all
'SIGNATURE_PREVIEW' => $signature_preview,
before add
- Code: Select all
// Signature Preview / Comparison / 4seven / 2012
'SIGNATURE_PREV' => $signature_prev,
// Signature Preview / Comparison / 4seven / 2012
open
language/en/ucp.php
find
- Code: Select all
'SIGNATURE_PREVIEW' => 'Your signature will appear like this in posts',
replace with
- Code: Select all
// Signature Preview / Comparison / 4seven / 2012
'SIGNATURE_PREV' => 'Your current signature',
// Signature Preview / Comparison / 4seven / 2012
'SIGNATURE_PREVIEW' => 'Your new signature will appear like this in posts',
// 'SIGNATURE_PREVIEW' => 'Your signature will appear like this in posts',
open
styles/prosilver/template/ucp_profile_signature.html
find
- Code: Select all
<!-- IF SIGNATURE_PREVIEW != '' -->
before add
- Code: Select all
<!-- IF SIGNATURE_PREV != '' -->
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<h3>{L_SIGNATURE_PREV}</h3>
<div class="postbody">
<div class="signature" style="border-top:none; margin-top: 0; ">{SIGNATURE_PREV}</div>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->
Clear all Board-, Template-, Style- and Browser-Caches