Quote:
Originally Posted by Sarteck
On the plugin GeSHi BB Codes (hook location bbcode_create), add the following:
PHP Code:
/// LUAS
$this->tag_list['no_option']['luas'] = array ();
$this->tag_list['no_option']['luas']['callback'] = 'handle_external';
$this->tag_list['no_option']['luas']['external_callback'] = 'handle_geshi_lua';
if (!function_exists ('handle_geshi_lua'))
{
function handle_geshi_lua(&$theobj, &$value, &$option)
{
$code = handle_geshi_code($value,'lua');
return '<div class="bbcode_container"><div class="bbcode_description">Lua Code:</div><div style="max-height: 300px;" class="bbcode_code">'.$code.'</div></div>';
}
}
In the Admin Control Panel, Custom BB Codes ---> Add New BB Code.
Title: Lua Source Code
BB Code Tag Name: luas
Replacement: {Placeholder}
Example: print("Herro World")
Description: Prints out Lua code all nicely formatted.
Use {option}: No
Button Image (Optional): --here is where you would specify a button image.
Remove Tag If Empty: Yes
Disable BB Code Within This BB Code: Yes (well, depends on if you want or not)
Disable Smilies Within This BB Code: Yes
Disable Word Wrapping Within This BB Code: No
Disable Automatic Link Parsing Within This BB Code: Yes
Then test it out.
|
Well thanks for reply
But this did not work ...
There is no LUA button in editor
I did what you say exactly