If you’re familiar with Hop Studios’ Edit This plugin, Publish That probably needs no further introduction. Where Edit This produces a link on your site to edit an existing entry (or template or category or gallery entry), Publish That produces a link to create a new one. It’s as simple as adding a single tag:
{exp:publish_that:entry weblog_id="{weblog_id}"}
Or for more control, try the open/close tag approach:
{exp:publish_that:template template_group="2"}
<a href="http://{publish_that_url}">Create a new template in this template group</a>
{/exp:publish_that:template}
Just like Edit This, Publish That only produces the link if the person visiting the site is logged into the control panel and has sufficient control panel and group authorization to create the item in question.
Interested? Give it a try, and let us know what you think. Download Publish That.
Justin
I wanted to use this plugin to include or exclude a link to a weblog’s saef, keeping everything on the front-end.. I didn’t necessarily want the user to log into the admin to create or edit an entry..
I modified this plugin (and the edit_this) plugin to accept an admin=”yes|no” attribute, and if the value was no, the admin session check was ignored..
Other than the obvious fact that the user needs a CP session in order to use this plugin as a link to the publish tab, is there any other reason for requiring an admin session? Anything you take for granted in the code because there’s an admin session?
Looking through the code I can’t see a problem with this, if anyone else is interested, it’s very simple.. In the function Edit_this::entry() and Publish_that::entry() I changed the line:
if ($this->_session_ok() === TRUE)
to
if ($this->_session_ok() === TRUE) || $TMPL->fetch_param('admin')=="no")
Any feedback is appreciated.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.