Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #21  
Old 02-17-2005, 09:25 PM
romamor Offline
pp regular
 
Join Date: Feb 2005
Posts: 21
Sorry if this is a trivial question, I am new to pixelpost and PHP;

What do I call the mod file?
How do I install this mod?
Are there any files to be modified?

Thanks for any help

[quote="raminia"]Another Addon!
Archive page with thumbnails that have maximum number of thumbs in each pages. Usefull when you have plenty of photos in archive and you do not want it to be bulky.
Two new tages
<THUMBNAILS_WHOLE_PAGED> : Thumbnails but limited with maximum number your mention in each page.
<THUMBNAILS_PAGES_LINKS> : Links to each page of archive of thumbnails in the Browse Archive page
Reply With Quote
  #22  
Old 02-17-2005, 09:37 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
its an addon not a modification. for addons u don't need to change codes. just copying the addon file to the addon folder of pixel post will enable them.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #23  
Old 02-17-2005, 10:43 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
Quote:
Originally Posted by Zlato
Ok Ramin, i will look at that, thanks anyway for such patience...

Last but not least and that's the final point, when chose a categories for sure the pages at the bottom remains..try it on my site...

You're my best Ramin

Regards
check out my photoblog and see how I handled it the old archive plus this paged archived. (addon is extended a little)
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #24  
Old 02-17-2005, 11:15 PM
Zlato Offline
pp regular
 
Join Date: Feb 2005
Location: Paris - FRANCE
Posts: 43
Ok it seems it's work very fine, but the point I don't understand is why do you have 8 thumbs in a row, is it your choice by working on style sheets, as you already said to me ?

ANyway it's real fine !

the picture "Chandelier" is quite as i like to do myself, and this one is really good, i like it.
__________________
A. Zlatogorov
Ecrivain de lumière
Reply With Quote
  #25  
Old 02-18-2005, 01:28 AM
Zlato Offline
pp regular
 
Join Date: Feb 2005
Location: Paris - FRANCE
Posts: 43
All is allright now i have change little things for my needs as you can see on my archive page...here are the modifications:

