|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
version 1.4 which will be released very soon will take care of this.
__________________
i should say more clever stuff |
|
#3
|
|||
|
|||
|
ohh nice
|
|
#4
|
||||
|
||||
|
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 |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
||||
|
||||
|
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 |
|
#7
|
||||
|
||||
|
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> ![]() 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); } ?>
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7 |
|
#8
|
||||
|
||||
|
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 |
|
#9
|
||||
|
||||
|
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 |
|
#10
|
|||
|
|||
|
wooh you guys are amazing
__________________
my photoblog www.shadedpixel.net |
| Post Reply |
| Thread Tools | |
|
|