Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 06-14-2007, 05:01 PM
apoc Offline
pp regular
 
Join Date: Aug 2006
Location: Toronto ON
Posts: 29
Image title in filename

When uploading a photo pixelpost allows you to add a timestamp to the file name.

i found this line in /admin/new_image.php

Quote:
$filnamn = $time_stamp_r .$filnamn;
how would i add $image_title so that the filename also has the image title in it?
__________________
http://www.apocalyps.ca - Shutters Photoblog
Reply With Quote
  #2  
Old 06-14-2007, 05:26 PM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
Code:
$filnamn = $time_stamp_r .$filnamn.$image_title;
But be careful with spaces, comma's, exclamation points, double and single quotes, question marks, colon, semi-colon because that will not be handled by your filesystem.
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
Reply With Quote
  #3  
Old 06-14-2007, 05:56 PM
apoc Offline
pp regular
 
Join Date: Aug 2006
Location: Toronto ON
Posts: 29
Thanks
__________________
http://www.apocalyps.ca - Shutters Photoblog
Reply With Quote
  #4  
Old 06-14-2007, 08:36 PM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
ow... did I mention I can't be hold responsible if your blog breaks?
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
Reply With Quote
  #5  
Old 06-15-2007, 12:48 AM
apoc Offline
pp regular
 
Join Date: Aug 2006
Location: Toronto ON
Posts: 29
why would it break?
__________________
http://www.apocalyps.ca - Shutters Photoblog
Reply With Quote
  #6  
Old 06-15-2007, 02:55 AM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
Because, as Schonhose stated, if your image title contains any spaces, comma's, exclamation points, double and single quotes, question marks, colon, semi-colon, ect, it is likely to break your blog as the filename does not accept most of these characters.

Last edited by Dennis; 06-15-2007 at 07:19 AM.
Reply With Quote
  #7  
Old 06-15-2007, 04:11 AM
apoc Offline
pp regular
 
Join Date: Aug 2006
Location: Toronto ON
Posts: 29
oh, i understand that.

but it seems that there is a problem. the image title is not included in the filename after the code has been modified.
__________________
http://www.apocalyps.ca - Shutters Photoblog
Reply With Quote
  #8  
Old 06-15-2007, 05:14 AM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
Try the following:

Code:
$filnamn = $time_stamp_r .$filnamn.$headline;
Reply With Quote
  #9  
Old 06-15-2007, 10:40 PM
apoc Offline
pp regular
 
Join Date: Aug 2006
Location: Toronto ON
Posts: 29
Well, that didnt quit do it, but i figured it out. If anyone's interested tell me and I'll explain what I did.
__________________
http://www.apocalyps.ca - Shutters Photoblog
Reply With Quote
  #10  
Old 06-16-2007, 02:43 AM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
I'm guessing there was more steps than just 1 line but $headline should have been the variable you were looking for.

Go ahead and explain to us all how you did this. I'm not particularly interested but other users may find this useful.
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 12:14 AM.

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