Page 1 of 1

[BBCode] Username BBCode Button

PostPosted: 01 Oct 2011, 18:43
by Sekuro
Username BBCode Button

request thread: http://www.phpbb.com/community/viewtopi ... #p12861138

with this solution you kill two flys with one clap:
- you need no bbcode
- the username txt is quotable
- also good for admin/mod edits in userpost (admin say: bla bla)

just click on the [Username] button and your name will be inserted.

Image

open

posting.php

find

Code: Select all
        'USERNAME'                => ((!$preview && $mode != 'quote') || $preview) ? $post_data['username'] : '',


after add

Code: Select all
        'POSTNAME'                => (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : $user->lang['GUEST']),


open

styles/prosilver/template/posting_buttons.html

find (the second find)

Code: Select all
        <!-- END custom_tags --> 


after add

Code: Select all
    <input type="button" class="button2" name="{POSTNAME}" value="{L_USERNAME}" onclick="insert_text('{POSTNAME}')" title="" />


clear all caches

can combined with Topic Viewer BBCode