Area51 @ 4seven.de

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

All times are UTC + 1 hour




Post new topic TOPIC_LOCKED  [ 1 post ] 
Author Message
PostPosted: 07 Nov 2011, 19:42 
Offline
Tiptop
Tiptop
User avatar

Joined: 11 Feb 2008, 11:49
Posts: 241
Remove Default BBcode and replace it with Custom

first

make a complete backup of your database and further named files and close the board

second

better don't change the complex [ quote ] bbcode, bcs. it's a very specialized bbcode,
or u are a hardcore php crack. best is, change only 'simple' standard (formatting) bbocdes.

---------------------------

ok, here is a simple example of [ b ] standard-bbcode.
u can transform this change-syntax on each standard formatting bbcode.

i make testwise a bbcode [ b ]

Code:
[b]{TEXT}[/b]


Code:
<span style="background-color:darkred;color:white;font-weight:bolder;">
{TEXT}
</span>


screens
http://4seven.bplaced.net/BBCodes_1.png
http://4seven.bplaced.net/BBCodes_2.png
http://4seven.bplaced.net/BBCodes_3.png

Instruction

open

includes/bbcode.php

find

Code:
                    case 1:
                        $this->bbcode_cache[$bbcode_id] = array(
                            'str' => array(
                                '[b:$uid]'    => $this->bbcode_tpl('b_open',

    $bbcode_id),
                                '[/b:$uid]'    => $this->bbcode_tpl('b_close',

    $bbcode_id),
                            )
                        );
                    break; 


replace with

Code:
                    case 1:
                        $this->bbcode_cache[$bbcode_id] = array(
                            'str' => array(
                                '[b_out_of_order:$uid]'    => $this->bbcode_tpl('b_open',

    $bbcode_id),
                                '[/b_out_of_order:$uid]'    => $this->bbcode_tpl

    ('b_close', $bbcode_id),
                            )
                        );
                    break; 


open

includes/acp/acp_bbcodes.php

find

Code:
                        // Make sure the user didn't pick a "bad" name for the BBCode tag.
                        $hard_coded = array('code', 'quote', 'quote=', 'attachment', 'attachment=', 'b', 'i', 'url', 'url=', 'img', 'size', 'size=', 'color', 'color=', 'u', 'list', 'list=', 'email', 'email=', 'flash', 'flash='); 


replace with

Code:
                        // Make sure the user didn't pick a "bad" name for the BBCode tag.
                        $hard_coded = array('code', 'quote', 'quote=', 'attachment', 'attachment=', 'b_out_of_order', 'i', 'url', 'url=', 'img', 'size', 'size=', 'color', 'color=', 'u', 'list', 'list=', 'email', 'email=', 'flash', 'flash='); 


open

styles/prosilver/template/posting_buttons.html

find


Code:
        <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" /> 


replace with


Code:
        <!-- <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" /> --> 


note

if you get a sql-error

Code:
Out of range value adjusted for column 'bbcode_id'


follow this solution

http://www.phpbb.com/community/viewtopi ... 5#p7551325

also note

all old [ b ] bbcodes in posts must be reparsed with Support Toolkit (STK)
http://www.phpbb.com/support/stk/

see screen (first post = old [ b ] bbcode, further post = new custom [ b ] bbcode)
http://4seven.bplaced.net/BBCodes_4.png

------------------------------

my tip:
best is, test-out the reparse with Support Toolkit (STK) on a local copy of your board,
or, if STK not work for this constellation, use this snippet, before u start a board.

_________________
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 6 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.010s | 23 Queries | GZIP : Off ]