vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   BB Code Enhancements - Better code syntax highlighting (https://vborg.vbsupport.ru/showthread.php?t=285933)

tcarr9 08-02-2012 12:38 PM

Thanks so much - installed and working nicely. I even modified it to include an AS3S tag for ActionScript3 since that is used on my forums frequently.

Sarteck 08-02-2012 12:47 PM

You're welcome, but thank the GeSHi coders more than me. :P All I did was show how to use it for vBulletin--they're the ones who provided such an awesome project. :3

SolidSnakeLive 08-06-2012 06:58 PM

How to add button for lua ?

I added a lines in XML file for lua

But the button didn't show up in Editor ... I have already put a pic for it !

Can you tell me how to add a button in editor or make this mod with buttons ?

Sarteck 08-07-2012 02:16 AM

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.

SolidSnakeLive 08-07-2012 04:14 AM

Quote:

Originally Posted by Sarteck (Post 2355126)
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 :(

SolidSnakeLive 08-07-2012 04:52 AM

Its works the problem is I was using a plugin that add more buttons to editor such as pdf / flash / advanced colors ...etc

when i disabled it .... it works !

I don't know if there a solution to keep both works :confused:

Sarteck 08-07-2012 10:44 AM

Hmm. What's the modification? Can you link it? Maybe I can modify my thing to be compatible with it (although I'm not sure why it would be incompatible).

SolidSnakeLive 08-22-2012 03:35 AM

Quote:

Originally Posted by Sarteck (Post 2355214)
Hmm. What's the modification? Can you link it? Maybe I can modify my thing to be compatible with it (although I'm not sure why it would be incompatible).

Its Editor tool addon

This Product :

http://www.wahtaljouf.com/wahtools/wah-tools-editor.zip

same but UTF-8 Encoding : http://www.wahtaljouf.com/wahtools/w...ditor-utf8.zip

Info : http://www.traidnt.net/vb/traidnt1998010/
Its in Arabic language not English but you can see the images to have the idea about this product

SpikedRocker 09-12-2012 11:57 AM

When I've tried using this mod, at least with the php code, it actually was causing an error when you try to load the thread. Has anyone else experienced this?

SolidSnakeLive 09-13-2012 08:47 AM

Can you make this script looks like this codebox

http://forum.mtasa.com/viewtopic.php...=47798#p473505

appears as code with using lua highlight support & ofcource with rows id


All times are GMT. The time now is 05:39 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01286 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete