As described here
https://forum.joomla.org/viewtopic.php?f=706&t=792975&view=unread&sid=2b6cba37ad96ea871c97b87a0acae857#unread
would be great to have a simple change that allows Front-end Article Sorting by unpublish Date to be able to order articles so that the most recent event is displayed first and then is unpublished after the event has passed.
have accomplished it, but only by adding
<option value="unpublished">JUNPUBLISHED</option>
to the <field name="order_date" blog.xml and then adding
case 'unpublished' :
$queryDate = ' CASE WHEN a.publish_down = ' . $db->quote($db->getNullDate()) . ' THEN a.created ELSE a.publish_down END ';
break;
to the function getQueryDate($orderDate) in com_content>helpers>query.php
bit of a nasty hack though, is there a better way to do it, can you override helpers and the .xml?
Fair enough. But for the sake of 4 lines of code it may be useful to others and cease to be an edge case? I'd rather use Joomla core than load a plugin and with that small change it makes a very useful ordering.
I'm with epidote on this one. I've search for a plugin on the JED to sort a Category Blog Menu item with the unpublish date with no luck.
There's 4 dates in the publishing settings of an article. Why omit one in the sort settings...
Thanks.
Maybe it's no longer on the JED - sorry it's a long time since I had the
need for it.
Can I clarify if you are just talking about sorting on the field with no
extra functionality.
For me yes. I know you probably have a lot on your plate but we have around 10 sites that would benefit a lot from this.
Thanks again.
And would you want this in the admin sorting as well?
It would be useful but it's not a must.
as for marclight. admin sorting would be handy but not essential. The only thing I am suggesting it for is on a category blog menu, in the "date for ordering" (as attached).
BTW the ordering for the hack I describe at
https://forum.joomla.org/viewtopic.php?f=706&t=792975&view=unread&sid=
makes the "Article Order" seem wrong since to get the most recently unpublished the setting needs to be "Oldest First". But when you think about it in terms of the real purpose of the ordering it makes sense.
Thanks
For the admin see #11670
Yes it does seem wrong to me the setting for article order with the unpublished - not logical to me
Ok thanks for clarifying. I will write a pull request tomorrow for this but
then it will require testing AND approval
On 20 Oct 2016 10:59 p.m., "epidote" notifications@github.com wrote:
as for marclight. admin sorting would be handy but not essential. The only
thing I am suggesting it for is on a category blog menu, in the "date for
ordering" (as attached).
BTW the ordering for the hack I describe at
https://forum.joomla.org/viewtopic.php?f=706&t=792975&view=unread&sid=
makes the "Article Order" seem wrong since to get the most recently
unpublished the setting needs to be "Oldest First". But when you think
about it in terms of the real purpose of the ordering it makes sense.
Thanks
[image: untitled-1]
https://cloud.githubusercontent.com/assets/8977589/19579457/8ca237d0-976c-11e6-94e9-d250a4e8b62d.jpg—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#12483 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8eaPWevYX4LTxZD_Ez-uIyBlCA2kks5q1-Q7gaJpZM4KbeNd
.
Thanks a lot! I just remembered again why I love open source so much :)
Sorry for the delay. The security issue took my time.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-10-29 01:18:20 |
Closed_By | ⇒ | brianteeman |
There are plugins on the jed that will do this. No need for this edge case
to be in the core
On 19 Oct 2016 10:23 p.m., "epidote" notifications@github.com wrote: