Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#50 2005-07-02 13:50:17

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

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

#53 2005-11-29 03:25:55

Souljacker
Member
From: Terra Brasilis
Registered: 2005-06-20
Posts: 47
Website

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

#55 2005-11-29 05:20:10

Souljacker
Member
From: Terra Brasilis
Registered: 2005-06-20
Posts: 47
Website

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

#57 2005-11-29 06:40:59

Souljacker
Member
From: Terra Brasilis
Registered: 2005-06-20
Posts: 47
Website

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

#59 2005-11-30 14:51:19

Souljacker
Member
From: Terra Brasilis
Registered: 2005-06-20
Posts: 47
Website

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

Board footer

Powered by FluxBB