Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Template design and Front-End Code

Post Reply
 
Thread Tools
  #1  
Old 07-18-2005, 08:02 PM
timmm Offline
forum loafer
 
Join Date: Jul 2005
Posts: 7
Category Images Horizontal or in a block

Hi,
i really like pixelpost. now i want to put the category links into a block or as a horizontal bar under the title.
is that possible? how?

i hope you can help me.

tim
Reply With Quote
  #2  
Old 07-18-2005, 08:44 PM
Connie
Guest
 
Posts: n/a
Tim,

do you mean the category of the actual image or all categories?

use <IMAGE_CATEGORY> and place them where you want to, they contain the links to the categories of the actual image

if youuse the paged_archiv_addon, use <IMAGE_CATEGORY_PAGED> instead
Reply With Quote
  #3  
Old 07-18-2005, 09:28 PM
timmm Offline
forum loafer
 
Join Date: Jul 2005
Posts: 7
thanks for the fast reply, but i meant the category_links.php-addon for the mainpage.
Reply With Quote
  #4  
Old 07-18-2005, 09:31 PM
Connie
Guest
 
Posts: n/a
ah, where is my christall-ball? :lol:

I don't use that addon, so I did not look into it.. maybe you ask the author of that addon?
Reply With Quote
  #5  
Old 07-18-2005, 09:36 PM
timmm Offline
forum loafer
 
Join Date: Jul 2005
Posts: 7
aus deiner signatur lässt sich ja schließen, dass du deutsch bist
wo finde ich denn die kontaktdaten des autors?
Reply With Quote
  #6  
Old 07-18-2005, 10:11 PM
Connie
Guest
 
Posts: n/a
ich bin nicht "deutsch", ich bin sogar Hamburgerin ;=)

ja, der Autor,. der steht auf der Downloadseite meistens vermerkt, ain't it not so?

you mean Category List of Links (vertical)?
test this:

save this as category_links_horizontal.php
ftp it to the addon-directory

Code:
<?php
/*

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

updated by Connie Müller-Gödecke, July 2005
Pixelpost www: http://www.pixelpost.org
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 enables the tag <CATEGORY_HORIZONTAL>
<br />A horizontal List of category names with link to each and number of photos in it.";

$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);

	//---------------------------
	unset($category_Link_List);
	// $browse_select = "<a href='?x=browse'> $lang_browse_all </a>";
	$query = mysql_query("select * from ".$pixelpost_db_prefix."categories order by name");
	while(list($id,$name) = mysql_fetch_row($query)) {
        $count = mysql_query("select count(*) as count from ".$pixelpost_db_prefix."pixelpost where category=".$id);
        $count = mysql_fetch_array($count);
        $count= $count['count'];
		    $name = pullout($name);
		    $catname_count = $name ." (" .$count .")";
    		$category_Link_List .= "<a href='?x=browse&category=$id'>$catname_count</a>||\n";
   	
    };
  $tpl = ereg_replace("<CATEGORY_HORIZONTAL>",$category_Link_List,$tpl);
?>
use the tag <CATEGORY_HORIZONTAL> in your template
Reply With Quote
  #7  
Old 07-19-2005, 02:20 PM
timmm Offline
forum loafer
 
Join Date: Jul 2005
Posts: 7
thanks, now it's horizontal. but it doesnt show the right numbers of pictures. maybe you take a look at www.prsonline.de/photobase to see the problem.

tim
Reply With Quote
  #8  
Old 07-19-2005, 05:42 PM
Connie
Guest
 
Posts: n/a
Tim,

I will look into it, but :

Please give me some time, as I have to prepare my birthday party ...
Reply With Quote
  #9  
Old 07-19-2005, 06:23 PM
Connie
Guest
 
Posts: n/a
Tim,
I see it's wrong, but I don't see the error in the moment..
Reply With Quote
  #10  
Old 07-19-2005, 06:52 PM
timmm Offline
forum loafer
 
Join Date: Jul 2005
Posts: 7
ok, thanks in advance
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 06:13 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs