Welcome to Geeklog Friday, November 16 2018 @ 11:19 pm EST

Geeklog Forums

Add forms without plugins


Status: offline

alb3rt

Forum User
Chatty
Registered: 30/10/06
Posts: 52
Location:Mexico City
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?

D Web Studio - www.d-webstudio.net

Status: offline

alb3rt

Forum User
Chatty
Registered: 30/10/06
Posts: 52
Location:Mexico City
Sorry guys, it was a file permission problem. Everything works correctly.
D Web Studio - www.d-webstudio.net

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1316
Glad you got it working.
One of the Geeklog Core Developers.

All times are EST. The time is now 11:19 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content