code | subscribe
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.
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!!!)
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.
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.
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)