Archive for the ‘WebDev’ Category

Switched to WordPress as CMS

Monday, June 5th, 2006

I’ve decided to ditch my custom CMS for the time being - unfortunately I haven’t really got the time or inclination to work on developing it right now.

I’ll retroactively add my existing posts to this Wordpress installation as some of them were quite useful!

Zebra Tables In WordPress

Thursday, May 18th, 2006

I was having great difficulty in pasting a zebra table (with <tr class="odd"> for odd rows) into the Wordpress TinyMCE editor…

After messing around with the sourcecode for a while I realised that the TinyMCE editor_plugin.js was the culprit.. after commenting out the “Handle table badness.” bit I could give my rows classes

At the moment I don’t have time to look into the issue further and provide a real solution

I realise I could’ve used some sort of Zebra Table javascript but in this case manually formatting the rows was the order of the day

Regarding this website.. unfortunately I just don’t have the time to finish building my custom CMS so in the near future I will probably base it off a heavily customised Wordpress install… watch this space

ColourBase and WordPress

Saturday, March 11th, 2006

I’ve been working on my ColourBase website recently.

I decided that rather than have a half assed publishing system (like the currently unfinished one I use on this website), that I would instead try to integrate WordPress into the existing website..

It seems to have worked quite well!

I will probably adopt it here, I think that’s the best bet until I can finish my own system completely :)

Removing cruft from Google via GoogleBot

Monday, December 12th, 2005

I submitted a request to Googlebot on 30th November to remove all pages relating to my /forums/ as there’s stuff still indexed/cached in Google that’s not been there for months

I noticed today that in the past couple of days the status of the request had changed to completed.. so I search google site:www.influenced.net and there’s still a lot of stuff that’s indexed under /forums/ which doesn’t exist.. so what the heck has been completed exactly?

I’m going to retry it via a rule to deny indexing the /forums/ folder in robots.txt and see what happens..

Edit: robots.txt seems to have done the trick

PHP-Markdown & PHP 5.1 Fix

Wednesday, November 30th, 2005

Today influenced.net’s host has had its PHP module upgraded from version 4.x to 5.1.1.. this broke a couple of things, most notably PHP-Markdown

I proceeded to download the latest version of PHP-Markdown but still, the issue remained..

The fix was to modify the _DoCodeBlocks function as follows:

function _DoCodeBlocks($text) {
#
#   Process Markdown `<pre><code>` blocks.
#
global $md_tab_width;

$text = preg_replace_callback('{
(?:nn|A)
((?:(?:[ ]{'.$md_tab_width.'}|t).*n+)+)
((?=^[ ]{0,'.$md_tab_width.'}S)|Z)
}xm',
'_DoCodeBlocks_callback', $text);

return $text;
}

I don’t exactly know why this change worked, it seems something wasn’t being escaped properly

PHP 5.1

Thursday, November 10th, 2005

Where has it gone?

It seems to have disappeared from the php.net downloads page for some reason..

I’ve found it again though @ snaps.php.net

Looks like I’ll be using the mysql php extension for the time being on hmgpaint.co.uk as the mysqli extension only works with php 5.1 and you can’t have both installed apparently on linux (libmysqlclient12 vs libmysqlclient14)

Flash in XHTML

Friday, October 21st, 2005

I’ve read a couple of articles about the markup necessary to display Flash content in a XHTML page and validate fully.. e.g. The Satay Method

I was just thinking - instead of using a Flash container movie to load other movies (so IE can stream).. can’t you just create a HTML page with a DocType which allows the Flash mumbo-jumbo, then embed that via the object tag? Would the double object embed work?

I think I’ll try this later and report my findings

Multiple opposing float troubles

Wednesday, October 19th, 2005

I’ve been having a lot of trouble trying to get my layout to look the way I want it. The following image shows what I was aiming for:

Screenshot

Description of image:

  • content_container is just a default div with margins such that it’s centered
  • There are multiple article div’s, each just a default div
  • There is one article_icon div per article, it’s floated left
  • #right1 is a right floated div inside #content_container
  • #right2 is a right floated div inside #content_container, it has clear: right set so that it appears beneath #right1.. it’s about half the width of #right1

Unfortunately whenever I tried this, adding a clear:right to the second right float would cause the left float to move downwards on FF and Opera but IE still rendered alright.

In the end I’ve now stuck both the right floats into a single right float, i.e. so there’s no need for a clear: right, which works but doesn’t look as good…

Javascript & CSS attributes (Visibility vs Display)

Thursday, September 8th, 2005

I’m messing around trying to create a “Daily del.icio.us links” box which is dynamically populated via AJAX & a PHP + Magpie RSS script…

I’m using prototype.js as I’ve mentioned previously as a generic AJAX helper library. I was stumped when Element.show stopped working.. then I realised that it just changes the display: attribute to be null and I was using visibility: hidden..

Apparently the difference between the two is that if an element has display: none set - no space is reserved for it at all, whereas it actually exists and owns space with visibility: hidden..

Also I have learned via google searching that setting display: ” on a div still won’t show it, so I guess I’m going to be patching prototype.js again

Borders & margin collapsing

Tuesday, September 6th, 2005

I added a border around my “content div” which holds the blog entries and it made the “content div” lose the gap between itself and the footer

Reminded me of this post I made a while ago on the CSSCreator Forums.