|
#1
|
|||
|
|||
|
Important! Document update to Multi-Categories
Seems I forgot one additional change to your index.php file.....this little bug was spotted by "tseneadza"...thanks man!
To build your browse archive screen properly (per category), you'll have to make some changes....This part is semi-tricky, because i really dont know what you may have or have not done to your "browse" section...This seems like an area that everyone has customized... For consistency, i'll show what you'll need to change if you were using the original "browse" section of pixelpost 1.3 with no mods... Change: Code:
if($_GET['x'] == "browse") {
$thumb_output = "";
$where = "";
if($_GET['category'] != "") { $where = "and (category='".$_GET['category']."')"; }
$query = mysql_query("select id,headline,image from ".$pixelpost_db_prefix."pixelpost where (datetime<='$cdate') $where order by datetime desc");
while(list($id,$title,$name) = mysql_fetch_row($query)) {
$title = pullout($title);
$thumbnail = "thumbnails/thumb_$name";
$thumb_output .= "<a href='$PHP_SELF?showimage=$id'><img src='$thumbnail' alt='$title' title='$title' class='thumbnails' /></a>";
}
$tpl = ereg_replace("<THUMBNAILS>",$thumb_output,$tpl);
}
// build browse menu
Code:
if($_GET['x'] == "browse") {
$thumb_output = "";
$where = "";
if($_GET['category'] != "") {
$query = mysql_query("select t2.id,headline,image,datetime from ".$pixelpost_db_prefix."catassoc as t1 inner join ".$pixelpost_db_prefix."pixelpost t2 on t2.id = t1.image_id where t1.cat_id = '".$_GET['category']."' order by datetime desc");
} ELSE IF ($_GET['archivedate'] != "") {
$where = "and (DATE_FORMAT(datetime, '%Y-%m')='".$_GET['archivedate']."')"; //DATE_FORMAT(foo, '%Y-%m-%d')
$query = mysql_query("select id,headline,image, datetime from ".$pixelpost_db_prefix."pixelpost where (datetime<='$adjusted_datetime') $where order by datetime desc");
} ELSE {
$query = mysql_query("select id,headline,image from ".$pixelpost_db_prefix."pixelpost where (datetime<='$cdate') order by datetime desc");
}
while(list($id,$title,$name) = mysql_fetch_row($query)) {
$title = pullout($title);
$thumbnail = "thumbnails/thumb_$name";
$thumb_output .= "<a href='$PHP_SELF?showimage=$id'><img src='$thumbnail' alt='$title' title='$title' class='thumbnails' /></a>";
}
$tpl = ereg_replace("<THUMBNAILS>",$thumb_output,$tpl);
}
// build browse menu
Sorry everyone... :!: |
|
#2
|
|||
|
|||
|
I installed this mod and made sure to edit the code as per the instructions but I'm not seeing a category list. Any suggestions?
When I ran the install assoc.php, it ran and looked ok. Told me to delete the file so I did. Then I stuck the mult cat file in addons and it shows up, but no dice. I wanted to add: I assume the file I am supposed to be editing is the one in www, because it's the only index.php that has "browse". Pls. correct me if I've done something wrong--I just found pixelpost tonight and am just getting familiar with it.
__________________
shana |
|
#3
|
|||
|
|||
|
Sounds like you have done everything right except for modifying the index.php that is in your "admin" directory...
The "browse" stuff was just something i forgot initially... The main piece is the index.php in admin....the doc that i supplied outlines all the changes..... btw, what did you mean by "nested categories". Im not sure i understand the difference... |
|
#4
|
|||
|
|||
|
Yeah, I would be that guy, wouldn't I? Apologies!
RE: the nested categories--I'll answer inside that thread to keep this one on topic. Thanks! (sorry again...)
__________________
shana |
| Post Reply |
| Thread Tools | |
|
|