Author Topic: Different additional fields in different categories  (Read 7213 times)

0 Members and 1 Guest are viewing this topic.

Offline bazalt

  • Newbie
  • *
  • Posts: 13
    • View Profile
Different additional fields in different categories
« on: August 10, 2007, 07:26:59 AM »
I have 2 categories - People (cat_id=1) and Auto (cat_id=2) in my gallery.

I've added custom fields - "Real Name" and "Color" and it`s work great (http://www.4homepages.de/forum/index.php?topic=747.60)


1) How can I put different fields to different categories in details.html? "Real Name" - for category People and "Color" for Auto.

2) How can I add this fields to member_uploadform, "Real Name" is shown there only if the category "People" is choosen, "Color" is shown only if "Auto" is choosen.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Different additional fields in different categories
« Reply #1 on: August 10, 2007, 01:26:19 PM »
Can use {if your_field}{field}{endif your_field} in template. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bazalt

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Different additional fields in different categories
« Reply #2 on: August 10, 2007, 03:26:45 PM »
thunderstrike, thanks. I guess, it hide field from view. if its empty?
Can you give some examples?

So I need different uploadforms for different categories?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Different additional fields in different categories
« Reply #3 on: August 10, 2007, 03:49:46 PM »
Best thing is install this MOD:

http://www.4homepages.de/forum/index.php?topic=7722.0

Then, IF condition each cats before show on gallery. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline bazalt

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Different additional fields in different categories
« Reply #4 on: August 10, 2007, 04:17:42 PM »
:)

For Example, first category (cat_id=1) is People. I wanna make uploadform, which is enabled on link http://mylink/member.php?action=uploadform&cat_id=1

Uploadform is (like in browser)):

================================

Category                                People
{lang_media_file}                [_________________]   [_Browse..._]
{lang_image_realname}    [_________________]
{lang_image_name}            [_________________]
{lang_description}               [_________________]

                 [__OK__]  [___Cancel_]

================================

Second category (cat_id=2) is auto, link to uploadform is http://mylink/member.php?action=uploadform&cat_id=2

and I wanna upload form like

================================

Category                                Auto
{lang_media_file}                [_________________]   [_Browse..._]
{lang_image_autocolor}   [_________________]
{lang_image_name}            [_________________]
{lang_description}               [_________________]

                 [__OK__]  [___Cancel_]

================================

Where I need put IF? :)

Offline bazalt

  • Newbie
  • *
  • Posts: 13
    • View Profile

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Different additional fields in different categories
« Reply #6 on: August 10, 2007, 08:18:34 PM »
Good to know find way you want. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?