S

Adding Multibox

24th August, 2008

Because I didn’t like the way a large comment form appears at the bottom of every post and page on my site, but I still wanted to keep the comment functionality available, I started looking into ways AJAX (and preferably something that uses the mootools library which I added to my site a long while back) could be used to make a form that is hidden until needed, for example in an expanding div like my Flash header.

While using Drupal during my work placement I had seen the likes of forms inside a lightbox style script called Thickbox, so I began searching for a Mootools compatible lightbox that can contain any HTML I want, such as the commenting form, knowing it was possible to find. In the end I came across Phatfusion Multibox, a great variation on Lightbox that allows a number of different things be displayed inside a lightbox.

It was easy enough to implement as well, adding my comment form to a HTML link, however I needed to make a slight change to get it to work in IE7 (and one would guess 6 as well). Basically there is a bug that specifically applies to displaying a HTML element in IE7 and is explained and fixed in http://forum.phatfusion.net/viewtopic.php?f=6&t=149

Posted in Web Design by Simon

Flash, Twitter and crossdomain.xml

22nd April, 2008

As part of the latest FRED website update, I’ve been asked to include a twitter feed integrated into the flash file itself. Not knowing much about twitter itself apart from the basics, like knowing I’d have to take data from a feed and have to make some actionscript that parses the XML, I started the necessary research to see what people had done before me.

It is fortunate then, that I stumbled across this post, Twitter Issues, which describes a scenario that is not unfamiliar to me. It also provides a solution which will ultimately save me time later on! Basically, since some major security updates in Flash quite a long while ago, it hasn’t been able to access data on any server different to the one it is hosted on without express permission from the other server in the form of a special file called crossdomain.xml. I had the same issue when developing the original FRED Roles database stored on one site and accessed via flash from the other. Now Twitter themselves could have solved the issue by simply using a * (star) in their file to allow access from anyone, but for whatever reason they chose not to.

Posted in Work Placement by Simon

Separating Posts from Pages in WordPress

16th April, 2008

I decided that what our wordpress-cross-CMS for Ocean Addict required was the ability to browse through the thousands of expected Pages (pages because of the fact they exist outside of the post timeline as a form of static content) forming the school listings via the inbuilt category system. This was easily achievable by creating a page template specifically for displaying a school listing with the Comments and Categories shown and by using the useful plugin Page Category Plus for replicating the Category selection interface in the admin (I was already aware that this was possible since Pages are simply Posts that are treated differently but still have all the same mySQL fields).

While this side of things worked exactly as expected it threw up a unique issue I hadn’t considered.


Read the rest of this entry »

Posted in General Stuff, Work Placement by Simon

WordPress and SMF Integration

29th March, 2008

As we continue to develop the Ocean Addict website it was decided that the forum needed to be as robust and powerful as possible so this meant installing additional forum software, in the form of a Simple Machines Forum. Once this was done, clearly there needed to be as much integration for users as possible, from logging in to styling the user interface, so I set about searching for a method of bridging WordPress and SMF.

I quickly found http://wordpress.org/extend/plugins/wp-smf-a-simplemachines-bridge/, which seemed ideal. That is until after diligently following the installation instructions the plugin caused the entire site to break. Fortunately WordPress’s plugin system can be rescued by simply deleting the offending plugin.

Searching for much longer wielded a solution based on the first. The stuff that can be found at http://www.earthorbit.com/opensource/ DOES work and works well.

Posted in Work Placement by Simon

Creating breadcrumb links

27th October, 2007

I decided that I would like to create a breadcrumb links bar for the top section of each page of my new website design. A google search brought many many differing ways of achieving this using PHP however none of them seemed to concisely achieve what I needed. So instead I used a few of the most useful examples as a reference and created my own. The following are a good place to start I found, especially the first listed here (although last one I found):

http://www.sillybean.net/archives/452

http://www.zend.com/zend/spotlight/breadcrumb28.php

http://gr0w.com/articles/code/php_breadcrumb_links_creator/

Next comes the CSS for that general area, including my new design’s main navigation.

Posted in General Stuff by Simon

XHTML and Flash

7th November, 2006

An important part of our idat205 Creative Industries company was our use of flash in highly accessible and web standards compliant sites. Even though this was a feature of last year’s idat102 module with Dan Efergan and good website technique, I found myself put off by it all, especially favouring methods that didn’t involve anyone else’s code. Then the odd ‘Click to activate and use this control’ boxes appeared in microsoft Internet Explorer 6 and flash had to just not be used for anything important at all.

The annoying content activation box.
Flash under the ‘Click to activate and use this control’

 

However, I have discovered it really is easier to implement flash successfully than it seems.
So here’s how to do it:

Download the Script

Download the .js javascript file from http://blog.deconcept.com/swfobject/ (site is found very easily with google). Store it somewhere where your flash pages can find it.

Embed the Script

Embed the file within your page
(<script type="text/javascript" src="./swfobject.js"> </script>)

In addition I would place this above any CSS embed scripts it will get rid of the ‘FOUC’ problems discussed in

http://www.bluerobot.com/web/css/fouc.asp.

Embed your Flash File

Finally, you create a <div> of flash alternative content, which is written over if flash is available, like so:

<div id="website_menu">
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("./flash.swf", "flash", "300", "100", "8", "#ffffff");
so.write("website_menu");
// ]]>
</script>

And that is that, the page is XHTML compliant with regards to embedding the flash and IE doesn’t stop the content from interacting. For a list of reasons why this method is good, read more into the swfobject script blog site.

Update:

I’d say the basic parameters are pretty obvious (source,title,width,height,flash version and BG colour) but since this post and after a little experimentation its possible to do a rather lot more using ‘addParam’. For example setting the WMODE to something other than the defaults.

Latest Journal Posts

RSS Feed

Additional