Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#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

#48 2005-06-06 12:38:07

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

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

Board footer

Powered by FluxBB