News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

2 albums with the same name under different categories?

Started by bazza, November 26, 2003, 10:11:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bazza

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.

bazza

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.