Author Topic: additional image fields for some categories  (Read 7715 times)

0 Members and 1 Guest are viewing this topic.

Offline ruudvroon

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • AFTERTHEPARTY.NL
additional image fields for some categories
« on: April 03, 2005, 02:26:26 PM »
I want to add an additional image field. I saw I could do that in db_field_definitions.php, but I want the field only in a couple of categories. How can i do that?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: additional image fields for some categories
« Reply #1 on: April 03, 2005, 05:40:58 PM »
sorry, u want to WHAT to do to an additional field? :lol: poor additional field...lol sorry couldnt help myself...nice typo! ;)

Anyway, u can not use db_field_definitions.php for new fields for categories, its only for images and members tables.
if u need additional field for categories table, u'll need do lots of changes manualy in the code.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline ruudvroon

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • AFTERTHEPARTY.NL
Re: additional image fields for some categories
« Reply #2 on: April 03, 2005, 06:51:12 PM »
I want to add an extra image field, but I want it only to show up in one category (+ subcats), is that possible?

Example:
I have the cat: school and if people want to upload a file I want the additional fields: Class and Period.

I've edited my first post  :roll:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: additional image fields for some categories
« Reply #3 on: April 03, 2005, 07:10:24 PM »
then u'll need edit member.php
something like this:
find:
Code: [Select]
    "cat_id" => $cat_id,Insert below:
Code: [Select]
    "show_extra" => ($cat_id == 104) ? 1 : "", (replace 104 with the category ID u want)

Then in member_uploadform.html template insert your new input fields (for your additional fields) between {if show_extra} and {endif show_extra} tags.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline ruudvroon

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • AFTERTHEPARTY.NL
Re: additional image fields for some categories
« Reply #4 on: May 20, 2005, 07:58:43 PM »
It worked, but is it also possible to show these extra fields in the details page?