
Now that Witheringtree created a shadowbox plugin for mango blog, I wanted to show you how you can make it easy to use within the mango blog admin. The process is not too complicated, but does take a little bit of explanation.
Let me start off by saying, that I have not yet used Witheringtree's shadowbox plugin, though I suspect it will work just fine. It's mostly just including the necessary Javascript files so this should work regardless of wether your using the plugin or not.
To start, you need to modify the /admin/editorSettings.cfm file to enable advanced linking. Honestly, I think this should be enabled by default for new mango blog installs, and maybe it will someday. For now, we have to make some changes manually.
Step 1. Go to line 16; where it says "plugins" and lets add "advlink" to the list of available plugins. This will turn on some extra features in the link dialogue box that we will use later. While your there, you may also wish to add "safari" to the list if you have users that use use the Apple Safari web browser. It only gets called if the browser being used is safari so FF and IE will not load the plugin. tinyMCE comes with some other useful plugins so check out the plugin reference page for a full list of plugins. Make a backup of your configuration settings and keep it safe. In the past, I have had some updates to mango blog overwrite these settings and change it back to the defaults.
Step 2. Next we need to drill down into the admin files and find the tinyMCE advanced link file. You can find it located here buried deep into the assets folder: /admin/assets/editors/tinymce_3/jscripts/tiny_mce/plugins/advlink/link.htm
Scroll on down to around line 198 or search for "rellabel" this is the drop down menu where you can select the necessary relative linking option. The first option is lightbox which last I recall reading, shadowbox can use. For our purpose lets add two new lines just before the lightbox option.
<option value="shadowbox">Shadowbox</option>
<option value="shadowbox[group]">Shadowbox Group</option>
This will give you the option to have both the single shadowbox display and the grouped output that automatically inserts the previous and next buttons to your pop up display.
Step 3. To put all this to use, you only need to link your image or other media as normal, but before you exit the link dialog box, you need to go to the "Advanced" section and change the "Relationship page to target" to the appropriate Shadowbox item. You can also add a title in the "General" tab. The title will appear with your image when it pops up.

A few years ago, Dustin Diaz started a Web Standards movement aimed to promote web standards around the world. He dubbed it CSS Naked Day! A day when websites around the world strip out their css and show off their for a day.
Last year I hard coded a toggle into my website and totally forgot about it until I just happened to go to my website and find the css was gone. My first reaction was to crap a blue twinkie and wonder what had happened. Then I saw the alert at the top of the page telling me it was CSS Naked Day. Imagine my relief.
This year I decided to create a plugin for Mango Blog that automatically removed the css and added the notification message to tell users that it was css naked day.
- Plugin version:
- 1.0
- Last Updated:
- 2009-04-10
- Requires:
- Mango Blog 1.3+
- Auto-install URL:
- http://www.visual28.com/assets/content/mango/cssNakedDay.zip
What If I Don't Have Mango Blog
Since not everyone uses mango but may still want to participate in CSS Naked Day with their coldfusion powered blog I thought I would throw in some samples of my code from before the creation of the Mango Plugin. It's really simple but for a CF newbie it might be usefull.
Place this in your <head> and put your css files into it.
<cfif day(now()) neq 9 OR month(now()) neq 4></cfif>
Put this code just inside the <body> tag.
<cfif day(now()) eq 9 and month(now()) eq 4>
<div id="naked" style="background:#ffc;padding:5px;color:#900;">
<h3>What happened to the design?</h3>
<p>To know more about why styles are disabled on this website visit the <a href="http://naked.dustindiaz.com" title="Web Standards Naked Day Host Website">Annual CSS Naked Day</a> website for more information.</p></div>
</cfif>
The biggest issue I have with running my own server is dealing with spam blockers, email servers, DNS servers, etc. For some of you this is easy, and a no brainer. I personally run from it like a screaming banshee. I use google hosted services for all my email needs. They make it easy, rarely ever have downtime, and the spam filtering is second to none!
Google works fine for sending email from my desktop mail client or through the web, but sending mail via scripts programatically has always been a pain in the butt in my experience. That is until today.
I started getting a lot of undelivered emails and decided it was time to look for another option. After much research, I found an article on TACFUG: ColdFusion 8 likes Google Apps. The article is incomplete and only shows some code for step 2. Not very helpful. I assume it had photos but they may have been deleted at some point. It lead me to my own testing and discovery so I guess it did help in some way.
Here is what I found. Google can accept email from your CF server but it must support SSL and TSL Connections. Coldfusion Server versions previous to CF8 did not support this. So If your using an older version of CF there is a workaround using Doug Boude's sTunnel method. Since I discovered that CF8 supports SSL and TSL connections, I will talk about that here.
Configure ColdFusion Admin
This is actually super simple and I wish I had discovered it before. It would have saved me so much heartache and pain in the past. Here is a screen shoot for reference.
- Go to the Server Settings for "Mail" and set the Mail Server value to smtp.gmail.com
- Set the Username field to a valid username in your google account.
- Add the obvious password for this account
- Lastly check the two boxes to enable SSL and TSL connections and submit.
Thats really all there is to it. Now when your server sends an email it will pass it off to Google for delivery and you will see the email appear in your sent mail folder in google webmail. Easy as pie!
< Previous Entries