View Single Post
  #4  
Old 02-15-2005, 01:16 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
partial answer
modify the index.php at about line 113
Code:
// images/main site
if($_GET['x'] == "" ) {
// Get Current Image.
if($_GET['showimage'] == "" ) {
	$query = mysql_query("select * from ".$pixelpost_db_prefix."pixelpost where datetime<='$cdate' order by datetime DESC limit 0,1");
	
	} else {
		if($_GET['categoryid'] =="" ){
			echo $_GET['categoryid'];
			$query = mysql_query("select * from ".$pixelpost_db_prefix."pixelpost where (id='".$_GET['showimage']."')");
		}
		else
		{
    	$where = " (category='".$_GET['categoryid']."')"; 
    	$query = mysql_query("select * from ".$pixelpost_db_prefix."pixelpost where  $where order by datetime desc");
    }

	
	}
and use this new addon

Code:
<?php
/*

Requires Pixelpost version 1.3
Category List of Links (vertical)
Written by: Ramin Mehran
Contact: raminia@yahoo.com 


Pixelpost www: http://www.pixelpunk.se/software/
License: http://www.gnu.org/copyleft/gpl.html

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/

$addon_name = "Category List of Links";
$addon_description = "This addon will enables the tag &ltCATEGORY_LINKS_AS_LIST>
 A vertical List of category names with link to each.";

$addon_version = "0.1";

	// Get the number of thumbnails shown at once from the admin config
	$cfgquery = mysql_query("select * from ".$pixelpost_db_prefix."config");
	$cfgrow = mysql_fetch_array($cfgquery);

	//---------------------------
	
	$browse_select = " <a href='?x=browse'> $lang_browse_all </a><br>"; 
	$query = mysql_query("select * from ".$pixelpost_db_prefix."categories order by name"); 
	while(list($id,$name) = mysql_fetch_row($query)) { 
    $name = pullout($name); 
    $category_Link_List .= "<a href='?showimage=0&categoryid=$id'>$name</a><br>"; 
    };


  $tpl = ereg_replace("<CATEGORY_LINKS_AS_LIST>",$category_Link_List,$tpl);
	    

?>
and then write some code to produce thumbnails according to the category id. (it's simple)
but in this way this would not be a photoblog anymore but just a photo album!
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote