Author Topic: Beschreibung mit If und endif / description with if and endif .. ??  (Read 4643 times)

0 Members and 1 Guest are viewing this topic.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Hallo ist es möglich, dass man die Beschreibung mit einem {if description} ..... {endif description} setzen kann?
Oder generell wenn man neue Felder anlegt? Geht sowas?

--

Hello, it is possible that the description with a {if description} ..... {endif description} put it?
Or if you generally create new fields? Goes something?

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: Beschreibung mit If und endif / description with if and endif .. ??
« Reply #1 on: September 27, 2008, 02:59:38 AM »
If I understood your question correctly, yes, you can use {if description} ... {endif description} tags in templates.
Just make sure that you added information about your new field into includes/db_field_definitions.php

If you are talking about image description or category description, then its: {if image_description} / {if cat_description}
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 Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: Beschreibung mit If und endif / description with if and endif .. ??
« Reply #2 on: September 27, 2008, 05:10:52 AM »
Hello Vano,

No, so I thought not. I would generally know how such fields can create.

Sample:

I make a new field

1) i open includes/db_field_definitions.php
search
Code: [Select]
?>
add this
Code: [Select]
$additional_image_fields['image_myfield'] = array($lang['image_myfield'], "textarea", 1);
2) i open lang/LANG/main.php
search
Code: [Select]
?>
i add this
Code: [Select]
//-----------------------------------------------------
//--- Additional Fields -------------------------------
//-----------------------------------------------------
$lang['image_myfield'] = "My New Field";

3) i open templates/default/member_uploadform.html


Code: [Select]
{lang_image_myfield}
Code: [Select]
<textarea type="text" name="image_myfield" size="30" value="{image_myfield}" class="input" />
3a) öffne templates/default/details.html

Code: [Select]
{lang_image_myfield}
{image_myfield}

But I want this so

{if myfield}{image_myfield}{endif myfield}

Unless specified, it should not be displayed

Sorry for my Englisch, is Translate with Google :D

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: Beschreibung mit If und endif / description with if and endif .. ??
« Reply #3 on: September 27, 2008, 05:14:36 AM »
{if image_myfield} {image_myfield} {endif image_myfield}
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 Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: Beschreibung mit If und endif / description with if and endif .. ??
« Reply #4 on: September 27, 2008, 06:45:53 PM »
omgf.. so simple!

Best Thanks Vano!