[Simplog-devel] Some tweaks
Brought to you by:
f-bomb
From: Jim Hu <ji...@ta...> - 2004-09-26 02:42:37
|
I decided that it's a bit of a pain to have to scroll through a list to find a specific post in order to edit it, so I set up my blogs so that when you view just that specific post, an Edit link replaces the permalink link...after all, clicking the permalink would just send you to the same view. Here's what I did: In archive.php: foreach ($blogEntries as $blogEntry) { $line = marker_sub(stripslashes($blogInfo->getBlogTemplate()),$blogEntry, $blogInfo); if ($_REQUEST['pid']){ $line = str_replace("archive.php?","edit.php?act=edit&",$line); $line = str_replace(">permalink<",">Edit<",$line); } echo $line; replaces the original foreach loop. That's all it takes. Jim |