Author Topic: TickBox Images  (Read 5716 times)

0 Members and 1 Guest are viewing this topic.

Offline widgit1981

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
TickBox Images
« 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

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
TickBox Images
« Reply #1 on: May 30, 2003, 02:58:01 PM »

Offline widgit1981

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
TickBox Images
« Reply #2 on: May 30, 2003, 03:01:23 PM »
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

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
TickBox Images
« Reply #3 on: May 30, 2003, 03:14:31 PM »
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
Code: [Select]
{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

Offline widgit1981

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
TickBox Images
« Reply #4 on: May 30, 2003, 05:47:15 PM »
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

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
TickBox Images
« Reply #5 on: May 30, 2003, 08:54:36 PM »
Just read the instructions inside includes/db_field_definitions.php

Jan did a good job of explaining how to do all this.