I am using Form2Content Pro version 6.15.0 on Joomla 3.6.4.
May I list in Article manager front-end view ONLY the unpublished items? If there are no setting available, can you provide me a line of code to insert into forms/default.php (or in any other part) to filter only unpublished articles?
Thank you.
cmc
Form2Content Forum
Questions and answers for Form2Content, a Joomla CCK.
- imsj
- Form2Content Lite & Pro
- Monday, 07 November 2016
- Subscribe via email
Accepted Answer
Pending Moderation
Hi, we currently don't have a setting to view published items only. No one has asked for it before but I think it's something we can add to our wishlist.
I would have to ask Julien if there is a "simple" override.
Regards,
Patrick
I would have to ask Julien if there is a "simple" override.
Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so

- more than a month ago
- Form2Content Lite & Pro
- # 1
Accepted Answer
Pending Moderation
Can Julien suggest me something to list only unpublished items on article manager?
Thank you.
cmc
Thank you.
cmc
- more than a month ago
- Form2Content Lite & Pro
- # 2
Accepted Answer
Pending Moderation
Or, as an alternative, can you suggest me how to hinibit modification for published articles?
Thank you.
cmc
Thank you.
cmc
- more than a month ago
- Form2Content Lite & Pro
- # 3
Accepted Answer
Pending Moderation
N.B.: I am using Form2Content Pro version 6.15.0 on Joomla 3.6.4.
- more than a month ago
- Form2Content Lite & Pro
- # 4
Accepted Answer
Pending Moderation
Hi,
Filtering the articles is done in the file components/com_form2content/models/forms.php in the function getListQuery()
From line #99 onwards the state is filtered:
This block of code takes into account whether the state filter is shown or not.
If you only need unpublished articles, you can replace the entire block with this line of code:
best,
Julien
Filtering the articles is done in the file components/com_form2content/models/forms.php in the function getListQuery()
From line #99 onwards the state is filtered:
// Filter by published state
if($activeMenu->params->get('show_published_filter', 0))
{
// State filter is visible
$published = $this->getState('filter.published');
if (is_numeric($published))
{
$query->where('a.state = ' . (int) $published);
}
else if ($published == '')
{
$query->where('(a.state = '.F2C_STATE_UNPUBLISHED.' OR a.state = '.F2C_STATE_PUBLISHED.')');
}
}
else
{
// State filter is not visible
$query->where('(a.state = '.F2C_STATE_UNPUBLISHED.' OR a.state = '.F2C_STATE_PUBLISHED.')');
}
This block of code takes into account whether the state filter is shown or not.
If you only need unpublished articles, you can replace the entire block with this line of code:
$query->where('a.state = '.F2C_STATE_UNPUBLISHED);
best,
Julien
- more than a month ago
- Form2Content Lite & Pro
- # 5
Accepted Answer
Pending Moderation
Julien,
I noticed a strange behavior. The code you suggest me work well if a "first" user call "his" content type. But if the "first" user call the content type of a "second" user, in that view all articles (published and unpublished) are shown. I have a "hierarchical" access, managed via Joomla ACL, that consent to a few users to list different content type, each one related to a different user (via menu item). It's strange, but I made several tests and this is the situation. I hope I was able to explain myself...
Do you have a solution?
Thank you.
cmc
I noticed a strange behavior. The code you suggest me work well if a "first" user call "his" content type. But if the "first" user call the content type of a "second" user, in that view all articles (published and unpublished) are shown. I have a "hierarchical" access, managed via Joomla ACL, that consent to a few users to list different content type, each one related to a different user (via menu item). It's strange, but I made several tests and this is the situation. I hope I was able to explain myself...
Do you have a solution?
Thank you.
cmc
- more than a month ago
- Form2Content Lite & Pro
- # 6
Accepted Answer
Pending Moderation
Hi,
Let me see if I get this right:
User 1 selects a menu containing an F2c Article list manager and sees unpublished items.
Then user 2 selects a different menu containing an F2c Article list manager and sees both published and unpublished items.
Is that what you mean?
best,
Julien
Let me see if I get this right:
User 1 selects a menu containing an F2c Article list manager and sees unpublished items.
Then user 2 selects a different menu containing an F2c Article list manager and sees both published and unpublished items.
Is that what you mean?
best,
Julien
- more than a month ago
- Form2Content Lite & Pro
- # 7
Accepted Answer
Pending Moderation
Not exactly, user Lazio access Lazio and Roma content types, If userLazio access Lazio content type see unpublished, if the same user access Roma content type see all.
See attach sreenshots (I am developing on a local website).
cmc
See attach sreenshots (I am developing on a local website).
cmc
- more than a month ago
- Form2Content Lite & Pro
- # 8
Accepted Answer
Pending Moderation
But also Roma user see all article on "its" Roma content type... It seems that published articles are hidden only if a user list its own articles.
cmc
cmc
Attachments (1)
- more than a month ago
- Form2Content Lite & Pro
- # 9
Accepted Answer
Pending Moderation
Hi,
It's hard to say why this behaviour occurs. Could you please send me an Akeeba back-up so that I can see this myself?
Please include credentials for the Lazio account.
You can send the back-up to julien at opensourcedesign dot nl
best,
Julien
It's hard to say why this behaviour occurs. Could you please send me an Akeeba back-up so that I can see this myself?
Please include credentials for the Lazio account.
You can send the back-up to julien at opensourcedesign dot nl
best,
Julien
- more than a month ago
- Form2Content Lite & Pro
- # 10
- Page :
- 1
There are no replies made for this post yet.
However, you are not allowed to reply to this post.
However, you are not allowed to reply to this post.
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »