Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2005-05-24 22:57:19

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Txp Plugin Template for Developers

Awesome!

Offline

#32 2005-05-25 01:58:39

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Txp Plugin Template for Developers

Okay, I must have missed a step or done something stupid.

Try and view my (dev) Txp site – either public or admin, and all I see is my base64-ed plugin string. Any ideas?

Offline

#33 2005-05-25 02:42:03

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: Txp Plugin Template for Developers

Mary – don’t put zem_tpl in the directory with your plugin. I did the same thing at first.

Offline

#34 2005-05-25 03:04:07

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Txp Plugin Template for Developers

Ah okay. Thanks! Of late Firefox has been acting weird when compiling the plugin, so it was taking forever going back and forth. Now I can be in plugin-making bliss. :)

Offline

#35 2005-05-25 16:14:09

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: Txp Plugin Template for Developers

Sweetness. It was the relative path that was causing me a problem. Switched to absolute and it working fine now, front end and admin plugins.

Also, FYI, its not totally necessary for the filename to be the same as long as you uncomment the line that reads

<code>$plugin[‘name’] = ‘your_plugin_name’;</code>

and set the proper plugin name.

Last edited by wilshire (2005-05-25 16:14:50)

Offline

#36 2005-05-25 19:12:32

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Txp Plugin Template for Developers

Yep, that’s what I did, adjusted zem’s template to add that field and also the type (admin) option – better to do it from the start or else I’d forget it altogether.

I’m so hyper. This has allowed me to do some real work on a plugin, without wasting my time fiddling around. Muchas gracias, Alex and Sencer!

Offline

#37 2005-05-26 18:00:49

marz
Archived Plugin Author
From: Barbados
Registered: 2004-11-13
Posts: 43
Website

Re: Txp Plugin Template for Developers

just downloaded the zem_tpl and plugin template, put in my plugin-code and textile help. now, compiling…I’m on windows, and unfortunately ‘php’ is not a valid Windows command-line command. so how do I complile plugins on my local windows setup? (I’m using the XAMMP apache/php/ mysql package if this helps)

Last edited by marz (2005-05-26 18:01:36)

Offline

#38 2005-05-26 18:14:49

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Txp Plugin Template for Developers

Doesn’t quite work that way.

The idea is you put your plugin, the tpl and the Textile class (or link to it, see the first part of zem_tpl) in the same folder, and open up your plugin php file in your browser. You’ll get the plugin string spit out.

Before you do that though, put only your plugin file in the tmp folder (and the rest of the instructions above). Textpattern will run, and your plugin will be already installed and activated. That way, you can get your plugin all done, then run it as I’ve mentioned above to create the plugin string for others to use.

Does that help any?

Offline

#39 2005-05-26 18:38:51

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

Re: Txp Plugin Template for Developers

Actually there is a command-line php in the windows binary distribution, too. It’s in the CLI directory of PHP. You have to adjust paths or copy some files around, though. So it’s probably easier to just do it as mary described it and call the file from the browser, the result will be the same.

Offline

#40 2005-05-26 19:01:27

marz
Archived Plugin Author
From: Barbados
Registered: 2004-11-13
Posts: 43
Website

Re: Txp Plugin Template for Developers

hey, that helps alot! thanx mary

Offline

#41 2005-06-05 00:34:40

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: Txp Plugin Template for Developers

So I’m curious of other people who are using zem’s template (zem_tpl.php) if you are able to get text to appear in Firefox for OSX. That browser just seems to not like the mime type & shows a blank page, even when viewing source. I also notice this same behavior for some of mary’s plugins as well as wilshire’s. It doesn’t appear to be dependent on PHP version, as I’ve seen it on everything from php4 to php5. I’m wondering if other browsers also behave this way and if it’s a bug with Firefox or with how the plugin code is being served up.

Offline

#42 2005-06-05 00:39:29

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Txp Plugin Template for Developers

Can you be a bit more explicit about what you’re doing and what’s happening? Is this when you’re compiling a plugin, running it, installing it, or what?


Alex

Offline

#43 2005-06-05 00:42:22

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: Txp Plugin Template for Developers

Ah yes… the blank page occurs in Firefox/OSX when you try to access the compiled plugin via a download link (any average end-user trying to download the plugin).

Last edited by Andrew (2005-06-05 00:46:14)

Offline

#44 2005-06-05 00:45:46

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: Txp Plugin Template for Developers

Both paste and download version (if available that is)?


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#45 2005-06-05 00:49:45

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: Txp Plugin Template for Developers

Ah ok I see now. Just simply clicking the link returns a blank page; saving the link to disk serves up the plugin code. Weird behavior.

Examples: all of my plugins, all of mary’s plugins (such as this), some of wilshire’s plugins (such as this but not this ?)

Offline

Board footer

Powered by FluxBB