I want to show the archived articles ordered by date (a f2c field). Is this possible? You do not seem to be able to choose the state of the articles when creating a search form or filtered list.
Thanks
Rob
Joomla 3.4.3
F2C 6.11.0
F2C search 6.5.0
Form2Content Forum
Questions and answers for Form2Content, a Joomla CCK.
Resolved
Show archived articles
- Feature request
- Futuron
- F2C Front-end / menu settings
- Sunday, 16 August 2015
- Subscribe via email
Accepted Answer
Accepted Answer
Pending Moderation
Hi Rob,
I'm not sure if this will come in a new release, because it's a rather difficult one.
Next to the state (published), the query also uses a publish_up and publish_down dates that are valid at the moment of the search.
The code to hack is in the file components/com_form2contentsearch/class.form2contentsearch.php on line 84.
There's this block:
// Only select published articles
$query->join('INNER', '#__content c ON f.reference_id = c.id');
$query->where('c.state = 1');
$query->where('(c.publish_up < \''.$currentDate->toSql().'\' OR c.publish_up = \''.$nullDate.'\')');
$query->where('(\''.$currentDate->toSql().'\' < c.publish_down OR c.publish_down = \''.$nullDate.'\')');
You can strip out the c.state=1 statement, but possibly you want to remove the publish_up and publish_down conditions as well?
Hope this helps.
best,
Julien
I'm not sure if this will come in a new release, because it's a rather difficult one.
Next to the state (published), the query also uses a publish_up and publish_down dates that are valid at the moment of the search.
The code to hack is in the file components/com_form2contentsearch/class.form2contentsearch.php on line 84.
There's this block:
// Only select published articles
$query->join('INNER', '#__content c ON f.reference_id = c.id');
$query->where('c.state = 1');
$query->where('(c.publish_up < \''.$currentDate->toSql().'\' OR c.publish_up = \''.$nullDate.'\')');
$query->where('(\''.$currentDate->toSql().'\' < c.publish_down OR c.publish_down = \''.$nullDate.'\')');
You can strip out the c.state=1 statement, but possibly you want to remove the publish_up and publish_down conditions as well?
Hope this helps.
best,
Julien
- more than a month ago
- F2C Front-end / menu settings
- # Permalink
Accepted Answer
Pending Moderation
I am sorry Julien, but I have a hard time understanding your explanation. I believe you are telling me it is not possible right!? But you will consider adding it in a next release. Is that correct?
For now I can only do this kind of search by hacking? If so I would love to hear where to do this.
You're talking about a regular search scenario. There is a reason for the archive in Joomla. A major reason is the possibility to show archived articles on the front. F2C does not support this option, well at least not via the search component. Would be a great extension of the component.
Rob
For now I can only do this kind of search by hacking? If so I would love to hear where to do this.
You're talking about a regular search scenario. There is a reason for the archive in Joomla. A major reason is the possibility to show archived articles on the front. F2C does not support this option, well at least not via the search component. Would be a great extension of the component.
Rob
- more than a month ago
- F2C Front-end / menu settings
- # 1
Accepted Answer
Pending Moderation
Hi Rob,
The Search Module has been rewritten so it can be extended using pluggable fields.
In theory, it should be possible to write such a field that filters on the state of the articles.
In this case however it affects the state of the articles, which is now hard set to "published".
In a regular search scenario, you would always be interested in published articles.
When a new search field should be build, I have to adjust the core functionality for that and that will take some time.
The alternative is that I show you where the search query is executed and you can create a hack yourself for the meantime?
best,
Julien
The Search Module has been rewritten so it can be extended using pluggable fields.
In theory, it should be possible to write such a field that filters on the state of the articles.
In this case however it affects the state of the articles, which is now hard set to "published".
In a regular search scenario, you would always be interested in published articles.
When a new search field should be build, I have to adjust the core functionality for that and that will take some time.
The alternative is that I show you where the search query is executed and you can create a hack yourself for the meantime?
best,
Julien
- more than a month ago
- F2C Front-end / menu settings
- # 2
Accepted Answer
Pending Moderation
Hi Patrick,
Is this something I can wait for or will this be something for a later release? It is a feature I want to ad to 2 websites.
Again thanks!
Rob
Is this something I can wait for or will this be something for a later release? It is a feature I want to ad to 2 websites.
Again thanks!
Rob
- more than a month ago
- F2C Front-end / menu settings
- # 3
Accepted Answer
Pending Moderation
Just wondering: Any news on this item?
Regards,
Rob
Regards,
Rob
- more than a month ago
- F2C Front-end / menu settings
- # 4
Accepted Answer
Pending Moderation
Hi Rob,
Interesting one
I will ask Julien when he's back from holiday to see if he can add this to F2C Search. State filter in the front-end was never really an option except indeed if you want to display archived articles.
Regards,
Patrick
Interesting one
I will ask Julien when he's back from holiday to see if he can add this to F2C Search. State filter in the front-end was never really an option except indeed if you want to display archived articles.
Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so
- more than a month ago
- F2C Front-end / menu settings
- # 5
- 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 »