Monday, April 18, 2005

Mr Chuffed!

I thought i would make a posting as i am feeling all chuffed after solving something in Blogger that i have wanted to do for a while now. And it only took me an hour! On my sister blog - The Music Club - which i share with 5 other friends I wanted to put the picture from the blogger profile against each posting the individual members make. I got this idea from the Blogger comments pages that were changed earlier this year to show the comenters profile pic to the left of the text. Unfortunately there is no <$BlogItemAuthorProfileImageURL$> tag available to insert into the template (yet) so i had to create the code myself. Here's the science bit: So basically what this little bit of code does is store the value of the BlogItemAuthorNickname tag into a variable called bloggername. Then a series of IF statements decides which person made the post and writes HTML into the page using the document.write statement with the picture from their profile and also a link to said profile. If you want the code then just email me or leave a comment and i will forward it on, or you can grab it from the source code of the Music Blog site. It's all very basic stuff and is not dynamic, meaning that i will have to put new members in there if and when they join - but it's a start. Not bad for someone who has never done Javascript before and has not done any *real* code for about 8 years! The next task is to generate a dynamic header image from the Spell With Flickr code. Another late night ahead! Thank god for Google, the holy Coffee and the virginal VoyeurWeb that keeps me awake during these trying times.

2 comments:

Captain Beefheart said...

Get her! It all sounds frightfully grown up and very impressive. When I've sobered up I'll have another bash at understanding it!

Well done fella!
xx

bigfootcookie said...

Only a visit to Vouyerweb can clarify the mind enough to achieve this level of intelligence. Arse.