Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#169 2012-01-31 21:13:54

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,729
Website

Re: [plugin] [ORPHAN] cnk_versioning

Markus, check in the plugin code (admin > plugins > edit) to see the specified path for those folders ($CNK_VER_OUTPUT_PATH = ...). That may be pointing to a path that’s different to where you have your folders. The plugin does work and I have used it with local mamp installations on os-x too, albeit in virtualhost containers.


TXP Builders – finely-crafted code, design and txp

Offline

#170 2012-02-01 15:33:38

alanfluff
Member
From: Ottawa, Canada
Registered: 2008-09-15
Posts: 222
Website

Re: [plugin] [ORPHAN] cnk_versioning

EDIT [2012-02-17] begin
In the original listing the author says:

Please use this with care! Your pages/forms/css will be deleted from the database, when you delete the corresponding files.

The warning says it all—use with the care, for example perhaps get this working on a non-live system first, have a backup of both files and database, etc.
EDIT [2012-02-17] end

I also have CNK working on OS X (Lion & MAMP PRO).

But I also had some problems installing and so when I last installed, I took some notes for myself, here are the notes, I hope it helps:

1. create the folders

/my-nice-folder/cnk_templates/css
/my-nice-folder/cnk_templates/forms
/my-nice-folder/cnk_templates/pages

2. install the plugin but do not activate, the plugin code I use is cnk_versioning for txp 4.41
3. edit the plugin code, essentially delete it all and past in cnk_versioning for txp 4.41 – modified code once plugin is installed
4. check you are happy with the locations and file extensions

$CNK_VER_OUTPUT_PATH = 'my-nice-folder/cnk_templates/'; //e.g. 'textpattern/_templates/versioning/'
$CNK_VER_EXT = 'php';
$CNK_VER_EXT_CSS = 'css';

5. activate the plugin
6. click ‘Presentation’ and then go to ‘Versioning’
7. do NOT click ‘Install’ but do click ‘Write pages & forms to files’—you see errors, no matter
8. now click ‘Install’
9. your folders should now hold files to reflect the Forms, Pages, CSS.

This is likely a cringe-making way to install this plugin, but I value its functionality SO much that when I found these steps worked I wrote them up so I could repeat them like a monkey each time I needed the plugin installed.

Good luck and I hope this helps.

Cheers, -Alan

Last edited by alanfluff (2012-02-17 15:30:21)


At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A

Offline

#171 2012-02-01 18:31:47

markus_falk
Member
Registered: 2012-01-14
Posts: 11

Re: [plugin] [ORPHAN] cnk_versioning

aaaahhh … seems to be working now … I created a subfolder for those 3 required folders … that did the trick :) that and checking the path again ;)

thanks alot guys … that just saved my day … o and made developing for txp like it should be :)

Offline

#172 2012-02-17 15:33:44

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

Re: [plugin] [ORPHAN] cnk_versioning

Hi Nate.

Check that the $CNK_VER_OUTPUT_PATH variable is pointing to the correct folder, where the pages/ and forms/ folders are stored.

$CNK_VER_OUTPUT_PATH = 'path/to/folder'; //e.g. 'textpattern/_templates/versioning/'

Also, check that the $CNK_VER_EXT is also set correctly to the file extension you are using.

$CNK_VER_EXT = 'txp';

I’m not sure why alanfluff decided to set it to “php”. I mean, it’s totally OK that he prefers to use .php for pages & forms files, instead of the default .txp extension, but I wonder what’s the reason.

Thinking out loud: OK, I can think of a reason. If pages & forms are located in a folder that is publicly accessible (via a webserver), using a .php extension will probably return a blank page (or a page with errors), instead of the raw/plain-text code for the page or form.
So, setting the extension to .php may “hide” the code for your pages & forms, which is a good thing, although I prefer to use an .htaccess file inside the pages & forms folders to do the same (i.e. to avoid webserver serving those files publicly). I don’t have the .htaccess (which is just one or two lines) right now at hand, but I’ll post it when I do.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#173 2012-02-17 15:34:15

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

Re: [plugin] [ORPHAN] cnk_versioning

Ops!
Nate’s post “disappeared”!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#174 2012-02-17 15:35:53

alanfluff
Member
From: Ottawa, Canada
Registered: 2008-09-15
Posts: 222
Website

Re: [plugin] [ORPHAN] cnk_versioning

Yes it did!

Btw, I did it (.PHP) so that when the files were opened in my editor they had syntax highlighting.

I added a warning to the top of my post also, just re-iterating the original author.


At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A

Offline

#175 2012-02-17 15:43:13

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

Re: [plugin] [ORPHAN] cnk_versioning

Julián, Thanks. I had two things wrong, I have my extensions set to .php instead of .txp (which they were in the old version) and my production was set to Live. Switching to Testing and fixing that extension setting saved my morning!

Offline

#176 2012-02-17 15:43:56

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

Re: [plugin] [ORPHAN] cnk_versioning

maniqui wrote:

Ops!
Nate’s post “disappeared”!

figured out the problem about 2 minutes after I posted……

Offline

#177 2012-02-17 16:17:04

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,729
Website

Re: [plugin] [ORPHAN] cnk_versioning

I did it (.PHP) so that when the files were opened in my editor they had syntax highlighting

That’s what I thought when I read your instructions because it was something I faced too. In my case I was able to set my OS to open txp files with my preferred code editor, and in the code editor I added the “txp” file extension to the file extensions that are displayed using html/php syntax highlighting.

although I prefer to use an .htaccess file inside the pages & forms folders to avoid webserver serving those files publicly.

I agree, I think that’s a better approach. This is what we have in the .htaccess in one of our repos. Is that it?

Order Deny, Allow
Deny from all

TXP Builders – finely-crafted code, design and txp

Offline

#178 2012-08-01 20:01:19

drudog
Member
Registered: 2011-02-01
Posts: 20

Re: [plugin] [ORPHAN] cnk_versioning

I followed Alan’s directions to a ‘T’ and still I can’t get this bugger to work. The path to my dev site and txp install is webroot/dev/ but I put the required folders in both the webroot and in /dev/ directories and set the permissions wide open (777).

I checked that the path in the plugin is correct.

When I follow Alan’s directions the plugin tells me the files were successfully created in the directories but when I go verify via FTP the folders are bare. I even tried manually uploading a new page to those folders to see if txp would recognize the new files under sections>‘uses page:’ but the newly uploaded file doesn’t show in the drop down list of pages.

I am using a newly installed version of txp 4.4.1

Anyone have an idea how to get this plugin working? Any help is very appreciated.

Offline

#179 2012-08-01 20:24:25

alanfluff
Member
From: Ottawa, Canada
Registered: 2008-09-15
Posts: 222
Website

Re: [plugin] [ORPHAN] cnk_versioning

Ack :/ really sorry @drudog that this is not working. I wish I had something else to add but the best of my knowledge on this is here in this thread.

The only other thing that came to mind was that I think I did all this on a local MAMP env’ and so at least permissions were likely less of an issue. Good luck and sorry I can’t add anything more at the moment.


At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A

Offline

#180 2012-08-01 20:25:37

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

Re: [plugin] [ORPHAN] cnk_versioning

When I follow Alan’s directions the plugin tells me the files were successfully created in the directories but when I go verify via FTP the folders are bare. I even tried manually uploading a new page to those folders to see if txp would recognize the new files under sections>‘uses page:’ but the newly uploaded file doesn’t show in the drop down list of pages.

When you did this test, did you recall to set the website in “Testing” mode & hit (ie. visit) the front-end at least once?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB