Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 10-19-2004, 02:17 PM
Kenneth K Offline
pp regular
 
Join Date: Oct 2004
Posts: 49
Send a message via MSN to Kenneth K
Help modifying script.

Hello again

I would to see the first picture of the day when I enter the site and select a day from the calender. How do I do that? As it is now I get the last posted picture from the day when I enter the blog. That's not very convenient when you post many pictures on the same day. I've already changed the imagelink so it links to the next picture instead of the previous picture.

Plz help :?

/Kenneth
Reply With Quote
  #2  
Old 10-19-2004, 03:16 PM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
Oh, I had no idea it behaved like that, I'll will fix that, tomorrow.

// punK
__________________
icq: 66760929
Reply With Quote
  #3  
Old 10-19-2004, 04:45 PM
Kenneth K Offline
pp regular
 
Join Date: Oct 2004
Posts: 49
Send a message via MSN to Kenneth K
Ok, cool.

/Kenneth
Reply With Quote
  #4  
Old 10-20-2004, 07:35 AM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
I thought about fixing this now, but immediately noticed I must have misunderstood you.

If you post 5 pictures today, the last picture you upload will be the first you see, and this is not anything you want? You want the first picture posted to show up first?

Kind of chronological in days, and reversed chronological within the day (hours/minutes)? Is that it?

// punK
__________________
icq: 66760929
Reply With Quote
  #5  
Old 10-20-2004, 11:34 AM
Kenneth K Offline
pp regular
 
Join Date: Oct 2004
Posts: 49
Send a message via MSN to Kenneth K
Quote:
Originally Posted by pixelpunk
If you post 5 pictures today, the last picture you upload will be the first you see, and this is not anything you want?
No.

Quote:
You want the first picture posted to show up first?
Yes.

So when I pick a day from the calender I get the first posted picture from that day.

/Kenneth
Reply With Quote
  #6  
Old 10-20-2004, 12:28 PM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
Let's try something. This is not tested at all.
Backup your index.php

Anyway, open up the main script, index.php.
Find the following (should be around line 67):
Code:
// Get Current Image.
if($_GET['showimage'] == "") {
	$query = mysql_query("select * from ".$pixelpost_db_prefix."pixelpost order by datetime ASC limit 0,1");
	} else {
	$query = mysql_query("select * from ".$pixelpost_db_prefix."pixelpost where id='".$_GET['showimage']."'");
	}
Replace that with the following:
Code:
// Get Current Image.
if($_GET['showimage'] == "") {
	$query = mysql_query("select * from ".$pixelpost_db_prefix."pixelpost order by datetime ASC limit 0,1");
	} else {
	if($_GET['curr_month'] == "") {
	    $query = mysql_query("select * from ".$pixelpost_db_prefix."pixelpost where id='".$_GET['showimage']."'");
	    } else {
	    $find_images_this_date = $_GET['curr_year']."-".$_GET['curr_month']."-".$_GET['curr_day'];
	    $query = mysql_query("select * from ".$pixelpost_db_prefix."pixelpost where datetime like '$find_images_this_date%' order by datetime asc");
	    }
    }
I hope it works, it might not.

// pixel
__________________
icq: 66760929
Reply With Quote
  #7  
Old 10-20-2004, 01:13 PM
Kenneth K Offline
pp regular
 
Join Date: Oct 2004
Posts: 49
Send a message via MSN to Kenneth K
Nope that didn't do any good. When selecting a day from the calender the same day poped up. I could scroll the images with the thumbnails tho.

/Kenneth
Reply With Quote
  #8  
Old 10-20-2004, 01:41 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
just edit the image id's in the mysql for now...hehe

i noticed this last night and was a little confused for a few...

another admin addition, display order by date lol
__________________
i should say more clever stuff
Reply With Quote
  #9  
Old 10-20-2004, 01:55 PM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
It do display images by date (and time). Linear.
Chronological postdate.
Not id.
Take another quick look at the query.
order by datetime

image.jpg, posted at 2004-10-20 14:54:00 is posted earlier than
image2.jpg, posted at 2004-10-20 16:22:00 for example.

Therefor, when browsing to a date the last image posted, image2.jpg, is displayed first. You start at the end of the line and moves backwards, both date and time.

So, if you enter a date, say 2004-10-20 and want the first image posted on that date, which is image.jpg posted 14:54:00, then you need to reverse the order somehow. Which will mess up the regular timeline.
__________________
icq: 66760929
Reply With Quote
  #10  
Old 10-22-2004, 03: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
bah that gave me a headache trying to figure that one out...haha...ok, but in theory, we want it to display the NEWEST image first right? would setting the display from the newest id work? errr...

def gonna have to add a display order to the admin...haha *smacks self*
__________________
i should say more clever stuff
Reply With Quote
Post Reply


Thread Tools




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

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