Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-04-10 14:25:08

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

Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files

THANK YOU!!! This is sooooo nice. I had been using Scott’s scripts for a long time, but they were a bit clunky for everyday use. I can now work up and on my site locally and move it without dealing with MySql version conflicts on the remote server when trying to move the whole txp database. I have one question though. How would I go about injecting the test articles as well? Or is that even feasible? It would make server transition a snap by once again taking MySql conflicts out of the picture all together when moving sites or even eliminating potential upgrade fiascoes.

Offline

#14 2006-04-10 14:49:33

mikewest
Archived Plugin Author
From: Deutschland
Registered: 2006-04-09
Posts: 16
Website

Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files

@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.

@soulship: I’m not sure what you mean by ‘injecting test articles’. Could you elaborate a little bit?

-Mike

Offline

#15 2006-04-10 15:13:19

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: [plugin] [ORPHAN] mcw_templates: export/import pages, forms, css to files

Mike: yes, its a permanent error. For some reason, my server won’t accept alterations in the script. Its wierd, and it applies to other plug in scripts as well.

Offline

#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

#17 2006-04-10 17:54:50

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

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

#18 2006-04-10 20:19:15

mikewest
Archived Plugin Author
From: Deutschland
Registered: 2006-04-09
Posts: 16
Website

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

#20 2006-04-11 01:00:54

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

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

#22 2006-04-11 16:35:06

mikewest
Archived Plugin Author
From: Deutschland
Registered: 2006-04-09
Posts: 16
Website

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

#24 2006-04-12 09:36:17

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

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

Board footer

Powered by FluxBB