Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 04-06-2005, 09:13 PM
aswilliamson Offline
pp regular
 
Join Date: Mar 2005
Posts: 21
Send a message via MSN to aswilliamson
More than one photo a day on the same page.

Would it be possible for someone to make a mod that would make pixelpost display all the photos submitted on the same day appear on one page.
This has been talked about in this thread http://www.pixelpost.org/forum/viewtopic.php?t=654

that way if say you take 3 pictures which are related you post them all in one day similar to this
http://www.sh1ft.org/shutterbug/

The advandage of this would be they all show up on the same page but continue to have seperate thumbs

thanks
Reply With Quote
  #2  
Old 04-07-2005, 09:12 AM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
version 1.4 which will be released very soon will take care of this.
__________________
i should say more clever stuff
Reply With Quote
  #3  
Old 04-07-2005, 08:08 PM
aswilliamson Offline
pp regular
 
Join Date: Mar 2005
Posts: 21
Send a message via MSN to aswilliamson
ohh nice
Reply With Quote
  #4  
Old 04-08-2005, 06:00 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
no! v1.4 does not support this. is supports posting serveral photos in the same day, in the same minute but does not show them in the same page!
There could be a simple addon for this with a new HTML tag. no need for modification of index.php!!
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #5  
Old 04-08-2005, 07:42 PM
aswilliamson Offline
pp regular
 
Join Date: Mar 2005
Posts: 21
Send a message via MSN to aswilliamson
ok, anyone know howto do this?

it's not just as simple as a saying display current image, and then display prevous image, it should only display a prevous image on the same page, if the Date is the same, and this would have to be specified somewhere in the admin page.
Reply With Quote
  #6  
Old 04-08-2005, 08:41 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
I'm writing here witout testing
you can put this into an addon/
Code:
if($_GET['showimage'] == "") {
	$today_date = date("D",$cdate);
	$query = mysql_query("select * from ".$pixelpost_db_prefix."pixelpost where datetime='$today_date' order by datetime DESC limit 0,1");
	
	$today_image_thumbnails = "";
	while(list($image_id,$image_title,$image_name) = mysql_fetch_row($query)) {
		$today_image_thumbnails .= "<a href='$PHP_SELF?showimage=$image_id'><img src='thumbnails/thumb_$image_name' alt='$image_title' title='$image_title' width='' height='' /></a>";
	}
	$tpl = ereg_replace("<TODAY_IMAGE_THUMBNAILS>",$today_image_thumbnails,$tpl);
}
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #7  
Old 04-08-2005, 09:30 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
Ok I made it. compatible with bot v1.3 and v1.4
new tags to show the thumbnails and images of the same day in the main page.
new tags
Code:
<TODAY_IMAGE_THUMBNAILS>
<TODAY_IMAGES>
btw I don't have any use for this

tha addon code:
Code:
<?php
/*
Requires Pixelpost version 1.3
Today Images version 0.1
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 = "Today Images";
$addon_description = "Images of today in the main page.";

$addon_version = "0.1";


if($_GET['showimage'] == "") {
	//$tz = $cfgrow['timezone'];
	//$cdate = gmdate("Y-m-d H:i:s",time()+(3600 * $tz)); // current date+time


	$query = mysql_query("select id from ".$pixelpost_db_prefix."pixelpost where datetime<='" .$cdate ."' order by datetime DESC limit 0,1");
	$row= mysql_fetch_array($query);
	$currect_image_id = $row['id'];
	$query = mysql_query("select datetime from ".$pixelpost_db_prefix."pixelpost where id='" .$currect_image_id ."'");
	$row= mysql_fetch_array($query);
	$currect_image_date = strtotime($row['datetime']);
	$currect_image_date = strtotime($row['datetime']);
	$currect_image_date = date("y-m-d",$currect_image_date);

	makethumb($currect_image_date);

}
else
{
		$query = mysql_query("select datetime from ".$pixelpost_db_prefix."pixelpost where id='" .$_GET['showimage'] ."'");
		$row= mysql_fetch_array($query);
		$currect_image_date = strtotime($row['datetime']);
		$currect_image_date = date("y-m-d",$currect_image_date);

		makethumb($currect_image_date);

}


//// functions
function makethumb($the_date)
{
	global $tpl,$pixelpost_db_prefix;
	$query = mysql_query("select id,headline,image from ".$pixelpost_db_prefix."pixelpost where datetime like '%$the_date%' order by datetime DESC");

	$today_image_thumbnails = "";
	$today_images = "";
	while(list($image_id,$image_title,$image_name) = mysql_fetch_row($query)) {

		$today_image_thumbnails .= "<a href='$PHP_SELF?showimage=$image_id'><img src='thumbnails/thumb_$image_name' alt='$image_title' title='$image_title' /></a>";
		$today_images .= "<a href='$PHP_SELF?showimage=$image_id'><img src='images/$image_name' alt='$image_title' title='$image_title' /></a>";
	}
	$tpl = ereg_replace("<TODAY_IMAGE_THUMBNAILS>",$today_image_thumbnails,$tpl);
	$tpl = ereg_replace("<TODAY_IMAGES>",$today_images,$tpl);

}

?>
NOTE THAT THIS MESSAGE IS UPDATED MAKE SURE YOU HAVE THE LATEST VERSION.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #8  
Old 04-08-2005, 09:38 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
It always shows these images and thumbs. now you modify it to show when you choose them to be shown )
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #9  
Old 04-08-2005, 11:17 PM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
im sorry, i thought he meant multiple photos on one day for some reason! *smacks self* i need to get more sleep
__________________
i should say more clever stuff
Reply With Quote
  #10  
Old 04-09-2005, 05:43 AM
aswilliamson Offline
pp regular
 
Join Date: Mar 2005
Posts: 21
Send a message via MSN to aswilliamson
wooh you guys are amazing
__________________
my photoblog www.shadedpixel.net
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 03:40 AM.

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