Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: xp publish folder naming convention  (Read 4494 times)

0 Members and 1 Guest are viewing this topic.

mike909

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
xp publish folder naming convention
« on: June 30, 2006, 07:33:58 am »

Hi, this shouldn't be too hard... this post (last post of the thread) speaks about naming the folder after the album name during an xp upload.
Quote
In my own installation I have used $album instead of date("Ymd"); this way each album gets its own dir... But I guess naming by date is more logical   

- David
Well, I made that change, but can't get it to work...the folders just increment by a number. Here is the original code from lines 747
Code: [Select]
if (USER_IS_ADMIN && ($category != (USER_ID + FIRST_USER_CAT))) {
            $filepath = 'wpw-' . date("Ymd");
I tried changing it to this:
Code: [Select]
if (USER_IS_ADMIN && ($category != (USER_ID + FIRST_USER_CAT))) {
            $filepath = 'wpw-' . $album;
as well as a couple other ways of replacing the date with $album but it never worked. Can someone tell me the exact syntax of that sentence?
Thanks.
Logged

mike909

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: xp publish folder naming convention
« Reply #1 on: July 25, 2006, 09:09:11 pm »

This guy has same question...can anyone give me some insight as to how the sentence should be structured? I don't mind testing.
Logged

SNo0py

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: xp publish folder naming convention
« Reply #2 on: August 16, 2006, 02:04:14 pm »

Using $album is not that simple because the album name might contain invalid characters so this opens up a big security hole. Furthermore I'm not sure what happens if there are two albums with the same name - but the same applies for the date... ordering it by just the date is not that good - ideally an unique id should be used for each album.
Logged

mike909

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: xp publish folder naming convention
« Reply #3 on: August 16, 2006, 06:24:57 pm »

I see. Well, it never is that simple. I guess some sort of check would have to be added to make sure there is no duplicate album name. In the meantime though, people like me could just make sure not to create a duplicate album. I don't think I would have a problem with that...and like you said
but the same applies for the date...
Wouldn't it just append a number to the folder? I think that's what it does when you upload two different albums on the same day.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: xp publish folder naming convention
« Reply #4 on: August 17, 2006, 08:02:11 am »

You (as Coppermine admin) should use FTP-upload plus batch-add anyway. XP Publisher is suppossed to be used by non-admin users in the first place. As you can't be sure that your users will understand any naming scheme that allows them to interfere, the folders created by XP_Publisher are based on date and time to make them unique, without an option for end users to interfere. After all, those are just folder names - the coppermine database keeps track of folder and file names, the human doesn't have to. That's why Coppermine devs are reluctant to change anything about the way XP Publisher currently works. However, you're of course free to come up with your custom solution, and we'd appreciate code contributions as well.
Logged

mike909

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: xp publish folder naming convention
« Reply #5 on: August 17, 2006, 04:39:11 pm »

Batch add does not allways work. While that problem is probably not all that common for other folks, it is for me.
...you're of course free to come up with your custom solution, and we'd appreciate code contributions as well.
I'm sorry but I don't know anything about programming. All I can offer is to test if someone has any ideas, just let me know. Thank you for your input GauGau.
Logged
Pages: [1]   Go Up
 

Page created in 0.031 seconds with 20 queries.