Subject: Add forms without plugins

Posted on: 26/10/18 01:33am
By: alb3rt

Hi guys,

I need to add a simple form to my site, in previous versions of geeklog I added my form through a custom file from the "layout/theme"" and I got it with:

PHP Formatted Code

$form_templates = new Template ($_CONF['path_layout'] . 'custom');
$form_templates->set_file('editor','editor.thtml');
...
 


I have migrated to the most recent version and I see that it does not work, since it does not take into account my form, I have noticed that the class has changed

PHP Formatted Code

$form_templates = COM_newTemplate(...
...
 


I have noticed that it works with these options:

PHP Formatted Code

$group_templates = COM_newTemplate(CTL_core_templatePath($_CONF['path_layout'] . 'admin/group'));
...
 


PHP Formatted Code

$link_templates = COM_newTemplate(CTL_plugin_templatePath('links', 'admin'));
...
 


But it does not work:
PHP Formatted Code

$form_templates = COM_newTemplate($_CONF['path_layout'] . 'custom');
...
 


Is it possible to get a template from layout without writing a plugin?

Re: Add forms without plugins

Posted on: 26/10/18 02:05am
By: alb3rt

Sorry guys, it was a file permission problem. Everything works correctly.

Re: Add forms without plugins

Posted on: 26/10/18 06:40am
By: Laugh

Glad you got it working.

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=96903