Making a plugin

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Oprichnik
New Member
New Member
Posts: 5
Joined: Sun Apr 03, 2011 10:12 am

Making a plugin

Post by Oprichnik »

Hi guys, i'm trying to make a very simple module with cmsms but i'm wondering how the cms works because my first experience is very bad :

Does the desginer have to ask the programmer every time he wants to access to a lang var ? I mean the lang var must be set in the smarty vars to be available in the template ?

Each intern link that the designer wants to make must be "sended" from the programmer with the CreateLink function ?

Thanks
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Making a plugin

Post by Wishbone »

You can give the designer access to all your variables.. In your module, do:

Code: Select all

$smarty->assign('module', $this);
..and in your template:

Code: Select all

{$module->Lang('whatever')}
..as long as you're OK with your designer being able to access any function associated with your module.
Post Reply

Return to “Developers Discussion”