Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#25 2005-06-19 05:44:23

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 hanv’et done any work on this in a while and i’m not at my computer to check but i know that i had coded an option to create new forms templates etc. I just don’t remember if it was in a version i was using or the veriosn i had available for download. Either way it will be availabe within a day or two.

I agree that this is a great way to export templates and import template packages. I know that i recelnt used a teplate i downloaded and it took a long time to update css, forms and pages, so a standard would be nice so a user could just export the old (for backup purposes) and import the new.

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.

Last edited by swf (2005-06-19 05:47:58)

Offline

#26 2005-06-19 13:00:25

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

If it will add back forms, pages and css back to the db that aren’t already there, I don’t know what else it would need.

Hmmmm….I don’t know if plugins/image tables can be handled the same, now that would be a nice addition, but only if there was a toggle to choose. That would really take care of a templating engine as well that everyone has been wishing for. I have been using txp image handling for template/design elements. It makes it nice when linking in the page and css for the graphical elements, but becomes problematic for site migration or a site install that has gone awry. If this was an admin plugin with select boxes to pick what elements would be exported/imported from the db, now that would be ideal.

This would be a far superior way for problematic upgrades/downgrades in txp (more what I have used it for). Maybe someone will volunteer to help you wrap this into an admin side plugin with selects for elements to export. That is out of my range of capability. But I’m sure someone would jump in and lend a hand.

Offline

#27 2005-06-19 14:28:09

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

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

Now that’s interresting ideas, also out of my range I am afraid… if things go on like this, the community will build the templating engine before zem, kusor and dean even start toying with it :-p


.: Retired :.

Offline

#28 2005-06-21 14:14:20

uHunkler
New Member
From: Braunschweig
Registered: 2005-01-11
Posts: 4

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

Hi Scott and everybody,

I started to use your great scripts. It’s very handy to be able to work with TopStyle Pro ;-) on the files. But I can not get “page_default.php” to import back into TXP RC3. All other files work. Do you or anybody know the reason and the solution?

Thank you very much for your help.
Urs

Last edited by uHunkler (2005-06-21 14:17:18)

Offline

#29 2005-06-21 15:15:35

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

Sounds weird but have you tried this? Delete the copy on your webserver (don’t just overwrite it) then upload our local version and then try import again. I know my server has some problem with permissions and this solves it. Otherwise I’m not sure why it wouldn’t import that one .

Offline

#30 2005-06-21 19:54:24

uHunkler
New Member
From: Braunschweig
Registered: 2005-01-11
Posts: 4

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

Scott, thank you very much for your fast response. I’ve tried your proposal but without success. In the moment I work localy on a Xampp installation. When I am ready with the TXP design I will port TXP to a linux webserver and will see what happens there. I’ll tell you how it goes.

Urs

Last edited by uHunkler (2005-06-22 19:05:36)

Offline

Board footer

Powered by FluxBB