Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-09-01 15:21:44

smootch
New Member
Registered: 2012-09-01
Posts: 2

Blank screen with Plugin template in cache-dir

Hi there,

when i drop the 3 files from the zem_plugin (zem_tpl.php + zem_plugin.php + classTextile.php) template (latest SVN-version) into my cache-dir I’m getting no output (backend + frontend). Any ideas?

Thanks in advance!

Best regards,

smootch

PS: 4.5 is great!

Last edited by smootch (2012-09-01 15:22:29)

Offline

#2 2012-09-01 15:59:57

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Blank screen with Plugin template in cache-dir

Any PHP file added to your plugin cache directory is automatically imported by Textpattern. You actually shouldn’t put those files to the cache directory as they are. About the files you added there:

  • zem_tpl.php terminates the current script (which would Textpattern) by default. The file’s only purpose is to compose a plugin and output the resulting package. You can keep using it to dynamically output plugin packages on the fly, but if you do, place it outside plugin cache directory. Alternatively you could define $test variable. When a global $test variable is set, zem_tpl doesn’t compose a plugin or terminate the script.
  • classTextile.php is Textile. Textpattern already contains and defines Textile class of its own. As such this file should be placed outside plugin cache directory. I would actually recommend using Textpattern’s bundled textile class or using plugin packages help_raw option/field. If you do this, the Textile markup is parsed by Textpattern on the end-users end when the plugin is installed. I prefer the latter option myself especially since it lets users to see a HTML preview of the help when they preview/install the plugin (that preview step in the installer procedure). If you bundle HTML (i.e. pre-parsed Textile) they don’t, but instead see very much unreadable encoded HTML and plain-text.
  • zem_plugin.php is the plugin template, and the only file of the three that goes inside your plugin cache directory (or can stay there permanently) by default.

Last edited by Gocom (2012-09-01 16:09:28)

Offline

#3 2012-09-02 08:42:10

smootch
New Member
Registered: 2012-09-01
Posts: 2

Re: Blank screen with Plugin template in cache-dir

Ahh I see.

Thanks a lot Gocom :-).

Maybe a short hint in the Plugin-Template README could help newbies like me in the future :-).

Offline

Board footer

Powered by FluxBB