4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Sunny C. on September 26, 2008, 10:54:51 PM
-
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?
-
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}
-
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
?>
add this
$additional_image_fields['image_myfield'] = array($lang['image_myfield'], "textarea", 1);
2) i open lang/LANG/main.php
search
?>
i add this
//-----------------------------------------------------
//--- Additional Fields -------------------------------
//-----------------------------------------------------
$lang['image_myfield'] = "My New Field";
3) i open templates/default/member_uploadform.html
{lang_image_myfield}
<textarea type="text" name="image_myfield" size="30" value="{image_myfield}" class="input" />
3a) öffne templates/default/details.html
{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
-
{if image_myfield} {image_myfield} {endif image_myfield}
-
omgf.. so simple!
Best Thanks Vano!