ColdFISH Mango Blog plugin

I've always wanted to use ColdFISH as a code syntax highlighter in Mango Blog after viewing other blogs running on BlogCFC. When I noticed Jason Delmore's post announcing ColdFISH 3.1 I inquired about a Mango Blog plugin. With some help from Jason, I was able to put together my first Mango Blog plugin, ColdFISH for Mango Blog.

The plugin allows you to set options for the toolbar and line numbers from within your Mango Blog admin. Use standard < code> < /code> tags to apply the code formatting. The code will be placed within a div with the code class applied for further styling of the code block. Further configuration is available within the Coldfishconfig.xml file.

The project is available at http://coldfishformangoblog.riaforge.org/. Try it out and let me know what you think. As this is my first plugin, I welcome any feedback good or bad. If you have always wanted to use ColdFISH in Mango Blog, here is the chance.

Comments

1
Jason Delmore

Nice work John! Great to see ColdFISH being made available to Mango users!

2
John Sieber

Thanks Jason for the help in getting it working in Mango Blog!

3
Simon

I am not able to activate this plug in. Even if I deactivate all of the other plug-ins it doesn't solve the issue. Read somewhere that log file could give out what's the problem, but my log folder is absolutely empty. Any help would be highly appreciated. BTW I use 1.6 version of mango blog.

4
John Sieber

@Simon - The log files are stored in the database. Check out the Log Viewer plugin, http://mangologviewer.riaforge.org/, I used this when working on the plugin to help me debug. I have installed and used the plugin on several instances of Mangoblog using version 1.6. Install the logviewer plugin and see if it gives any info on what the issue might be and post back. We'll see if we can't get it sorted out.

5
Simon

@John thanks for the advise and sorry for the delayed response. Surprisingly even Log Viewer plugin doesn't want to activate. However the rest of them of which some are not native can be de-activated and re-activated with no hassle. any thoughts on that?

6
John Sieber

@Simon - I'm not really sure why that would happen. One thing to check, in version 1.6 the log is stored in the log table in your database. It might be worth taking a look in there to see if there is a fatal error that is occurring.

7
Simon

@John Sieber Thanks mate. Looked up the database table and found myself in one of those silly situations... file not found at certain address. Paying more attention I've realised what's gone wrong. I've downloaded this archived file and unzipped it to the same name directory (Mango-coldFish-v1.0). and the files are pointing to the directory called 'coldFish'. There's the answer then ;) thanks for your help. database hint done the trick. BTW I've just started my blog + website so if you've got any interest have a look. Blog's running on Mango and now will have your plugin running on it too. Link is in the name. cheers, SD

8
John Sieber

@Simon - Glad you got it working. I'll check out your blog for sure.

9
Simon

sorry for being pain in the a*** but is there any particular reason everytime I try to apply this plugin to work it gives me the following error: &amp;lt;cfset thisTest='testitem'&amp;gt; ?

10
John Sieber

@Simon - Where is that error occurring? Is it in the log table in the database? Is it on any blog post after the plugin is activated, or is it with just a specific post. Are you using tags around the code that your are trying to format with the plugin?

11
Simon

@John Sieber - I wanted to test it so create a new blog entry and typed in . After publishing the post i've tried to view it and can see the plug-in window rendered and styled, however inside instead of seeing my code styled is that error. It seems that special symbol '<' is causing it but it's one of the most used ones in coldfusion code so need to sort it or can't use the plug-in otherwise. BTW massive thanks for your fast responses and all the help.

12
John Sieber

@Simon - what your seeing is the WIZYWIG editor in Mango is escaping the tags. This happens with the built in code formatter in Mango blog as well if I remember correctly. It is a common issue, but I think the EmpireGP code formatter has resolved the issue. I turn off javascript in my browser when adding code blocks to resolve this issue. You'll have to decide if that is an acceptable solution for your needs.

13
Simon

@John Sieber, thanks once again. I've kinda figured that out last night before receiving your answer while playing again and again with different settings. It does show up correctly if entered in non-rich text mode but gets messed up everytime I try to edit it further. Anyway, i've managed to style it a bit to suit my blogs' color scheme and currently working on the first proper post. Thanks for advise on EmpireGP. I've already tried it and TBH much prefer your solution. The only question I'd still have is regarding the background color of the code area. I've managed to find where to insert background-color code to make it white while in styled mode. however, I cannot seem to find how to do it in the non-formatted mode. Any tips would be much appreciated.

14
John Sieber

@Simon - I believe that you will need to make all of your style settings within your style sheet. I'm a little confused about non-formatted mode, but try using something like firebug to see what css rules are being applied and then set items in your style sheet accordingly. Hope that helps!

Write your comment

(it will not be displayed)

Leave this field empty: