Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2006-01-19 02:37:12

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Move presentation layer to file system

Just FYI, there’s a new FAQ entry that’s relevant here.


Alex

Offline

#17 2006-01-22 18:41:34

andreizinca
New Member
Registered: 2005-08-10
Posts: 6

Re: Move presentation layer to file system

I have UNDO in my textarea because I’ve hacked textpattern to use AJAX so there is no page refresh when saving css, which enables UNDO. Also the cursor position does not change between saves, which is the biggest time saver.
This way I have created an entire css file using just TextPattern.

This AJAX technique can be applied also to article editing.

Last edited by andreizinca (2006-01-22 22:47:44)

Offline

#18 2006-01-22 19:08:17

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Move presentation layer to file system

adrezinca> Care to document this.

After getting sick of scrolling through my css file over and over again, I finally started using this technique. Your solution, is better, of course.

Code coloring would also be nice though.

Last edited by mrdale (2006-01-22 19:09:24)

Offline

#19 2006-01-22 20:15:44

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: Move presentation layer to file system

andreizinca wrote: I have UNDO in my textarea because I’ve hacked textpattern to use AJAX so there is no page refresh when saving …

This does sound good. The jump back to the top of the box is indeed a pain in the arse for me often.

Offline

#20 2006-01-22 21:43:38

andreizinca
New Member
Registered: 2005-08-10
Posts: 6

Re: Move presentation layer to file system

> mrdale wrote:
> adrezinca> Care to document this.
>After getting sick of scrolling through my css file over and over again, I finally started using this technique. Your solution, is better, of course.
>Code coloring would also be nice though.

Yes, splitting css is actually a nice thing to do for keeping it organized.
I also created master templates by nesting forms.

As for the AJAX method I am using, I have made modifications in many places in the source code and I do not remember all of them.
I’ll try to make a diff from the original textpattern against my source and see all the modifications.

EDIT:

Yes, there are a lot of modifications. :) It would take a while documenting every change.

But, if you are brave, you may use the patches I have created for the 4.0.2 version of TextPattern

Test it and port it afterwards to your application if you like it.

I make use of tw_sack.js wich can be found here You must copy tw_sack.js to you application folder

Good luck and tell me what you think!

Last edited by andreizinca (2006-01-22 22:47:17)

Offline

#21 2006-01-25 04:20:43

gravyface
Member
Registered: 2006-01-17
Posts: 12

Re: Move presentation layer to file system

Interesting workaround with that AJAX. I think I’ll stick with my original plans to move the templates and css to the file system though. Has anyone tried any tinyMCE or HTMLArea integration? The TXP dialect is pretty nice but I know they’ll be some users who’ll want that Word-like interface for editing.

Taking that Word dependency further, is there any Word to TXP converters in the works? A few of my clients will undoubtedly have quite a few Word documents they’ll want to import into TextPattern.

Offline

#22 2006-01-25 07:04:38

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Move presentation layer to file system

hak_tinyMCE

I’m sure I read something about a “Word” converter but I’m buggered if I can remember where.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#23 2006-01-25 16:12:41

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Move presentation layer to file system

andreizinca> Thanks for the info. I’m not brave enough to start any major hacking. What you did sounds cool though.

Offline

#24 2006-01-30 02:40:50

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: Move presentation layer to file system

> thebombsite wrote:

>I’m sure I read something about a “Word” converter but I’m buggered if I can remember where.

Perhaps you were thinking of Dean’s Word HTML Cleaner?

-Kurt


kurt@kurtraschke.com

Offline

#25 2006-01-30 05:37:29

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Move presentation layer to file system

That may well be it Kurt. Thanks for the link. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#26 2006-01-30 15:21:43

placenamehere
Archived Plugin Author
Registered: 2004-11-21
Posts: 88
Website

Re: Move presentation layer to file system

> thebombsite wrote:

> Importing and exporting themes as a plug-in is being worked on.

can you point to a discussion of this somewhere (don’t really want to hijack this thread, but am very curious as to direction thats being taken)


Site: placenamehere.com
Microformat Plugin: pnh_mf

Offline

#27 2006-01-30 18:10:43

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Move presentation layer to file system

Sorry. No can do at the moment. There is no thread. Just take it as stated. I can say no more at this point. :)

Last edited by thebombsite (2006-01-30 18:13:07)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#28 2006-01-30 18:14:40

placenamehere
Archived Plugin Author
Registered: 2004-11-21
Posts: 88
Website

Re: Move presentation layer to file system

so its not core code then?


Site: placenamehere.com
Microformat Plugin: pnh_mf

Offline

#29 2006-01-30 18:38:11

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Move presentation layer to file system

Nope. Plug-in.

Last edited by thebombsite (2006-01-30 18:39:12)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#30 2006-02-10 19:20:07

SCuM
New Member
Registered: 2006-01-09
Posts: 2

Re: Move presentation layer to file system

It seems as if it might be a good idea to implement something that would keep both types of people happy. There are those that prefer the design to be stored in the database and edited through the admin area and they are those who would prefer to have physical files so that they can use a IDE of their choice. Why not have a templates directory, and add a timestamp to the database for the layout. When the page is requested the system grabs a timestamp and does a compare, if the timestamps differ then grab the files and place them in the database. When they are being edited from the admin area then write out to the files and the database. That way one can develope their layout using either method. Just a thought. Then again, I am very new to TextPattern and just taking a look at it, this is the one area that bugs me as I prefer physical files myself. Just my 2 cents for what its worth.

Sean

Offline

Board footer

Powered by FluxBB