Area51 @ 4seven.de

Mod Base and Testarea
It is currently 23 Feb 2025, 15:34

All times are UTC + 1 hour




Post new topic TOPIC_LOCKED  [ 1 post ] 
Author Message
PostPosted: 25 Mar 2012, 14:50 
Offline
Tiptop
Tiptop
User avatar

Joined: 11 Feb 2008, 11:49
Posts: 241
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

Attachment:
preview_comparison.jpg
preview_comparison.jpg [ 88.08 KiB | Viewed 1739 times ]

Demo: ucp.php?i=profile&mode=signature (un: test / pw: testuser)

Instruction

open

includes/ucp/ucp_profile.php

find

Code:
                $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:
                // 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:
                    'SIGNATURE_PREVIEW'    => $signature_preview


before add

Code:
                    // Signature Preview / Comparison / 4seven / 2012
                    'SIGNATURE_PREV'       => $signature_prev,
                    // Signature Preview / Comparison / 4seven / 2012     


open

language/en/ucp.php

find

Code:
    'SIGNATURE_PREVIEW'            => 'Your signature will appear like this in posts'


replace with

Code:
    // 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:
<!-- IF SIGNATURE_PREVIEW != '' --> 


before add

Code:
<!-- 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

_________________
Mod-Bot / Service-Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic TOPIC_LOCKED  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
[ Time : 0.012s | 23 Queries | GZIP : Off ]