<?php class bbcode { function tpl() { require('languages/bbcode.lng.php'); $bbc = str_replace('{bold}', '<input type="button" value="'.$bbcode['bold'].'" onclick="java script:bbcode(\' \')" '.$bbcode['icss'].' "/>', $bbc); } function view($string) { } } ?>
bbcode.lng.php (nazwa jaka ma sie znalesc w tym buttonie)
<?php $bbcode['bold'] = 'Pogrubienie'; // CSS STYLES $bbcode['icss'] = 'style="width: 100px; height: 16px; font-size: 8pt; font-family:TrebuchetMS; color: #000000; text-indent: 5px;' ?>
bbcode.tpl (na stronie wystarczy wstawic {bold} i pojawi sie ten button pogrubienie)
Jak zrobic by zamiast buttona z nazwa pojawil sie obrazek bold.jpg
