Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2006-02-11 12:08:07

neptho
Member
From: A cold, dark place.
Registered: 2006-02-01
Posts: 48

Re: I made some scripts that import/export templates, forms and css

getmicrotime() is in textpattern/lib/txplib_misc.php – add

<pre>include $txpcfg[‘txpath’].’/lib/txplib_misc.php’;</pre>

to the top of your plugin after any config.php/other includes.

[Edit: Oops! Caught that. I was falling asleep at the wheel. :) ]

Last edited by neptho (2006-02-13 05:32:57)

Offline

#50 2006-02-11 13:17:27

shishira
Member
From: Bangalore India
Registered: 2005-04-17
Posts: 62
Website

Re: I made some scripts that import/export templates, forms and css

> neptho wrote:

> getmicrotime() is in textpattern/lib/txplib_misc.php – add

<pre>include $txpcfg[‘txpath’].’/lib/txplib_misc.php”;</pre>

to the top of your plugin after any config.php/other includes.

isn’t it a single quote after the path is working for me great a big time saver thanks

Offline

#51 2006-02-12 15:24:46

helena
New Member
Registered: 2006-02-11
Posts: 3

Re: I made some scripts that import/export templates, forms and css

Thanks so much! I added this to template_export.php and template_import.php, right below all other includes (I did change the last double quote to a single quote), and it seems to work perfectly.
Thanks for solving this, and thanks to the author for the plugin, this makes working with templates so much easier.

Offline

#52 2006-02-17 16:29:43

swf
Plugin Author
From: Saskatoon, Saskatchewan Canada
Registered: 2004-06-21
Posts: 109
Website

Re: I made some scripts that import/export templates, forms and css

I’ve updated the scripts and they seem to work with the newest Textpattern. You can grab versio 0.3.2 on my website

Last edited by swf (2006-02-17 16:30:05)

Offline

#53 2006-02-17 16:49:24

swf
Plugin Author
From: Saskatoon, Saskatchewan Canada
Registered: 2004-06-21
Posts: 109
Website

Re: I made some scripts that import/export templates, forms and css

By the way, can anyone explain how I could create an admin plugin so that I can add links under the extension tab for import and export? Even if I still have to upload the script files, It would provide easy links to work with rather than trying to remember the address for each file.

Offline

#54 2006-02-23 14:13:56

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: I made some scripts that import/export templates, forms and css

Ooh, i’d love that. I manually added links to the txp header, but it was a hackish job.


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#55 2006-02-23 17:11:30

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: I made some scripts that import/export templates, forms and css

Thanks for the update Scott! Just in time to help me move a site.

Offline

#56 2006-02-23 17:19:02

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: I made some scripts that import/export templates, forms and css

swf,

If you open the Plugin Template, there is an example of an admin-side plugin. Maybe that would help you?

It’s surprisingly straight-forward to turn your code into a new tab in the txp admin interface.

Offline

Board footer

Powered by FluxBB