Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#46 2005-08-31 04:04:16

fri
Member
From: Denmark
Registered: 2004-04-30
Posts: 34
Website

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

Marvellous! Thank you so mutch!
I always have an ocean full of forms and template-pages, no problem reusing them in other installs now!

> swf wrote:

>I don’t know if I’ll be able to make this an admin plugin but I plan on making it one file with a drop down option to import or export and perhaps include a form for choosing a sub folder so it is easier to organize theme import/exports.

Other suggestions are more than welcome.

The future possibility to pick and choose WHICH of the items one wants to import or export would help me narrow things down a bit..

Offline

#47 2006-01-05 12:04:02

alexwest
Member
From: Järna, Sweden
Registered: 2004-08-04
Posts: 53

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

Just upgraded to TXP 4.0.3 and am using Link Template2File v0.3.1

I get these errors and templates are not exported:

Notice: Use of undefined constant TXP_DEBUG – assumed ‘TXP_DEBUG’ in c:\www\alexwest\textpattern\lib\txplib_db.php on line 50

Fatal error: Call to undefined function: getmicrotime() in c:\www\alexwest\textpattern\lib\txplib_db.php on line 55

Is anyone else using this plugin/hack and had the same errors with the new version of TXP?


be safe and happy

Offline

#48 2006-02-11 09:49:29

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

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

I have a vanilla install of TXP 4.0.3 and LinkTemplate2File 0.3.1. I get the same error as alexwest when I load template-export.php.
I would really like to get this to work, it would be great if anyone had a solution.

Offline

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

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

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