PDA

View Full Version : url encoded tags for bookmark engines


tomyeah
05-15-2007, 12:00 PM
lots of people use bookmark engines like delicious, digg, technorati, reddit, magnolia, yahoo, google and whatever. all require url encoded strings at least for their href attrib in the link. i always modified my index.php but i think it should be included in the next pixelpost version. its pretty simple to just add for all tags (or as many as possible) an url encoded version.

sanple from my index.php

//old line
$tpl=ereg_replace("<EXIF_CAPTURE_DATE>",$capture_date,$tpl);
//added line below
$tpl=ereg_replace("<EXIF_CAPTURE_DATE_URL_ENCODED>",urlencode($capture_date),$tpl);

//old line
$tpl = ereg_replace("<IMAGE_TITLE>",$image_title,$tpl);
//added line below
$tpl=ereg_replace("<IMAGE_TITLE_URL_ENCODED>",urlencode($image_title),$tpl);

//old line
$tpl=ereg_replace("<SITE_TITLE>",$pixelpost_site_title,$tpl);
//added line below
$tpl=ereg_replace("<SITE_TITLE_URL_ENCODED>",urlencode($pixelpost_site_title),$tpl);


regards, tom.

mgroleau
05-15-2007, 01:00 PM
Hello,

You do not need to modify index.php to do this, you have to create an addons file placed in the addons folder.

Consult the WIKI page about creating addons (http://wiki.pixelpost.org/index.php?title=How_could_I_write_my_own_addon_for _Pixelpost%3F), it is very simple.

Best regards

tomyeah
05-15-2007, 02:08 PM
for such a simple and essential task i wouldnt like it as an addon that needs an additional database call or server traffic.

mgroleau
05-15-2007, 03:54 PM
Ok, But if a pixelpost update is necessary in the future, by example version 1.6.1, you will have to patch all files you modified each time an update occurs and do not forget any line.

Best regards.

tomyeah
05-15-2007, 08:55 PM
exactly, thats why im requesting at as a standard feature of upcomming pixelpost versions v1.6.x

regards, tom.

Dkozikowski
05-16-2007, 02:52 AM
For now, making this into an addon will be the better solution.