4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: Rembrandt on May 20, 2013, 04:56:33 PM

Title: [Mod] Example for the Mod: "Additional category fields" with "radio" Button
Post by: Rembrandt on May 20, 2013, 04:56:33 PM
This Mod is a example for the Mod: "Additional category fields" with "radio" Button

Required, this Mod: Additional category fields (http://www.4homepages.de/forum/index.php?topic=31231.0)

 Example Mod with "textarea"  (http://www.4homepages.de/forum/index.php?topic=31233.0)


1.) add in your DB:
Code: [Select]
ALTER TABLE 4images_categories ADD category_adsence TINYINT(1) DEFAULT '0' NOT NULL

2.) add in db_field_definitions.php :

$additional_category_fields['category_adsence'] = array($lang['category_adsence'], "radio", 0);


3.) add in your lang/main.php:

 $lang['category_adsence'] = "View Adsence:";


4.) add (where ever you want) e.g. in your thumbnail, category or details.html:
Code: [Select]
{if category_adsence}
  your adsence code....
{endif category_adsence}

Now you can in admin categories turn on/off the adsence code, or what ever between the {if category_adsence} ... {endif category_adsence} is.

mfg Andi
Title: Re: [Mod] Example for the Mod: "Additional category fields" with "radio" Button
Post by: kar76 on May 29, 2013, 08:06:06 PM
Not Worked  :(