4images Forum & Community
4images Issues / Ausgaben => Installation, Update & Configuration => Topic started by: uk_cj on May 25, 2006, 12:33:18 AM
-
I am using 4images as a Product Gallery for my company. (Customers send photos in of themselves wearing our products, and we post them on our website.)
So I need to limit the Keyword list to 15 or so specific words. Then, when photos get uploaded, I would like to see a list of checkboxes - one per keyword. I check the appropriate keywords (which product model and color they are wearing) and then make the photos publicly accessible.
Then, I would like the user to see the list of Keywords, select the ones they want (these three products, in these two colors) and press "Search".
I don't see any mods or other people that have tried to use the Keywords in this way (although Chris did something similar in 2003). Have I missed anything? Has someone already done this?
Thanks,
- CJ
-
This sounds like something I would be incredibly interested in as well, anyone with coding knowledge want to give it a crack?
-
open your member_uploadform.html in your template
add this to the top of the page:
<script type="text/javascript">
function add_sub(el)
{
if (el.checked)
{
var total = el;
total.form.elements['image_keywords'].value+=el.value;
}
else
{
var re=new RegExp('(.*)'+el.value+'(.*)$');
el.form.elements['image_keywords'].value=el.form.elements['type'].value.replace(re,'$1$2');
}
}
</script>
then find:
<tr>
<td class="row1" valign="top"><b>{lang_keywords}</b></td>
insert above:
<tr>
<td class="row1" style="vertical-align:top;"></td>
<td class="row1">
<table style="width: 100%">
<tr>
<td style="text-align:left;vertical-align:top">
<input type="checkbox" value="Option1," onclick="add_sub(this);"><label>Option1</label><br>
<input type="checkbox" value="Option2," onclick="add_sub(this);"><label>Option2</label><br>
<input type="checkbox" value="Option3," onclick="add_sub(this);"><label>Option3</label><br>
<input type="checkbox" value="Option4," onclick="add_sub(this);"><label>Option4</label><br>
</td>
</tr>
</table>
</td>
</tr>
This will print what you check in the boxes onto the image keywords textarea
If you don't want them to be able to edit the image keyword textarea or add keywords, do this:
change: <textarea cols="30" class="textarea" rows=1" name="image_keywords">
to: <textarea cols="30" style="display:none;" class="textarea" rows=1" name="image_keywords">