Topics

User Functions

Events

There are no upcoming events

What's New

Stories

1 new Stories in the last 2 weeks

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Saturday, May 25 2013 @ 08:35 AM EDT


 Forum Index > Support > Plugin Support New Topic Post Reply
 VB Code highlighter
   
HighKing Scott@oauth.facebook
 05/10/11 02:42PM (Read 1714 times)  
+----
Newbie

Status: offline


Registered: 05/10/11
Posts: 5
Is there a plugin for Geeklog that will highlight VB code in Stories?

 
Profile Email Website
 Quote
::Ben
 05/10/11 05:42PM  
+++++
Full Member

Status: offline


Registered: 01/14/05
Posts: 1359
Hi,

The jquery plugin bring syntax highlighter from alex gorbatchev and a brushe for Visual Basic (vb, vbnet) is available.
http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/

Ben

We speak french on http://geeklog.fr
 
Profile Email Website
 Quote
HighKing Scott@oauth.facebook
 05/11/11 07:55AM  
+----
Newbie

Status: offline


Registered: 05/10/11
Posts: 5
Quote by: %3A%3ABen

Hi,

The jquery plugin bring syntax highlighter from alex gorbatchev and a brushe for Visual Basic (vb, vbnet) is available.
http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/

Ben



I'm sure this works, but I'm not comfortable re-writing PHP code which is why I asked if there was a plugin for geeklog.

 
Profile Email Website
 Quote
::Ben
 05/11/11 11:16AM  
+++++
Full Member

Status: offline


Registered: 01/14/05
Posts: 1359
Yes jQuery plugin is a plugin for geeklog and to highlight VB code you will need to edit 1 line in private/plugins/jquery/functions.inc file ( near line 148 ) :

change from
PHP Formatted Code
                $str .= '           brushes: [\'Xml\', \'JScript\', \'CSharp\', \'Plain\', \'Php\'],' . LB;


to
PHP Formatted Code
                $str .= '           brushes: [\'Xml\', \'JScript\', \'CSharp\', \'Plain\', \'Php\', \'Vb\'],' . LB;


Ben

We speak french on http://geeklog.fr
 
Profile Email Website
 Quote
HighKing Scott@oauth.facebook
 05/11/11 11:56AM  
+----
Newbie

Status: offline


Registered: 05/10/11
Posts: 5
Quote by: %3A%3ABen

Yes jQuery plugin is a plugin for geeklog and to highlight VB code you will need to edit 1 line in private/plugins/jquery/functions.inc file ( near line 148 ) :

change from

PHP Formatted Code
                $str .= '           brushes: ['Xml', 'JScript', 'CSharp', 'Plain', 'Php'],' . LB;


to
PHP Formatted Code
                $str .= '           brushes: ['Xml', 'JScript', 'CSharp', 'Plain', 'Php', 'Vb'],' . LB;


Ben



I made the change as you suggested above and when I put the code in between the (code | /code) tags I get the following result

http://screencast.com/t/cUQwBA9pc

Is there a special function that I need to put with the "Code" tags?

 
Profile Email Website
 Quote
::Ben
 05/11/11 06:11PM  
+++++
Full Member

Status: offline


Registered: 01/14/05
Posts: 1359
You just need to set the class for the code tag.

PHP Formatted Code

<pre><code  class="vb">
' Your VB code here
</pre><code>


Ben

We speak french on http://geeklog.fr
 
Profile Email Website
 Quote
HighKing Scott@oauth.facebook
 05/11/11 07:05PM  
+----
Newbie
confused

Status: offline


Registered: 05/10/11
Posts: 5
Geeklog strips the "Class" from the tag, so I tried to add it into the config filter, but that did'nt work either...

Is there any detailed documentation on this or do you just through it out there?

 
Profile Email Website
 Quote
HighKing Scott@oauth.facebook
 05/11/11 07:08PM  
+----
Newbie

Status: offline


Registered: 05/10/11
Posts: 5
Don't worry about it, I just deleted the plugin. I'll use screenshots instead.

 
Profile Email Website
 Quote
::Ben
 05/12/11 02:52AM  
+++++
Full Member

Status: offline


Registered: 01/14/05
Posts: 1359
In the config you can set Skip HTML Filter for Root to true to allow all html tag in your posts and pages.
PHP Formatted Code

Config >> Miscellaneous >> HTML filtering


::Ben

We speak french on http://geeklog.fr
 
Profile Email Website
 Quote
Content generated in: 1.39 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content