Different Custom Fields? Different Custom Fields?
 

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

Main Menu

Different Custom Fields?

Started by buuben, September 22, 2006, 01:01:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

buuben

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...

buuben

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:

// 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?



Joachim Müller

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.

buuben

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

Joachim Müller

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