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: Different Custom Fields?  (Read 2638 times)

0 Members and 1 Guest are viewing this topic.

buuben

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Different Custom Fields?
« on: September 22, 2006, 01:01:31 am »

The problem is the additional custom fields when you add some pictures in upload.php. I tried to modify the text_box field on the code but it appears that Coppermine generates all the fields from one piece of script. And I would like to add a drop-down list for one choice but with my skills I haven't figured out how the h*ll to do that.

Please, tell me is there any solution for this or am I going to drown myself in to the sea of frustration...
« Last Edit: October 02, 2006, 06:07:29 pm by GauGau »
Logged

buuben

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Different Custom Fields?
« Reply #1 on: September 27, 2006, 02:20:14 am »

Well, since no one was interested about this I started to modify Coppermine with my almost non existent PHP-skills.

I managed to create a dropdown menu in upload page and get the data to MySQL as a one parameter for a picture. The dropdown is done to upload.php-file in a very simple way like this:

Code: [Select]
// Trying to get the dropdown shit workin...
function country_input($name) {
  global $CONFIG, $lang_upload_php;
  $name = "country";

    // start dropdown
    echo <<<EOT
<tr><td class="tableb">Country</td><td class="tableb" valign="top">
<select name="$name" class="listbox">
<option value=''>Select Country</option>
EOT;

include ("maat.txt");

  // And the ending shit...
  echo <<<EOT
</select> </td></tr>
EOT;

}

Well, now the real problem is this: That text include is very problematic if I want to add a similar dropdown to another place. Say when a member or admin wants to change the country-parameter of the picture...

Has anyone a suggestions or ideas to do this adding "thingy" in much more better way?


Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Different Custom Fields?
« Reply #2 on: October 01, 2006, 03:17:59 pm »

Doesn't work that way. Modifying the output is easy. Modifying the forms and database queries are not. Without intermediate to good PHP skills, you won't be able to accomplish this. However, there is a mod that let's you add more custom fields - please use the search.
Logged

buuben

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Different Custom Fields?
« Reply #3 on: October 02, 2006, 04:43:25 pm »

Thanks GauGau, after a while I figured it out also.

Actually, I asked one of my friends with good PHP-skills to do this with me. So, if we can get a proped mod for the search we will post it to mod-section...

t, buuben
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Different Custom Fields?
« Reply #4 on: October 02, 2006, 06:08:28 pm »

OK, great. Please post your mod here (you won't be able to start new threads on the mods board) - a moderator will move your thread if applicable.

Cheers

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.