4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: widgit1981 on May 30, 2003, 12:35:14 PM
-
Hi all
Havn't posted here for a while now. I was wondering if it was possible to add some fields in the image upload section so if a user ticked a box a image would appear on the details page:
Say :
Digital - Yes/No
Flash - Yes/No
Zoom - Yes/No
So if a user ticks flash, an image would appear in the details page corresponding to that selection.
Is it possible? If so how ?
Thanks
Steve
-
It's possible with a lot of javascript.
http://www.devguru.com/Technologies/ecmascript/quickref/javascript_intro.html
-
Hi again
I didn't get the link you posted. What am I supposed to do and how do I implement it into 4images? Surely Javascript wouldn't come into play, I thought it may be like adding textual fields in the upload form and adding the data in mysql.
Thanks
Steve
-
Actually I just thought about this again. It's not so hard.
Open includes/db_field_definitions.php and read the comment block. You'll need to add additional fields to your images table. So if you add a field called "has_flash", you can then put something like this in your details.html
{if has_flash}<img src="{template_url}/images/flash.gif>{endif has_flash}
You also need to add these fields to the member upload form. Again, read the comments inside includes/db_field_definitions.php
-
Thank You !
I havn't tried it yet but will have a play later. I may have some questions also. How do I create the checkboxes in PHPmyadmin what are they classed as ?
If possible could you create a little tutorial for me ? That would be great. Might save is both a little hassle. lol
Steve
-
Just read the instructions inside includes/db_field_definitions.php
Jan did a good job of explaining how to do all this.