Keyword

Preview unpublished article

  • Steven Trooster
  • Steven Trooster's Avatar Topic Author
  • Offline
  • Premium Member
More
6 years 11 months ago #165648 by Steven Trooster
Preview unpublished article was created by Steven Trooster
I have a site with the following set up: we have 25 editors who can add, edit and view their own (unpublshed) articles. To preview view their own articles they have to save and close the article and the go to their own page an click on read more.
We also have 3 editors-in-chief who have access to the admin of the site. There they can edit and publish all articles. What they can't do is preview an article before it is published, because the frontend of K2 only allows users to view their own unpublished articles, even though an admin or editor-in-chief has full rights.

Two questions:
  • is it possible to add a preview button to the edit form (so an author can easy preview his own article)?
  • how can I set to the access rights so an admin can preview all articles?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 11 months ago #165715 by Krikor Boghossian
Replied by Krikor Boghossian on topic Preview unpublished article
Hello Steven,

The button should be placed in your overrides, pretty much you can construct an <a> element which holds the item's link and has a target="_blank" value.
The admin can use super user access-level in order to preview items, other users can't see.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Steven Trooster
  • Steven Trooster's Avatar Topic Author
  • Offline
  • Premium Member
More
6 years 11 months ago #165764 by Steven Trooster
Replied by Steven Trooster on topic Preview unpublished article

Krikor wrote: The admin can use super user access-level in order to preview items, other users can't see.


I'm not sure what you mean by this. I don't want to give my editors-in-chief super admin rights on Joomla. Just 'super editor' rights on K2. Even though I've given them all the K2-rights, it seems that they can't preview an unpublished item written by someone else.

To be sure: the edit form for articles Is one form for front-end and admin (starting from the latest version of K2), stored in the admin section of Joomla. So the override should be in the admin?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 11 months ago #165781 by Krikor Boghossian
Replied by Krikor Boghossian on topic Preview unpublished article
You can use Joomla's ACL and publish articles with a specific access level so your editors can preview them, edit them and then set the ACL to public so the item is accessible to all users.

As for the override, you can copy the file to the itemform.php file and override that file.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Steven Trooster
  • Steven Trooster's Avatar Topic Author
  • Offline
  • Premium Member
More
6 years 11 months ago #165811 by Steven Trooster
Replied by Steven Trooster on topic Preview unpublished article
Two things are confusing here:

The item form.php in the frontend of the site is nearly empty, apart from a no-direct access statement. As I mentioned earlier, isn't it so that the frontend edit form is now pointing to the admin edit form? /administrator/components/com_k2/views/item/tmpl/default.php

Second: there are K2 usergroups with settings for viewing and editing items; but also Joomla acl settings. Which one is leading?

Apart from that: even though all editors-in-chief and myself as an super admin have full rights in K2, I still get a 404-error.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 11 months ago #165845 by Krikor Boghossian
Replied by Krikor Boghossian on topic Preview unpublished article
Hello,

1) Yes the same form is being in both cases.

2) Joomla!'s

3) Is the pubished as Special?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum