Posts Tagged ‘code’
Saturday, October 28th, 2006
Ok, hopefully the LAST blog pimping up session for a long time. It’s definitely distracting me from doing other stuff haha. Anyway, I managed to update the theme a little bit more, features now include:
- New subtitle bit at the top, had to shave the header padding a bit more to compensate the subtitle.
- Dates are now shown on the right of each post via the calender type thing. This makes more room for category and meta bits under the header
- Changed the header a bit, didnt like the rounded edge thing so I changed it to a normal heading, juiced up the size a bit too
- Used a bit more of the random text plugin, some very subtle ones though, I’m sure you can find them quite easily.
Wednesday, October 25th, 2006
Made quite alot of updates to the blog. Some of them include:
- Managed to add some hatching effect on the top menu, slightly more web2.0 haha (i feel like i’m abusing the visual styles used in web2.0 quite alot these days)
- I really like the styles used for typo (a ruby on rails blogging software). Simple stuff like softer body text (using #666 instead of the obvious #000 or even #333) and the font being verdana helps quite alot in making the site more easier to read. I’m considering making my own skin in wordpress, it looks fun.
- I’ve applied a random text plugin which allows me to shove in the occasional random bit of text for fun, one I’m using atm is the list of words you say when you reply, it can vary from x wrote this to x said that.
- I’ve provided more contact methods to be used for contacting me, the email address will be forward to me instead of using my actual one just to make changing emails alot easier (spam and all)
- I’ve pimped up my about page , it includes a photo of me, as well as some more stuff about me
- Very subtle thing, but I’ve increased the font size of the headings on the sidebar
- Adding a bit of padding to the header thing
- Now I have a left and right class on my css, this means I can use it to float images to the left or right. Pretty useful.
- Added some extra images to jazz the site up a bit, you can see them below


You can find the above on the to do list page and the contact page
For my next blog update, I think I’ll be redesigning the theme myself, might publish it and all too!
Wednesday, October 25th, 2006
Tonight I managed to do some power coding for Musecast, was hoping to get it ready to show Jonathan Briggs after his ecommerce lecture.
The following changes included:
Improved the tags section
The tag section now includes a view tag page where you can view the tag and see where it’s been used. This tagging system is used alot in many web2.0 applications (including this blog) and provides users with a unique way of finding articles by tags rather then by a search engine, it’s almost like GIVING you the search terms rather then making you search it yourself
As well as a view tags php, I also managed to implement a quick tag cloud kind of style for the tags page, all that’s been done is that the query used to draw the tags include the number of times they’ve been used (via the tag links table) which means you can use that as a variable for deciding the size of the font. For now, the algorithm used is number of times used x 10 and the font size will be that (in pt units). I’ll definitely need to calculate a mean average for the tags and use that to generate a few steps of sizes (rather then a big bunch of steps). This shouldn’t be hard at all but I felt like doing other stuff before I got to keying in the algorithms, as well as that I might also include the font colour as another tag cloud factor (like my blog) This one is slightly tedious but still doable
Created the song section
Amazingly enough this was probably the easiest task I did. The songs section was used to tag songs into podcasts, this is so users can find out songs used for it and perhaps make it so each page includes a bit more detail about the song (havent looked into that one yet). The good thing about the songs section was the fact that it was almost identical to the tagging system, it was simply a tag, but with song titles. Though I did consider merging them together. It’s probably better to keep them separate in case I want to add additional fields for the songs section.
Implemented a “Feeds” section
This is where I really get into the xml/rss stuff. This section involved configuring the site to include feeds from other site, all you had to do was enter a url and it will instantly generate a page that includes the items inside the feed. I used a little small app called lastRss.php which allowed me to save time in coding the rss parsing, the api system was pretty neat so it was easy to implement what I needed, though I need to look into a bit more so I can see how I can further use it.
The limit field is probably the bit where I would actually need to look into the lastrss php a bit more, I would like to make it possible for the user to simply limit the feed to a certain amount of items, hopefully that can be done quite easily (should be done via the number of tags.
Quick podcast RSS feed
Managed to quickly knock off an RSS feed for the podcast, this used the fields on the podcast to generate most of the information, I’ve already done stuff like this before so now it’s definitely come in handly, will be using the w3c rss validator to ensure that i’ve got everything I need, not only that, I will probably need to use the podcasting standard too to ensure that it’s a valid podcast feed.
Another thing I will look into is getting feedburner to parse the feed, this tool will prove very useful for my client as he will be able to view all the subscribers to the feed. This tool has been used on most of the big sites such as Neowin which was where I initially found it
Tuesday, October 17th, 2006
Main updates include:
- Major code cleanup; managed to make sure that the code follows some sort of convention, for instance braces and how they are used. I managed to fix this up for both php and xhtml.
- Remove tag links: using a simple delete function, this however only removes the links rather then the tags, will probably work on a tag renamer and perhaps tag remove thing which will not only remove the tags, but remove the links associated with it as well
- Add tag from input box: now tags can be added through an input box as well as click on previous tags (might consider AJAXing the whole thing)
- Fixed a bit of table and input box styles; I accidently used TH to replace TR, when it should be TD. I’ve also made the input boxes descend from the generic div. This means other input boxes outside the generic div will function properly.
Targets for this weekend:
- Complete tagging section (mainly the tag page)
- Reuse tagging section to quickly implement a song used section
- Start on links and staff page, they seem to be very small sections that can be fixed quite quickly
- Have a start on news when the above is completed
Next week I’m hoping to focus mainly on the RSS and Wiki markup features, afterwards I’ll have a meeting with my supervisor to discuss what I should do next for the project.
Tuesday, October 17th, 2006
Managed to clean up the blog a bit, I’ve installed an Archives page for my blog to ensure that I can keep track of my pages, not really keen on the huge list of archive pages on my sidebar, so i’ve made it only visible when viewing the home page and using the achive pages itself. I’ve also moved the related posts thing from the post itself to the sidebar (but only display it when you are reading a single post). What else have I done? uhm, I guess I’ve also added a calender on my sidebar as well as linking my pages on my top horizontal menu. All looking good I must say, though it does feel like a waste of time customising a blog (tedious as hell when you upgrade it too!!!)
Saturday, October 14th, 2006
Today was quite a fun day for coding stuff. Managed to continue adding further functions on the podcasting section. This included assigning tags to podcasts, adding new tags in a tag table, and tricks to make the tagging look nicer.

Learnt a few new tricks on [tag]php[/tag] today too, this included doing comma separated lists from database queries. Instead of echoing them one by one in the while loop, all you do is create a string and slowly add the next item onto the string. The items were followed by a comma to make them separated, but the end will have a comma as well, this is where a quick sub_str function comes into play, it trims the string to whatever you want it to be, in this case we want it to simply trim the last bit
heres an example
$query = "SELECT *
FROM tags";
$result = mysql_query($query,$dblink) or die('Query failed: ' . mysql_error());
while ($line = mysql_fetch_array($result,MYSQL_ASSOC)) {
$currenttags .= $line['tag'] . ", ";
}
echo substr($currenttags,0,-2);
So yeah, lots of [tag]php[/tag] porn up there, hoping to learn some more from kev.
Friday, October 13th, 2006
Tonight I gave a shot at Musecast, was very glad that most of the [tag]css[/tag] was sorted (thanks to Kev), there was going to be the odd tweaks but not that many so its all good. It took a bit of time to understand how Kev coded the site, it seems like he used a template structure from dreamweaver just so popey can easily copy it.
Managed to shove most of the reuseable stuff into functions that echo them whenever they’re needed, this will save alot of space as well as time managing the structure of it all. Once that was sorted I managed to start working on the podcasting managemenet side. Alot of [tag]coding[/tag] was involved, additional [tag]css[/tag] such as tables and forms were added and tweaked so that it matched the site. Once the forms were sorted I got a database and a podcast table up and running. I made forms that inserted podcasts into the podcast table which would be used for the front page as well as generating the rss feeds.
Only managed to do the adding side of things, will look into further detail of other fields and making sure that they can all be tweaked. Hopefully i dont need to do any more [tag]css[/tag]ing. So yeah. Quite a fun evening.
Also managed to get an idea of what the database would be like as a whole, I’ll upload it next time when I’ve found a suitable diagram drawer and all.
Tuesday, October 10th, 2006
My admin page is looking fine and dandy, now I’m doing all sorts of code cleanup jobs. Feeling slightly more confident in making things pretty hehe, did some new links at the top of the blog and all too
Will need to stop coding soon as soon as the individual project kicks in (though I’ll be coding there I guess)