<< Photo Page | Journals | Harana Christmas Party 2007 >>
My First PMWiki Cookbook
Rommel Pascual November 11, 2007, at 08:10 PM
It's not rocket science but over the weekend, I learned a new language called PHP. It's the language of the web and it might have been better for my career if I spent this time learning ASP instead. However, the world of Open Systems have a special place in my heart. I can rave on about Open Systems but I'll digress.
Well the cookbook is currently called flickr_badge.php although it really has nothing to do with flickr. It's just that I wanted to incorporate some flickr badges in my PMWiki and there is no easy way to drop embedded scripts.
On the right is a slide show that can easily be created from webshots. I've copied the script into a text file and gave it an appropriate name: webshots_acnielsen_ride.txt. The file is then uploaded in the Site.Snippets page.
As a bit of info on the actual photo, It was taken on 24 October 2004 at Bicentennial Park, Homebush Bay, during an organised ride by the Livewire Club of ACNielsen. We were meant to cycle all the way to Parramatta with the group but our friend who was just getting back on the bike was not up to it. So we decided to just explore the park. Your soundcard is alright - there is no sound with the slideshow.
Setup
In the local config.php, I've added the lines:
$SnippetsHome='complete_wikipath/uploads/Site/Snippets';
include_once("$FarmD/cookbook/flickr_badge.php");
As the setup suggests, I'm using absolute file addresses instead of using URL to loacate the snippet. I have no success establishing if a URL is readable using my 1 weekend old PHP knowledge. This means that any snippets will have to be uploaded into this location. Note that if your $UploadPrefixFmt = '/$Group'; is set as a group instead of '/$Group/$Name'; then you should set your :
$SnippetsHome='/complete_wikipath/uploads/Site';
The last '/' should not be added, I didn't put a lot of code to handle this posibility.
The function of flickr_badge.php is to read the uploaded script into the page using the markup:
(:flickrbadge webshots_acnielsen_ride.txt:)
I will change the cookbook name to something more appropriate. Meanwhile, I'm still configuring my cvs repository - but that's another story.