Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2006-04-10 15:40:57
- marios
- Archived Plugin Author

- Registered: 2005-03-12
- Posts: 1,253
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
mikewest wrote:
@marios: Why wouldn’t the script import/export the pages and css? To me, those are just as wrapped up in the templating of a site as the forms are, and I have just as much need to edit them outside the constraints of TextPattern’s admin interface.
Yes, but where does the overhead in the pages, and CSS tables come from, why doesn’t it happen in the forms table?
There must be a reason no ?
regards, marios
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
Well we are in there adding/replacing form data, css data, and page data so what about post data? That was where I was going with that aside. If we can grab post data in the same way, we bypass sql altogether taking it out of the equasion allowing this plug in to also be good for migrating a txp installation from one system to another even, though there may be different php or mysql versions running which always causes problems and much troubleshooting.
I am not getting any overhead on my css tables. I am not sure where that would come from.
Offline
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
<a href=‘http://mikewest.org/file_download/4’>Version 0.2 is ready for you to play with</a>.
A detailed change log will have to wait till the morning, but the gist of it is this: I’ve tweaked the system so that instead of having a single export/import in the `_templates` directory, it now supports multiple versions in subdirectories. When exporting, you’re asked for an export set name, which is used as the subdirectory name. On import, you’re asked to choose from the export sets avaliable. Additionally, an export into `preimport-data` is run before each import for backup purposes.
To install, simply backup your database, and install the plugin. Any data you might have currently sitting in the `_templates` directory will be ignored by this version of the plugin, and can be safely removed.
Thanks!
-Mike
Offline
#19 2006-04-10 22:15:46
- marios
- Archived Plugin Author

- Registered: 2005-03-12
- Posts: 1,253
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
That seems to work well,(I’m still haveing overhead issues on the relevant tables, weird.)
One feature Idea, for this plugin for some future feature could be to extend this for plugin bulk uploading and exporting as well.
regards, marios
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
it now supports multiple versions in subdirectories
Super Saweet.. versioning….. Yummy. That’s almost svn. Love the ability to rollback. Thanks!
Offline
#21 2006-04-11 05:46:03
- marios
- Archived Plugin Author

- Registered: 2005-03-12
- Posts: 1,253
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
I’m getting serious thoughts now to set up SVN on MAC OS, but yes ist’s pretty much SVN thinking,
For now I use a Foldername convention which looks like this:
blog_xxf_xxp_xxc.Then with each change in each of those I increase the relavant numbers for the export feature.
regards
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
Right. It’s a good way of running backups, and I think it might also be a good way of packaging up themes and distributing them. I’m looking for feedback about how we might handle images being packaged along with the pages, forms and css (perhaps the css rules could simply point at `…/textpattern/_templates/<template_name>/images/`?), and, more importantly, whether we should come up with a method of binding sections to the newly imported pages. I have no idea how that should look.
Once we solidify something, I’ll document it more strenously.
-Mike
Offline
#23 2006-04-11 17:19:19
- marios
- Archived Plugin Author

- Registered: 2005-03-12
- Posts: 1,253
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
mikewest wrote:
<blockquote>
I’m looking for feedback about how we might handle images being packaged along with the pages, forms and css </blockquote>
There is lots of discussion going on about better image management in general, some plugin like aba_image_import allready does the multiple image upload, I think it’s not a good Idea though to mangle the theme/template images with tXP’s image folder,since they are mostly presenational background images in your CSS, they should stay either separate or in a subfolder, like e.g.: ‘graphics’.
mikewest wrote:
<blockquote>
perhaps the css rules could simply point at `…/textpattern/_templates/<template_name>/images/`?)</blockquote> (
I believe the CSS rules should only point at /graphicsfolder/imagefile.gif,TXP does all the rest.
mikewest wrote:
<blockquote>
more importantly, whether we should come up with a method of binding sections to the newly imported pages
</blockquote>
Couldn’t that be done using the database qeries that run during setup procedure, when it first creates the two default sections that ship together on4.0.3 ?
mikewest wrote: <blockquote> I have no idea how that should look. </blockquote>
Unfurtunatelly I’m not certified enough to judge these matters correctly, but at least we have seen a significant point,
regards, marios
Last edited by marios (2006-04-11 17:26:04)
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
mike, the last version is working wonderfully. I can see this as the beginning of a very robust theme manager.
One thing i do miss from the old (scott’s) version, is that it told you which files had actually been updated, that is which ones had changed. A very minor thing but it was handy.
great work, i really love this.
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
@kemie: I’ll see if I can sneak that into the next release, which should be coming out in a week or so.
-Mike
Offline
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
This is a great plugin for managing multiple themes, thanks!
I stumbled on this while I was looking for a similar solution, unfortunately this isn’t quite it but it is close. I was looking for a way for my file-based “template” (pages and forms) to be truly linked to TXP—in other words, I could edit in skEdit or TextMate, save, and simply reload the browser to see my changes. That would be TXP gold.
I read somewhere from Dean the basic steps to get this done; it was a little over my head at the time but maybe I’ll try to cook something up.
<code><btw></code>
I was just thinking… in Perfect Land you could:
- edit and develop in your favorite text editor;
- when finished, use this plugin to import the temporary files into the database for ultimate portability;
- export the files to either be transferred or backed up
That would be the bee’s knee’s…
<code></btw></code>
Last edited by rmedek (2006-05-06 03:23:22)
All the Dude ever wanted was his rug back.
Offline
#27 2006-05-09 00:20:33
- marios
- Archived Plugin Author

- Registered: 2005-03-12
- Posts: 1,253
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
no table corruption, was caused by some image handling plugin, just to confirm that it is clear,
regards
(I’m still struggling with SVN now)
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
This is genius and sure beats my copying and pasting into a text editor. I haven’t imported only because I don’t feel like fixing anything in the chance that things go wrong, but the export was great. Thanks for your time Mike.
Offline
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
As the creator of the original import/export that this was based on, I want to say thank you fr doing what i could not. I am so glad to see thi sia a plugin now and it allows for multiple folders/themes. I knew i wanted to get around to this but lacked the time needed. can you tell i’m a teacher based on the fact that all my plugins/ported themes were created/updated during summer/christmas/easter breaks?
Anyway, thank youfor creating this excellent plugin. It will make themes so much easier to work on.
Offline
#30 2006-05-30 02:58:53
- stdmedia
- Member

- From: Canada
- Registered: 2006-01-05
- Posts: 51
Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files
This is quite possibly the best plugin I’ve run into in a long time. Fantastic work, absolutely fantastic.
Offline