Forums

Welcome, Guest
Username: Password: Remember me

TOPIC: Article display recognises unpublished status in JU Tab

Article display recognises unpublished status in JU Tab 3 years 1 month ago #2321

Is it possible to get JU Tabs to recognise that an article is unpublished and not display it? At the moment any unpublished article gets displayed and it has to be removed in the JU Tab module in order for it not to be displayed.
The administrator has disabled public write access.

Article display recognises unpublished status in JU Tab 3 years 1 month ago #2322

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 1641
  • Thank you received: 178
  • Karma: 43
If you load article from a category, it only select the published articles.
But if you specify an article id, it will load the article even it unpublished.
Why do you specify an unpublished article in the tab?
In your case, if you don't want this, you can edit the code:
File:
plugins/system/jutabs/jutabs.php
Line 2413:
$query = "SELECT `introtext`, `fulltext`, `alias`, `catid` FROM #__content WHERE id=" . $articleid;
Change to:
$query = "SELECT `introtext`, `fulltext`, `alias`, `catid` FROM #__content WHERE id=" . $articleid . " AND state = 1";
The administrator has disabled public write access.
The following user(s) said Thank You: vikingfreddy

Article display recognises unpublished status in JU Tab 3 years 1 month ago #2323

Many thanks for your speedy reply.

The client has a large number of standard articles that only need to be visible at certain times of the year. All the articles are in the tab and thanks to the amended code you have given me he is able to publish/unpublish the articles as required without having to access the module settings; and so he can change which articles are visible.
The administrator has disabled public write access.
Time to create page: 0.346 seconds
Powered by Kunena Forum