Jump to content

Lua plugin in vBulletin


iPrestege

Recommended Posts

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>

 

  • Like 2
Link to comment
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 

  • Like 2
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...