Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: 2 albums with the same name under different categories?  (Read 4098 times)

0 Members and 1 Guest are viewing this topic.

bazza

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
2 albums with the same name under different categories?
« on: November 26, 2003, 10:11:49 am »

Hi,

I understand that I can have 2 albums with the same name as long as they are under different categories, however, when I come to batch add pictures I get a choice box with just the albums listed in it.  i.e. Holday,Holiday,Holiday.  Each of these albums are in different categories
Spain,Turkey, USA.  How do I know which one I'm uploading to?

Can I put a tweak in so that the choice box has the category as well as the album in it to upload to?

Bazza.
Logged

bazza

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
2 albums with the same name under different categories?
« Reply #1 on: November 26, 2003, 11:36:42 am »

I know this is answering my own post, but I thought I like to contribute in some way, although I'm sure some of the coders out there can do a better job than my hack.

Here is the code changes required in order to get the category appended to the album name in the batch load choice box.

Version: coppermine1.1D for PHP-Nuke.

coppermine/searchnew.php
57c57
<               $sql = "SELECT aid, IF(username IS NOT NULL, CONCAT('(', username, ') ', title), CONCAT(' - ', title)) AS title ".
---
>               $sql = "SELECT aid, category, IF(username IS NOT NULL, CONCAT('(', username, ') ', title), CONCAT(' - ', title)) AS title ".
64c64,68
<                       $select .= "<option value=\"" . $row["aid"] . "\">" . $row["title"] . "</option>\n";
---
>                       $category = $row["category"] ;
>                       $sqla = "SELECT namee FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid = '$category'" ;
>                       $resulta = db_query($sqla);
>                       $rowa = mysql_fetch_array($resulta) ;
>                       $select .= "<option value=\"" . $row["aid"] . "\">" . $rowa["namee"] . $row["title"] . "</option>\n";


Can someone please contact me if you find this usefull as I have other ideas but don't want to go off on my own and would prefer some backing before I start doing the code changes.

Bazza.
Logged
Pages: [1]   Go Up
 

Page created in 0.013 seconds with 14 queries.