PDA

View Full Version : Un Publishing


melon
03-05-2008, 02:24 AM
Is there any way to un publish photos? i uploaded 94 images and intended to have one show per day, but i published them all, and short of manually changing the dates ( if that works ) i cant remove them.

it would be nice if there was a plug in to take a bunch of photos and span them in the future.

kevincrafts
03-05-2008, 03:05 AM
If you can change all the dates to a future date, which can be done through a database admin, you can then use this addon (http://www.pixelpost.org/extend/addons/backwards-photo-dater/) to date the photos backwards

austriaka
03-05-2008, 06:21 AM
Future posts are only viewable by you if you are logged in as Administrator.
It is no fun to do this now but you can edit each of your photos to become published one day after the last one. The "future post feature" is the draft function in Pixelpost

melon
03-05-2008, 10:53 PM
Any idea how long it would take to have the future post made?

just so i know if i should bother making it my self.

i'm sure if i back up my DB i could attempt to slap some code together.

Thinking out loud.

get current date,

get day.

count images.

increment day + 1.

ahh yes might be a bit tricky once you hit the next month.

well let me know if anything happens, ill attempt to make it my self.

kevincrafts
03-06-2008, 01:26 AM
If you use the mysql date functions you don't have to worry about the end of the month. You can hack my back dater addon if you want and just have it add instead of subtract.

melon
03-06-2008, 07:58 PM
I almost have a future Dater, i can display the dates incremented into the future, but it gets saved as 0000000 in the DB?

any ideas?

melon
03-06-2008, 08:10 PM
foreach ($moderate_image_boxes as $valueId) {
$tomorrow = mktime(0,0,0,date("c"),date("d")+$i,date("y"));
$futureDate = date("c/d/y", $tomorrow);

$batchFutureSql = "UPDATE ".$pixelpost_db_prefix."pixelpost SET
datetime='$tomorrow'
WHERE id = $valueId LIMIT 1";

echo $tomorrow."<br>";

# execute SQL statement
mysql_query($batchFutureSql);

# check for errors
if (mysql_error()) { print "Database Error: $sql " . mysql_error(); }
$i++;
}


Like i said the dates echo correctly but they dont show up in the DB

Dennis
03-06-2008, 08:23 PM
Probably the date format you use is not compatible with MYSQL date format.

Date time format in the pixelpost table is: 2007-06-16 00:00:49

yyyy-mm-dd hh:mm:ss

melon
03-06-2008, 08:28 PM
Ill try this then

o-m-d G:i:s

that would be 2008-03-.6 15:28:12

melon
03-06-2008, 08:44 PM
Yay, i figured it out, thanks alot!

ill do some cleanup on it and upload it to the addons.

Thanks for the help

melon
03-06-2008, 08:52 PM
Well after all of that, the archives dont showe images from the future, and the list views dont, yet the main index page does?

is there anyway to stop the main page from displaying images from the future?

melon
03-06-2008, 09:35 PM
Ok here is the code:

http://www.studiolounge.net/files/pixelPostFutureDater

you can select the images you want to send to the future, it updated the database, the archives wont lost the images, mosaic wont list the images, and the text link archive wont list the images.

everything except the main screen.

it would appear that


Pixelpost its self needs a little work for <IMAGE_PREVIOUS_ID> and <IMAGE_NEXT_ID>

in order to fix this issue.

melon
03-06-2008, 10:56 PM
Ok now, i have been working on the index.php file of pixelpost to give the next/prev tags some logic and have been sucsessfull. i then noticed that the if you only have one image that is taken at current time or in the past that pixelpost would still show an image from the future.

this has now been fixed and im ready to roll now :)

ill finish up on the other image navigation tags and if any one wants ill post it, or maybe i can donate the file to pixelpost for developent in the next version (future posting)

austriaka
03-07-2008, 05:52 AM
Well after all of that, the archives dont showe images from the future, and the list views dont, yet the main index page does?

is there anyway to stop the main page from displaying images from the future?
Index page shows future images as long as you are logged in as Admin!
Logout and check again, you should not see any future images anymore

Dennis
03-07-2008, 06:44 AM
I agree what Karin says. Pixelpost behaves fine, you forgot this feature :p

melon
03-07-2008, 03:43 PM
So basically my hacking was to undo the admin features then :)

Sweet

ill test it out.