Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#151 2011-12-09 18:31:58

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [plugin] [ORPHAN] cnk_versioning

Algaris wrote:

You know what would be nice, if someone was to adopt this plugin, would be to have a preferences tab where you could specify your own paths for the files ;-)

Paths, and Tables too! I’m using rah_external_output and would love to edit those rows in the rah_external_output table it creates in the database with an external editor. I mention this here because a lot of my templating is being done with rah_external_output and as I use cnk_versioning for my pages and forms edits in an external editor I am missing that option for my rah_external_output templates.

My pref: I keep my CSS in a directory called /style in the root and reference it in the head with plain old <link rel="stylesheet" type="text/css" media="screen" href="<txp:site_url />style/core.css" />. If a site ever needs a tune up cause it’s getting hit hard and will always be hit hard I’d consider puttin style back in the DB.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#152 2011-12-09 20:11:13

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 585
Website

Re: [plugin] [ORPHAN] cnk_versioning

What about just using the PHP include function in your rah_external_output snippets? Pull in any file you want.

Edit: Wrong function name :-) …fixed

Last edited by maruchan (2011-12-09 20:12:11)

Offline

#153 2011-12-09 20:12:38

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [plugin] [ORPHAN] cnk_versioning

maruchan wrote:

What about just using the PHP import function in your rah_external_output snippets? Pull in any file you want.

Yes! Thanks. :)


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#154 2011-12-09 22:38:29

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 992
Website

Re: [plugin] [ORPHAN] cnk_versioning

@whaleen: I keep my external output snippets as forms in cnk_versioning’s forms/ directory, and include them in rah_external_output’s tab via Textpattern’s output_form tag.

Offline

#155 2011-12-09 22:50:44

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] cnk_versioning

Nice trick, John.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#156 2011-12-09 23:36:51

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [plugin] [ORPHAN] cnk_versioning

maniqui wrote:

Nice trick, John.

Indeed. Won’t get any easier/better than than for me. Thanks for the trick!


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#157 2011-12-12 09:42:11

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 464

Re: [plugin] [ORPHAN] cnk_versioning

johnstephens wrote:

@whaleen: I keep my external output snippets as forms in cnk_versioning’s forms/ directory, and include them in rah_external_output’s tab via Textpattern’s output_form tag.

I’m trying to wrap my head around this. What would be the difference between doing this and just using a plain old <txp:output_form form="xx" /> in your code? Won’t the end result be the same either way with the form being pulled from the database?

Last edited by Algaris (2011-12-12 09:42:25)

Offline

#158 2011-12-12 13:50:41

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 992
Website

Re: [plugin] [ORPHAN] cnk_versioning

@Algaris: I’m not sure I understand your question. I do use the <txp:output_form form="xx" /> tag in external_output admin interface to grab the appropriate form. If you’re asking why I put the form in cnk_versioning’s forms/ directory, it’s because I want to keep my template code in the file system for all the benefits that offers.

Offline

#159 2011-12-12 14:07:03

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] cnk_versioning

Hi Algaris,

What would be the difference between doing this and just using a plain old <txp:output_form form=“xx” /> in your code?

I’m not sure if your question is formulated properly or if I didn’t understand it.
In any case, the trick posted by johnstephens is clever & pretty simple: in some rah_external_out entry, you put just a <txp:output_form form="some_form" />, and that’s all you will need to have the code for a rah_external_output located in an editable file (imported back to DB via cnk_versioning).

Won’t the end result be the same either way with the form being pulled from the database?

Even when using cnk_versioning, stuff (forms, pages and, optionally, css) is pulled from DB.
The only “job” done by cnk_versioning is to “suck” forms, pages and css files from the filesystem and dump them into the DB. Then, TXP inner cogs look for those forms, pages and css in the DB, as always.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#160 2011-12-13 08:30:42

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 464

Re: [plugin] [ORPHAN] cnk_versioning

Sorry I could have been clearer and worded my question better.

What I was trying to say was what advantage would there be to using rah_external_output and txp:output_form as apposed to just using txp:output_form in a page template?

As far as I can tell both would accomplish the same thing, pulling content from the database

I hope this makes sense. It could be that I’m having a slow week and missing something obvious ;-)

Last edited by Algaris (2011-12-13 11:58:58)

Offline

Board footer

Powered by FluxBB