Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-07-01 09:31:22

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,659
GitHub Twitter

Edit article from front-office [SOLVED]

Hi all.

Trying to use rvm_if_privileged plugin to edit article from front-side in 4.4.1:

<txp:rvm_if_privileged> <a href="<txp:site_url />textpattern/index.php?event=article&step=edit&ID=<txp:article_id />"> EDIT </a></txp:rvm_if_privileged>

Seems however that form_token function doesn’t works/isn’t available on front side.

Is there a solution, or none?

Tks by advance folks.

Last edited by Pat64 (2011-07-01 14:46:11)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#2 2011-07-01 10:45:03

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Edit article from front-office [SOLVED]

Would you need the form_token part at all?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2011-07-01 11:00:15

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,659
GitHub Twitter

Re: Edit article from front-office [SOLVED]

uli wrote:

Would you need the form_token part at all?

Yes. In purpose to offer edit article feature to all publishers on txp-fr.net website.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#4 2011-07-01 11:15:05

lazyadmin
Member
From: Germany
Registered: 2009-08-08
Posts: 25
Website

Re: Edit article from front-office [SOLVED]

The token part isn’t needed at all if you just build a link to the edit page. I run a similar code and it works perfect.

Offline

#5 2011-07-01 12:51:59

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,659
GitHub Twitter

Re: Edit article from front-office [SOLVED]

@lazyadmin

Can you show me your code? Trying that kind of thing on 4.4.1 without any success: I return on admin side…on a blank “write” article page!


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#6 2011-07-01 13:06:54

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Edit article from front-office [SOLVED]

Best might be to copy from the TXP admin > Articles.

Have you really renamed your textpattern directory?

Last edited by uli (2011-07-01 13:47:51)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#7 2011-07-01 13:39:37

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,659
GitHub Twitter

Re: Edit article from front-office [SOLVED]

uli. Code above corrected. Sorry.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#8 2011-07-01 13:53:10

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Edit article from front-office [SOLVED]

Just in case the both of us don’t spot the difference, here’s my working code:

<a href="<txp:site_url />textpattern/index.php?event=article&amp;step=edit&amp;ID=<txp:article_id />" class="grau" title="Artikel oder Artikelinformationen bearbeiten">Text</a>

(Removed the quoted path from my post above, in case you don’t want it published.)

Last edited by uli (2011-07-01 13:53:41)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#9 2011-07-01 13:57:51

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Edit article from front-office [SOLVED]

Have to admit that it might make a difference to have several authors, now in 4.4.1. My code is taken from a local, one-person, test install.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#10 2011-07-01 14:45:32

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,659
GitHub Twitter

Re: Edit article from front-office [SOLVED]

@uli

You’re right. My 1st code (edited: without form_token() call), and yours works too. My first attempt was to use it in its simple form. Can’t figure why it didn’t work the first time… :-O

Tks lot to point me on the right way, Man.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#11 2011-07-03 11:51:53

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Edit article from front-office [SOLVED]

Glad it works now.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

Board footer

Powered by FluxBB