I would like to alter the archive function of the SomeryC webcomic script (http://someryc.jackofallblades.com/) but simply don't know enough about php to do so.
All I want is for the archive function to populate an unordered list of consecutively numbered entries, each linking back to my comic.php page and displaying the relevant comic jpg on there. As it stands, the function creates a javascript drop down menu. Here's the code:
function dropArchive($title="Archive", $output="%",$type="title",$dtype="d/m/Y") {
global $total,$arow,$prefix,$p,$settings,$PHP_SELF;
if ($settings['archive'] != "0") { $limit = " LIMIT ".$settings['archive']; }
echo "<script language='JavaScript'>
<!--
function gotoSite(obj) {
var s;
s=obj.options[obj.selectedIndex].value
location.href=s;
}
// -->
</script>
<select name='Archive' size='1' language='JavaScript' onchange='gotoSite(this)'><option value='comic.php'>".$title."</option><option></option>";
$result = mysql_query("SELECT * FROM ".$prefix."comics WHERE status = '1' ORDER BY id DESC$limit");
while($row=mysql_fetch_object($result)) {
echo "<option value='".$PHP_SELF."?p=".$row->id."'>".debbcode($row->title)."</option>";
$info=eregi_replace("\%",$more,$output);
echo $info;
}
echo "</select>";
}
The reason I want to make this change is because I've opted for an archive.php page which is going to house all my comic page links, grouped into the related chapters. Preferably, I would be able to just include the new archive function into my chapter boxes, and watch them fill up as more comic pages are uploaded.
Any help at all would be great. Thanks.