History: Custom Module Example
Source of version: 3 (current)
Copy to clipboard
Let's create an example: Just go to tiki-admin_modules.php Click on the tab "Custom Modules", if not there by default. Create a new Custom module: ''lefthand side'' Title: My new Module Name: my_new_module ''righthand side'' don't touch anything there ''bottom in the code area'' paste simple HTML: {CODE()} <div style="background: red; width: 100px;"><img src="http://tiki.org/img/tiki/Tiki_WCG_Community.png><a style="font-weight: bold; color: white;" href="http://tiki.org"> This is my module in the footer</a></div> {CODE} Apply! Go to the left tab "Applied Modules" and * find the button "Add Module" and click on it * search for the module "my_new_module" and click on it * apply the module to the footer and put the following parameter into the modules code area: {CODE()} nobox=y {CODE} --- Now let's change the code and add some SmartySyntax from [themes.tiki.org/Template+Tricks] So please go back to the second tab "Custom Modules": {CODE()} <div style="background: red; width: 100px;"><img src="http://tiki.org/img/tiki/Tiki_WCG_Community.png><span style="font-weight: bold; color: white;"> I am {$user} {if $group eq "Admins"}and I am in the Group {$group} {/if} </span></div> {CODE} Apply and see what's changed --- Now Wikisyntax: Go to the second tab "Custom Modules" again, to edit you module. Delete the content of the code area and put in this: {CODE()} {wiki}{literal} {SPLIT(colsize=30%|5%|65%)} __I can use__ ''WikiSyntax'' and %%% WikiPlugins --- --- {wiki}{literal}{module module=>menu, id=>43, nobox=y}{/literal}{/wiki} {SPLIT}{/literal}{/wiki} {CODE} Apply! and see, what happens.