Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#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
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
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
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
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
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
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