Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2013-03-19 12:59:11

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: plh_edit_in_place : edit your article directly from the front end

planeth wrote:

Hi Jelle,
sorry for the late response, it was my vacation week !
And yes, i am actively working on this plugin to integrate custom_field and image.
Will release a beta version as soon as i can.

Hi,

surry for MY late response: I forgot to subscribe to this topic.

Wow, custom_field and images integration would be amazing! Looking forward to a beta.

Offline

#26 2013-04-15 07:21:44

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: plh_edit_in_place : edit your article directly from the front end

Can someone give an example of how page/article form should look in order to get this plugin working? Unfortunately Textpattern 4.5.4 does not appear to play well with this plugin (at least for me).

My main problem is, that I can login, edit the article body, but then I see no possibility to save my edit.

Last edited by stephan (2013-04-15 07:24:25)


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#27 2013-04-15 12:57:49

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 215
Website

Re: plh_edit_in_place : edit your article directly from the front end

Hi Stephan,

You should see a save button at the bottom of the body.
Make sure you’ve got the rights on the article you are editing.
Basically all you have to do is use the tag, nothing more.

I never tested the plugin in txp4.5.4.
A new version is in the pipe, hope i’ll have some spare hours left to give it this week.

Offline

#28 2013-04-16 16:12:16

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: plh_edit_in_place : edit your article directly from the front end

Hey Aleth,

it appears that the username is not recognized properly. Here’s what I tried:

A single article form includes

<txp:mck_login_if>You are: <txp:mck_login /> (<txp:mck_login name="name" />). Edit ahead.
<txp:plh_frontedit_body />
</txp:mck_login_if>

However, when I run this code, it appears that while my user is properly logged in, plh_frontedit_body does not recognize me. How else should I pass the user name to the has_privs function?

PS: Due to several issues I switched from using nginx as my webserver to Apache, hence the problems reported before are probably gone by now.

<txp:mck_login_if>
		[SQL (0.00022697448730469): select nonce, name, RealName, email, privs from txp_users where name = 'stephan']
		[<txp:mck_login_if>: true]
		<txp:mck_login />
		<txp:mck_login name="name" />
		<txp:php>
		</txp:php>
		<txp:plh_frontedit_body />
			[SQL (0.00021600723266602): select Body, textile_body from textpattern where ID = 2]
			[SQL (0.00024104118347168): select privs from txp_users where name='']
</txp:mck_login_if>

If I use

<txp:cbe_frontauth_protect>
    <txp:plh_frontedit_body />
<txp:else />
    <txp:body />
</txp:cbe_frontauth_protect>

Then the result is incorrect response when submitting the edited body text. The actual response from the server includes <p class="restricted-area">Restricted area</p> which I vaguely recall had something to do with plugin privs in an older Textpattern version.

I guess the plugin type needs to be 5, but that alone will not fix the issues I faced with Textpattern 4.5.4.

Last edited by stephan (2013-04-16 18:48:20)


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#29 2013-04-16 19:57:32

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: plh_edit_in_place : edit your article directly from the front end

stephan a écrit:

The actual response from the server includes <p class="restricted-area">Restricted area</p>

It has something to do with the hidden input field _txp_token generated by form_token() in lib/txplib_misc.php.

Offline

#30 2013-04-17 07:18:41

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 215
Website

Re: plh_edit_in_place : edit your article directly from the front end

Hi Stephan,
guess too much things are broken with this textpattern version.
If you want to try the new plugin, it’s on my bitbucket repo https://bitbucket.org/planeth/planeth_plugins/src
Nothing is packaged nor compiled, if you don’t mind running it for the plugin directory.
Just drop the js and css files in your template.
works as below :

<txp:plh_new_article section="your_section">
	<txp:plh_front_input 
		id="Title" 
		label=optionnal
		maxlength="75" 
		default="some text"
		<txp:title />
	</txp:plh_front_input>
	<txp:plh_front_textarea id="Body" label=optionnal wrap_edit="div" required="0" default="some text" row="15">
		<txp:body />
	</txp:plh_front_textarea>
</txp:plh_new_article>

You need to visit your page with ?plh_create_article=1 appended to
I didn’t create a tag for this.

I’ll try to compile and document everything as fast as i can …

Offline

#31 2013-04-18 08:10:36

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: plh_edit_in_place : edit your article directly from the front end

Hi Aleth – I will need to revisit this in a couple of days. For now I tried this and it works, but it looks like a lot more work and complexity which eventually I’d like to avoid.


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

Board footer

Powered by FluxBB