Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2004-07-07 12:51:22

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

Is anyone else using this? I find it so much faster for designing my templates. Anyway I’ve made a few changes

Updated to version 3

Changes to v3.0
  1. Only import files when they have changed
  2. Displays notice to user when file is updated
  3. Added option to import templates if not already in database or ignore
Future Updates
  1. Cleanup code and add functions
  2. Setup as a multifunction page (drop down to select import/export)
  3. Remove option to import new templates to database. instead display new template’s name with a link to add template into db.
  4. require user authentication (require txp cookie)

Last edited by swf (2004-07-07 12:52:27)

Offline

#14 2004-07-07 13:17:50

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

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

I use it.

Offline

#15 2004-07-07 13:23:15

marco
Member
From: Montreal
Registered: 2004-02-24
Posts: 62

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

I use it too, it does help. Could you add an option to export only templates and forms actually used by those templates? Then we could easier get rid of un-used forms and back up/restore a consistent set of templates and forms.

Offline

#16 2004-07-07 13:52:18

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

hmm just thinking outloud here

To do what you (marco) are requesting the script would have to read in the page templates and search for any reference to listform=”****” or form=”****” and then add those to an array of files to export from the database. Is that what your thinking?

Oh I should mention that i also added the ability to import new templates/forms/css into the database simply by placing them in the import folder provided they follow the naming rules (css_****.css)
I should tst teh ismple regex i have in the script to ensure that it doesn’t allow other files to be added (ex ***css_***.css or page_default.phps) forms are aded as a type=misc as a defualt which you can change in TxP

Last edited by swf (2004-07-07 13:53:22)

Offline

#17 2004-07-07 15:44:13

marco
Member
From: Montreal
Registered: 2004-02-24
Posts: 62

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

> swf wrote:

> hmm just thinking outloud here

To do what you (marco) are requesting the script would have to read in the page templates and search for any reference to listform=”****” or form=”****” and then add those to an array of files to export from the database. Is that what your thinking?

Yes, that’s it, but I see how this can be a bit harder.

Offline

#18 2005-04-05 17:20:59

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

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

this sounds great


be safe and happy

Offline

#19 2005-06-17 20:26:55

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

I just wanted to say thanks. I just found a need for this and it works flawlessly. I really appreciate the work this saved me. :)

Offline

#20 2005-06-17 20:54:33

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

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

That is something that comes like manna from the sky the right moment.
I’ll try this out ASAP.
How comes that I haven’t taken a notice of this yet ?

regards marios

Last edited by marios (2005-06-17 21:05:02)


⌃ ⇧ < ⌃ ⇧ >

Offline

#21 2005-06-17 21:56:00

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

Soulship: I’m gald it’s working for you. I was concerned because I haven’t heard much feedback and I have a problem on my server where if I export templates I can’t download -> edit and uplaod again without getting a permission error. For now I’ve gotten past this by exporting -> downloading -> edit and upload. After I have deleted the server version, I can’t continue to overwrite them with my edited local files.

Anyway, glad to see some people are getting some use out of this. I have some free time now so I plan on updating the import/export files. I wold really like to move this into an admin plugin, but hmmm admin plugins cinfuse me.

Offline

#22 2005-06-18 03:00:38

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

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

Personally, I am just glad that he added to the thread. :) I had been meaning to search for it, but couldn’t remember enough keywords to get started.

Offline

#23 2005-06-18 12:12:57

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

One thing that would be nice, (not sure if this is possible due to reaching in the db) would be the ability to add back forms not already in the db. Granted I was using this for something unintended. I had a db that got corrupted with wierdness to the point I needed a fresh install, so I used this to grab all of the templates and forms. I did a fresh install, used your script and re-added plugins to get rolling again. There were about 25 forms, pages, and css that were not there in the fresh install obviously. I had to sort throught those and redo. Still not a big deal as they were exported for me and convieniently there in text file to make it easy, but it would be a nice feature for this unintended purpose of the scripts you made.

Thanks again!

Offline

#24 2005-06-18 15:10:14

davidm
Member
From: Paris, France
Registered: 2004-04-27
Posts: 719

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

I second that, Soulship, especially after these discussions about templates & txp, it would solve the how to package a txp theme part of the equation :D


.: Retired :.

Offline

Board footer

Powered by FluxBB