Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#145 2011-11-10 15:04:56

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

Re: [plugin] [ORPHAN] cnk_versioning

I had CNK_VER_EXT / txplib_misc.php error also but not that exact message and on MAMP (Mac).

I am sorry to say I neglected to copy the exact error and I have since cured it.

I cured it by doing something really lame, I have an install of the plugin working on ano site, so I installed the version that says it’s for 4.4.1 and then went to edit the plugin and simply deleted all the code and pasted in the code from the version that works.

I’ve lost the plot now on exactly where I got the version that works.

All I know is that developing a site with this plugin is REALLY REALLY good compared to without.

I know this is the wrong place to state it, but if this functionality is part of TXP 5 I will be delighted.

Cheers, -Alan


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

#146 2011-12-05 15:01:45

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 479
Website

Re: [plugin] [ORPHAN] cnk_versioning

Notice: Undefined variable: CNK_VER_EXT in /Applications/MAMP/htdocs/aff/trunk/textpattern/lib/txplib_misc.php(653) : eval()'d code on line 257

Same error with your mod version Maniqui.

Offline

#147 2011-12-08 10:43:12

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

Re: [plugin] [ORPHAN] cnk_versioning

alanfluff wrote:

All I know is that developing a site with this plugin is REALLY REALLY good compared to without.
I know this is the wrong place to state it, but if this functionality is part of TXP 5 I will be delighted.

I completely agree with everything you said here. I couldn’t develop Textpattern sites without it now.

For some reason whenever I try to install maniqui version of the plugin I keep getting the following error:

Warning: Data too long for column 'version' at row 1 insert into txp_plugin set name = 'cnk_versioning', status = 0, type = 1, author = 'Christian Nowak (mod by Maniqui)', author_uri = 'http://www.cnowak.de', version = '0.1.7 (mod)', description = 'Autoload Templates', help = '', code = 'if (!function_exists(\'file_put_contents\'))\n{\n function file_put_contents($filename, $data)\n {\n $f = @fopen($filename, \'w\');\n\n if (!$f)\n {\n return false;\n }\n else\n {\n $bytes = fwrite($f, $data);\n fclose($f);\n return $bytes;\n }\n }\n}\n\nglobal $CNK_VER_OUTPUT_PATH, $CNK_VER_EXT, $CNK_VER_EXT_CSS, $CNK_VER_IGNORED_NAMES;\n\n$CNK_VER_OUTPUT_PATH = \'admin/\'; //e.g. \'textpattern/_templates/versioning/\'\n$CNK_VER_EXT = \'txp\';\n$CNK_VER_EXT_CSS = \'css\';\n\n// This names will be ignored on exporting/importing\ in C:\wamp\www\myweb\textpattern\lib\txplib_db.php on line 89

Offline

#148 2011-12-08 11:01:48

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

Re: [plugin] [ORPHAN] cnk_versioning

In case it helps anyone, this is the code I have when I go to ‘Edit’ the plugin version I have installed that works (re “…I cured it by doing something really lame…): http://pastebin.com/wJ59RKZM

Cheers, -Alan


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

#149 2011-12-09 09:47:16

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

Re: [plugin] [ORPHAN] cnk_versioning

Does anyone know how to modify the plugin to change the paths where the files are stored. For instance I’d like to store my CSS files in styles/css instead of the css directory.

I’ve found a number of references to the CSS path but wanted to double check I wouldn’t mess the plugin up if I changed them or that I hadn’t missed any.

	$css = glob($CNK_VER_OUTPUT_PATH.'css/*.'.$CNK_VER_EXT_CSS);
$css[$CNK_VER_OUTPUT_PATH.'css/'.$r['name'].'.'.$CNK_VER_EXT_CSS] = $r['mod_time'];
if (gps('do_pull') || (glob('../'.$CNK_VER_OUTPUT_PATH.'pages/*.'.$CNK_VER_EXT) === false && glob('../'.$CNK_VER_OUTPUT_PATH.'forms/*.'.$CNK_VER_EXT) === false && glob('../'.$CNK_VER_OUTPUT_PATH.'css/*.'.$CNK_VER_EXT_CSS) === false))
if (@is_writable('../'.$CNK_VER_OUTPUT_PATH.'css/') === false)
{
  $error = true;
  echo 'Folder "/css/" is not writable.';
if (cnk_ver_pull_css())
 {
  echo 'Styles were successfully written to the "/css/" directory.';
	{
  if (@file_put_contents('../'.$CNK_VER_OUTPUT_PATH.'css/'.$r['name'].'.'.$CNK_VER_EXT_CSS, $r['css']) === false) return false;
       }

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 ;-)

Offline

#150 2011-12-09 10:34:30

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

Re: [plugin] [ORPHAN] cnk_versioning

Ross, the only path mods I’ve done have been at the start of the file, lines 22 to 24: http://pastebin.com/wJ59RKZM.

I’ve have never strayed past the comment on line 27.

The functionality provided by this plugin is such a major benefit to the web designed I am guessing it will be considered for TXP 5, not that that helps now. Good luck, cheers, -Alan


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

#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: 595
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: 999
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

Board footer

Powered by FluxBB