Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#46 2005-06-05 01:01:40
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Txp Plugin Template for Developers
I just provide a link to the .php file built from zem_plugin.php. Should I be providing multiple download versions? It looks to be the way browsers built on the mozilla engine handle this sort of file; Camino also shares this behavior. It’s not that big a deal; I’ve just had a few people report “broken” links to plugins because they clicked thru the download link and recieved back a blank page. I notice plugins on threshold state use the mime type application/octet-stream so it automatically prompts a download and sidesteps this issue.
Last edited by Andrew (2005-06-05 01:02:51)
Offline
#47 2005-06-05 02:17:26
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Txp Plugin Template for Developers
This isn’t a function of the plugin template, but of the way the compiled plugin file is served for download. A good start would be uploading it with a .txt extension.
Alex
Offline
Re: Txp Plugin Template for Developers
I’m pretty sure what you’re seeing has to do with the size of the plugin and Firefox’s ability to display really long strings. The plugin’s whose base64 output you can see in the browser window are typically very small and therefore the encoded string is short and displays in the browser window.
In Firefox for Win I’ve always been able to hit Ctrl-A and even if nothing is visible on the screen I can see the highlight. And copy and paste still works too. In my experience, even if you can’t see the encoded plugin in Firefox, its still there.
Offline
#49 2005-06-07 01:17:34
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Txp Plugin Template for Developers
Whoa {slaps forehead} whaddyaknow… you’re right, wilshire. Thanks for the tip.
Offline
Re: Txp Plugin Template for Developers
The 4-step process I explained above has changed a bit now, but basically still works. Since prefs moved into the db, that’s where you have to create the field now.
Only step-2 changed:
1. Use zem’s tamplate.
2. insert row into txp_prefs table with
name = ‘plugin_cache_dir’ and val = ‘/full/path/www/textpattern/tmp’
(you can let the other ones default to their respective default value)
3. create a directory /full/path/www/textpattern/tmp
4. drop your plugins (uncompiled) in that directory (make sure plugin name and plugin-filename correspond, e.g. zem_test should be in zem_test.php)
(Note: do not put zem_tpl.php in the same directory)
Offline
#51 2005-07-28 23:53:01
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Txp Plugin Template for Developers
For those interested: updated plugin templates.
(Edit: link was outdated.)
Last edited by Mary (2005-08-13 23:15:31)
Offline
#52 2005-08-22 05:16:48
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Txp Plugin Template for Developers
Just to clarify that last line a bit for others, “do not put zem_tpl.php in the same directory” should read “do not include zem_tpl.php, whether by placing it in the same directory or in your include path”. I forgot that I had that file in my include path and couldn’t figure out for a good few minutes why the heck suddenly my dev site became one big plugin spew mess.
Offline
Re: Txp Plugin Template for Developers
Jesus, I include the PHP plugin in my plugin plugin_cache_dir and nothing happens. Any idea?
Offline
#54 2005-11-29 05:01:09
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Txp Plugin Template for Developers
So you…?
- used the plugin template
- put it in a directory
- set that directory as your plugin_cache_dir (it needs to be a full path by the way, just like for the tmp dir)
- tried using the plugin and…?
Offline
Re: Txp Plugin Template for Developers
> mary wrote:
> So you…?
- used the plugin template
- put it in a directory
- set that directory as your plugin_cache_dir (it needs to be a full path by the way, just like for the tmp dir)
- tried using the plugin and…?
And nothing happens :( When I launch TP the plugin doesn’t show up.
Offline
#56 2005-11-29 06:01:46
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Txp Plugin Template for Developers
Show up where? Oh you were expecting it to show up on the plugins page? It won’t, because the plugin has only been loaded, not installed into the database. It’s there though, it will still work.
Offline
Re: Txp Plugin Template for Developers
I use to show up in plugins section in TXP previows releases. Still, it doesn’t work. I have a big Textpattern Warning: unknown_tag now :)
Must be doing something stupid
Offline
#58 2005-11-29 07:18:55
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Txp Plugin Template for Developers
Check your tag name. Is $plugin['name'] exactly the same as the tag you’re trying to use?
Offline
Re: Txp Plugin Template for Developers
Mary, it’s is I’m using <txt:pluginname />
I’ll take a closer look to it and see what’s going on.
Offline
#60 2005-12-01 04:18:48
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Txp Plugin Template for Developers
Uh, $plugin['name'] should be $plugin['name'] = 'pluginname';, not $plugin['name'] = '<txt:pluginname />';
?
Offline