|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
Oh, I had no idea it behaved like that, I'll will fix that, tomorrow.
// punK
__________________
icq: 66760929 |
|
#3
|
|||
|
|||
|
Ok, cool.
/Kenneth |
|
#4
|
||||
|
||||
|
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 |
|
#5
|
|||
|
|||
|
Quote:
Quote:
So when I pick a day from the calender I get the first posted picture from that day. /Kenneth |
|
#6
|
||||
|
||||
|
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']."'");
}
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");
}
}
// pixel
__________________
icq: 66760929 |
|
#7
|
|||
|
|||
|
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 |
|
#8
|
||||
|
||||
|
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 |
|
#9
|
||||
|
||||
|
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 |
|
#10
|
||||
|
||||
|
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 |
| Post Reply |
| Thread Tools | |
|
|