iPrestege Posted November 27, 2016 Share Posted November 27, 2016 Hi everyone, hope you are guys fine i'm looking for a highlight plugin for vBulletin forum script for 'Lua' language if anyone have it i would like to ask to post it in here also i don't know how to make it return to the wiki page when function called or event like the one in here if someone can tell me i would really appreciate it. @darkdreamingdan @Jusonex Thanks guys! 1 Link to comment
N3xT Posted November 27, 2016 Share Posted November 27, 2016 http://qbnz.com/highlighter/ MTA forum use geshi, may it's helpful for you. Link to comment
darkdreamingdan Posted November 28, 2016 Share Posted November 28, 2016 We don't use Geshi anymore. We now use Google's Prettify library in both the Wiki and Forums. It's normally quite easy to implement into a web site, you just have to add some custom JS includes and custom BBcode tags. I'll be releasing a Google Prettify compatible MTA syntax highlighter (the one used to link to wiki and colours) in the next few days. You'll need configure VBulletin or modify the source code to include the following to JS (in our forum software this is achieved by modifying the theme): <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script> <script src="https://cdn.rawgit.com/google/code-prettify/master/src/lang-lua.js"></script> <!-- Lua not added by default, add it--> <script> addEventListener('load', function (event) { PR.prettyPrint() }, false); </script> Then you'll need to make a custom BBCode to produce the following tag (e.g. configure a [lua][/lua] bbcode): <pre class="prettyprint lang-lua">--LUA HERE</pre> 2 Link to comment
iPrestege Posted November 28, 2016 Author Share Posted November 28, 2016 1 hour ago, darkdreamingdan said: We don't use Geshi anymore. We now use Google's Prettify library in both the Wiki and Forums. It's normally quite easy to implement into a web site, you just have to add some custom JS includes and custom BBcode tags. I'll be releasing a Google Prettify compatible MTA syntax highlighter (the one used to link to wiki and colours) in the next few days. You'll need configure VBulletin or modify the source code to include the following to JS (in our forum software this is achieved by modifying the theme): <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script> <script src="https://cdn.rawgit.com/google/code-prettify/master/src/lang-lua.js"></script> <!-- Lua not added by default, add it--> <script> addEventListener('load', function (event) { PR.prettyPrint() }, false); </script> Then you'll need to make a custom BBCode to produce the following tag (e.g. configure a [lua][/lua] bbcode): <pre class="prettyprint lang-lua">--LUA HERE</pre> Hi dan glad to hear that you are going to release a library for the mta highlighter : ) I think it can be done also in the vBulletin software by editing the styles or the theme as you said above so i found this in my style/theme ; <!-- / controls for non-popup browsers --> <if condition="$show['ajax_js']"> <script type="text/javascript" src="clientscript/vbulletin_ajax_threadslist.js?v=$vboptions[simpleversion]"></script> <script type="text/javascript"> <!-- vB_AJAX_Threadlist_Init('threadslist'); var titlemaxchars = parseInt("$vboptions[titlemaxchars]"); //--> </script> </if> <!-- ############## END THREADS LIST ############## --> <!-- ### This is just an example of my forum style files --> so i guess i can add it to the forum editing the style/theme ? Thanks for the reply also please tell us when you release your own library ;p 2 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now