Code:
   if($_GET['x'] == "browse") {
    $thumb_output = "";
    $where = "";
    $limit = "";
    if($_GET['category'] != "") { $where = "and (category='".$_GET['category']."')"; }
    if ($_GET['pagenum'] != "") {$start = $maxnumber_thumbs*($_GET['pagenum']-1);
       $limit = " limit  $start , $maxnumber_thumbs ";};
   
    $query = "select id,headline,image from ".$pixelpost_db_prefix."pixelpost where (datetime<='$cdate') $where order by datetime desc" .$limit;
    $query = mysql_query($query);
	$thumb_output .= "<table cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><td>";
	$i = 0;
    while(list($id,$title,$name) = mysql_fetch_row($query)) {
       	$i++;
	    $title = pullout($title);
        $thumbnail = "thumbnails/thumb_$name";
        $thumb_output .= "<td align=\"center\"><a href='$PHP_SELF?showimage=$id'><img src='$thumbnail' alt='$title' title='$title' class='thumbnails'onMouseOver=\"this.filters.gray.enabled=false\" onMouseOut=\"this.filters.gray.enabled=true\"  /></a><br />$title<br /><!--$mydate--></td>";
     
		if ($i == 5) {$i=0; $thumb_output .= "</td></tr><tr><td align=\"center\">";}
        }
		$thumb_output .= "</td></tr></table>";
here
Code:
if ($i == 5)
i can change the amount of thumbnails per row...

for the, very small, rest i know you working on it ...
__________________
A. Zlatogorov
Ecrivain de lumière
Reply With Quote
  #26  
Old 02-18-2005, 06:07 AM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
Quote:
Originally Posted by Zlato
Ok it seems it's work very fine, but the point I don't understand is why do you have 8 thumbs in a row, is it your choice by working on style sheets, as you already said to me ?

ANyway it's real fine !

the picture "Chandelier" is quite as i like to do myself, and this one is really good, i like it.
Thanks!

the 8 pic are the result of the window size. try changing the windows size and you see there would be different number of rows and columns.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #27  
Old 02-18-2005, 06:26 AM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
addon's new version. some new tags to handle the browse archive with a single <THUMBNAILS_WHOLE_PAGED> that behaves as <THUMBNAILS> when there is no page mentioned.
there is also some other usefull tags for achive page such as archive page number, the name of the category user is browsing.

-- That's the version I mentioned in my last post and it is working on my pblog.


Code:
<?php
/*

Requires Pixelpost version 1.3
Archive Thumb Paged 
Written by: Ramin Mehran
Contact: raminia@yahoo.com 


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

*/

$addon_name = "Archive thumb paged";
$addon_description = "Archive page with thumbnails that have 
maximum number of thumbs in each pages. Usefull when you have 
plenty of photos in archive and you do not want it to be bulky.
<br>Two new tages<br>
<THUMBNAILS_WHOLE_PAGED> : Thumbnails but limited with maximum number your mention in each page.  <br>
<THUMBNAILS_PAGES_LINKS> : Links to each page of archive of thumbnails in the Browse Archive page<br>
also CATEGORY_NAME_PAGED_ARCHIVE and ARCHIVE_PAGES_NUM for navigation and title of archive page.
";
 
$addon_version = "0.1";

// Edit this by your preference
	$maxnumber_thumbs = 50; // maximum number of thumbnails in each browse page (e.g 5)

/*	// 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);
*/	
	//---------------------------
	if($_GET['x'] == "browse") {
    $thumb_output = "";
    $where = "";
    $limit = "";
    $pagenum = $_GET['pagenum'];
    
    if($_GET['category'] != "") { $where = "and (category='".$_GET['category']."')"; }
    if ($_GET['pagenum'] != "") {$start = $maxnumber_thumbs*($_GET['pagenum']-1);
    	$limit = " limit  $start , $maxnumber_thumbs ";};
    $query = "select id,headline,image from ".$pixelpost_db_prefix."pixelpost where (datetime<='$cdate') $where order by datetime desc" .$limit;

    $query = mysql_query($query);
    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>";
        
        }
    }
    $pagecounter=0;
	    
	  // Get number of photos in database
	$photonumb = mysql_query("select count(*) as count from ".$pixelpost_db_prefix."pixelpost where datetime<='$datetime'");
	$row = mysql_fetch_array($photonumb);
	$pixelpost_photonumb = $row['count'];
	
	$num_browse_pages = ceil($pixelpost_photonumb/$maxnumber_thumbs);


	$Archive_pages_Links = "";

	while ($pagecounter < $num_browse_pages)
	{
		$pagecounter++;
		$Archive_pages_Links .= "<a  href=?x=browse&pagenum=$pagecounter>$pagecounter</a> ";
	}
	
	// new tages
	if ($pagenum!=""){
		
$tpl = ereg_replace("<THUMBNAILS_WHOLE_PAGED>",$thumb_output,$tpl);
$tpl = ereg_replace("<THUMBNAILS_PAGES_LINKS>",$Archive_pages_Links,$tpl);

$tpl = ereg_replace("<ARCHIVE_PAGES_NUM>",$pagenum,$tpl);

$tpl = ereg_replace("<CATEGORY_NAME_PAGED_ARCHIVE>","",$tpl);
}
else { 
	// the original thumbnails for browse archive
    if($_GET['category'] != "") {
    	$catid = $_GET['category'];
    	$query = mysql_query("select name from ".$pixelpost_db_prefix."categories where id='$catid'");
			$images_category = mysql_fetch_array($query);
			$images_category = pullout($images_category['name']);
			
    }
    
    $tpl = ereg_replace("<THUMBNAILS>",$thumb_output,$tpl);
	
	$tpl = ereg_replace("<THUMBNAILS_PAGES_LINKS>",$Archive_pages_Links,$tpl);
	$tpl = ereg_replace("<ARCHIVE_PAGES_NUM>","all",$tpl);
	$tpl = ereg_replace("<THUMBNAILS_WHOLE_PAGED>",$thumb_output,$tpl);
	$tpl = ereg_replace("<CATEGORY_NAME_PAGED_ARCHIVE>",$images_category,$tpl);}
	
	
?>
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #28  
Old 02-18-2005, 08:52 AM
Zlato Offline
pp regular
 
Join Date: Feb 2005
Location: Paris - FRANCE
Posts: 43
All is ok ! Ramin....

but there's still this behavior : when on a category the navigation pages remain...sorry for that...

For the rest as you can see here

http://www.zlatogorov.com/pixelpost/...&pagenum=1

it's work G-R-E-A-T as usual Ramin !



Cheers
__________________
A. Zlatogorov
Ecrivain de lumière
Reply With Quote
  #29  
Old 02-18-2005, 08:58 AM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
yes but wanted them to be there.
if you don't want them, move
Code:
$tpl = ereg_replace("<THUMBNAILS_PAGES_LINKS>",$Archive_pages_Links,$tpl);
into the if clause and then pass blank "" to it when they category browsing is happening.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #30  
Old 02-18-2005, 09:43 AM
Zlato Offline
pp regular
 
Join Date: Feb 2005
Location: Paris - FRANCE
Posts: 43
sorry ops: don't understand how to do that...in which "if" clause
__________________
A. Zlatogorov
Ecrivain de lumière
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 01:01 AM.

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