Keyword

Next & Previous link order is all scrambled?

  • Uzi
  • Uzi's Avatar Topic Author
  • Offline
  • Premium Member
More
7 years 4 months ago #163008 by Uzi
Thanks. Made it work. This is the code I used if anyone wants to have the same functionality.
$item = K2ModelItem::getData();
$publishup = $item->publish_up;

$query = "SELECT * FROM _k2_items WHERE id != {$id} AND catid={$catid} AND published=1 AND publish_up<($publishup} AND trash=0 ORDER BY publish_up DESC";


$query = "SELECT * FROM #__k2_items WHERE id != {$id} AND catid={$catid} AND published=1 AND publish_up>'{$publishup}' AND trash=0 AND publish_up <= ".$db->Quote($now)." ORDER BY publish_up ASC";

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 4 months ago #163012 by Krikor Boghossian
Replied by Krikor Boghossian on topic Next & Previous link order is all scrambled?
Remember, keep a backup ;)
If you can move this into a plugin it would ideal, other than that, it looks cool!

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