forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: hlabout on August 29, 2010, 10:22:53 am
-
I tried to implement the Ultimate Keyword Selector modification in my gallery www.haraldlabout.nl
Running cpg 1.4.27 and I applied all modifications suggested in this tread: http://forum.coppermine-gallery.net/index.php/topic,46385.0.html
After installing the modified upload.php file (attached to this topic) I can see the new modifications after I upload a new picture. (see attached screen shot)
The problem is the fact that the new keyword selection drop down menu does not show my previous entered keywords, it only shows a blank field.
I know this part of the new code in the upload.php file is responsible for grabbing the existing keywords and showing the in the new keyword dropdown menu:
// Hop stop here ! Add request of keyword_select.php to get the keyword list
$query = "SELECT * FROM {$CONFIG['TABLE_PREFIX']}dict ORDER BY keyword";
$result = cpg_db_query($query);
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$keywordIds[] = $row["keyId"];
$keywords[] = $row["keyword"];
}
$form = "";
foreach ($keywords as $keyword) {
$form.= '<option value="'.$keyword.' ">'.$keyword.'</option>';
}
// Return at the mod
// Create the keyword box.
echo <<<EOT
<tr>
<td width="40%" class="tableb">
$text $ordinal
</td>
<td width="60%" class="tableb" valign="top">
<label> <br />
Selecteer trefwoorden <select name="select" onchange="document.forms[0].keywords.value += this.value">
<option></option>
$form;
</select>
</label>
(meerdere selecties mogelijk)
<input type="text" style="width: 100%" name="$name" maxlength="$max_length" value="$default" class="textinput" /><br />
</td>
</tr>
Unfortunately it is not working for my gallery, no keywords show up.
Previously I successfully installed the "easy keyword insert mod v2" http://forum.coppermine-gallery.net/index.php/topic,42225.0.html but I have just to much keywords to implement them manually in the code.
I search in the forum for an solution for my problem but I could not find anything on this matter so I that is the reason for starting this new topic.
Unfortunately I am not an experienced s/w programmer so I cannot solve this issue by myself so I hope to find some help here on the forum that will solve my problem so I can use the Ultimate Keyword Selector modification in my gallery.
Any help and tips are much appreciated.
Harald
-
Anyone!
-
Rebuild the keywords dictionary using keyword_create_dict.php
-
Nibbler,
Thanks for your reply.
Unfortunately your solution does not make sense yo me.
Is it possible to give some more information about it.
regards,
Harald
-
http://www.haraldlabout.nl/fotografie/keyword_create_dict.php
-
Nibbller,
Thanks for your great advice.
Working fine now.
Top.
Regards,
Harald