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 [2]   Go Down

Author Topic: XP Publisher Wizard creating some weird directory names...  (Read 11449 times)

0 Members and 1 Guest are viewing this topic.

Bruz

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
XP Publisher Wizard creating some weird directory names...
« Reply #20 on: February 22, 2004, 11:38:30 am »

Quote from: "wormie_dk"
Its to reduce number of images pr. folder.

I have modified my own xp_publish as follows:
line 756:
Code: [Select]

    if (USER_ID && !defined('SILLY_SAFE_MODE')) {
        if (USER_IS_ADMIN && ($category != (USER_ID + FIRST_USER_CAT))) {
            $filepath = 'wpw-' . $album;
        } else {
            $filepath = $CONFIG['userpics'] . (USER_ID + FIRST_USER_CAT);
        }
        $dest_dir = $CONFIG['fullpath'] . $filepath;

The thing changed is:  $filepath = 'wpw-' . $album;

Works fine on my host and creates dirs called wpw-albumnumber


Hi wormie_dk,
this works fine for me, but I'd like to have the album name instead of the album number - any idea how to get this?
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.kingbruz.de%2FFotos%2Fsignatur_cpg.php&hash=b7bf1fbae41c2d8c534416d10d32fe51619697d7)

get your statistik-hack here

wormie_dk

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Posts: 73
Re: XP Publisher Wizard creating some weird directory names...
« Reply #21 on: April 22, 2004, 10:54:37 pm »

I don't have time to look into it right now but if you know a little about mysql and php you should look at the xp publish file around line 741
Code: [Select]
        $result = db_query("SELECT category FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid='$album' and category = '" . (USER_ID + FIRST_USER_CAT) . "'");
        if (mysql_num_rows($result) == 0) simple_die(ERROR, $lang_db_input_php['unknown_album'], __FILE__, __LINE__);
        $row = mysql_fetch_array($result);
        mysql_free_result($result);
        $category = $row['category'];
The name of the album should be somwhere in the $row variable and you can use this instead of $album
Logged

Gonzo

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: XP Publisher Wizard creating some weird directory names...
« Reply #22 on: April 26, 2004, 03:57:24 am »

Even if you initially get filesystem names perfectly aligned with album names, renaming albums or moving files between albums will get you out of sync right away.
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.017 seconds with 18 queries.