View Full Version : Picture order confused?
Anonymous
03-14-2005, 12:11 AM
Hi!
Please have a look at http://antjebdd.ilmdesign.de/
If you hit "previous" there, and image 91 is active, it won't show you image 90, but 88 instead. If you hit previous again, it will show you 84. The distance between the current and the previous picture varies between 4 and 1. Where does this problem come from? How can I tell Pixelpost to display the real previous picture?
And in the archive, Pixelpost also has got a crazy order. What is the problem here? Is there a parameter to get the sort order fixed, e.g. by posting date or by image-id, or do I have to mess around with the code?
Thank you!
With kind regards,
Chriss
raminia
03-14-2005, 08:46 AM
THATS IMAGE ID NOT IMAGE NUMBER.
DID YOU DELETE SOME PHOTO?
DID YOU POST MORE THAN ONE PHOTO A DAY?
DID YOU SEARCH THE FORUM?
DID YOU LOOK AT FAQ?
it's here
http://www.pixelpost.org/faq/index.php
sorry for CAPS;)
Anonymous
03-14-2005, 09:07 AM
Hi!
THATS IMAGE ID NOT IMAGE NUMBER.
Not?!
What is it then? ;)
DID YOU DELETE SOME PHOTO?
No...
If it goes from 91 to 88, you manually can view the missing pictures (90, 89) - they *are* there!
DID YOU POST MORE THAN ONE PHOTO A DAY?
Yes!
Is that a problem? Why?
DID YOU SEARCHED TO FORUM?
I had a look over the most recent subjects...
DID YOU LOOK AT FAQ?
Jup, but there is not much in it, is it?
Thank you,
Chriss
raminia
03-14-2005, 09:30 AM
If you register to the forum you can do search. (a link at the top of the forum page) and that's quite handy.
The pixelpost is designed now to accept only one picture per day (chonological photoblogging philosophy!) We are working on the next version and if you have ideas about this tell us.
The image ID is the way Database traces the images. It is a number that is assigned to each image. it does not show the number of picture in the db. there are different ways to do so. if you delete an image the id does not necessarily decrease to the pervious value and contradictory it will continue...
ummm
do some search in the forum about the one picture per day issue. I'm not quite sure about how to resolve. maybe it is resovled in version 1.4 aleardy!?
Connie
03-14-2005, 05:47 PM
this will not be changed as it is the idea of Pixelpost
but you can change the date fo the images manually and then they will show up
raminia
03-14-2005, 06:09 PM
but I think it's an unnecessary restriction!
It's similar to have a blogging tool, e.g. Wordpress, and it does not allow you to post more than one post a day! Isn't it rediculous?
crion
03-14-2005, 11:40 PM
Hi!
Sorry, but it is a really unnecessary restriction.
I've changed the admin index.php and added a field for the seconds. Now the timestamp doesn't automatically get a "00" for the seconds, but the correct time. If one likes, this can become a hidden field, but saving 00 there makes it easy for two or more images to have identical timestamps.
The problem with identical timestamps is, that the select in the main index.php limits the search result to only one (the first) image with a timestamp lower than the actual image.
Best would be if there was a "real" timestamp containing the posting time of the image, and the timestamp the user can select. Maybe then the real timestamp (or that combined with an id) could be made the primary key...
I manually changed the seconds of the timestamps of the images already in database to get sensible working "previous" and "next"-functions. While doing that, I ran into another problem...
Please, tell me that I'm wrong: What does Pixelpost do if an image with a filename is uploaded, that already exists? Does Pixelpost *overwrite* the older image? Looking into the source-code of admin image.php, there is no duplicate filename-checking.
Have I overlooked this, or do I really have a problem now with lost images? Its not easy to recover that if my friend in Spain, for whom I installed this blog, doesn't have much computer-knowledge... she will be really thrilled ;(
Thanks for helping!
Regards,
Chriss
raminia
03-15-2005, 09:06 AM
YES!
PP has problem with identical filenames and it actually overwrites the old file! I've issued this in the development area and it is ok for the next version. but if you want to modify you v1.3 to be able to upload images with identical names read this.
Quoting form dev area:
I changed my admin/index.php to fix this.
at about line 439 it is modified to rename the file by adding year-month-day-second-random_number_between_1and10
for example:
20050304324_myimage.jpg
I created a variable time_stamp_r
$time_stamp_r = date("Ymds") .rand(1,10) '_';
and added this to image and thumbnail name.
// prepare the file
if($_FILES['userfile'] != "") {
$userfile = strtolower($_FILES['userfile']['name']);
$time_stamp_r = date("Ymds") .rand(1,10) .'_';
// added by ramin
$uploadfile = $upload_dir .$time_stamp_r .$userfile;
if(move_uploaded_file($_FILES['userfile']['tmp_nam e'], $uploadfile)) {
chmod($uploadfile, 0644);
$result = check_upload($_FILES['userfile']['error']);
// changed by ramin
$filnamn =strtolower($_FILES['userfile']['name']);
$filnamn = $time_stamp_r .$filnamn;
//$filnamn = strtolower($_FILES['userfile']['name']);
$filtyp = $_FILES['userfile']['type'];
$filstorlek = $_FILES['userfile']['size'];
$status = "ok";
} else {
// something went wrong, try to describe what
about more than one image I try to convince people. At least I would release a mod since I need this to be different for myself.
crion
03-15-2005, 09:16 AM
Great! Thank you!
That will fix any further problems. So we "only" have to find out which images have been overwritten ;(
Here is my code for the "seconds-fix":
admin/index.php, add on line 410:
:
<select name='post_second'>
<option value='<?php echo date("s"); ?>'><?php echo date("s"); ?></option>
<?php
$lc = 0;
while($lc <= 59) {
if($lc < 10) { $lc = "0$lc"; }
echo "<option value='$lc'>$lc</option>";
$lc++;
}
?>
</select>
admin/index.php, replace/add on line(s) 443/444 (after inserting the first part):
$_POST['post_minute'].":".
$_POST['post_second'];
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.