Bookmarks Module 2.0.1 Parameters not working

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
mnapiork
Forum Members
Forum Members
Posts: 36
Joined: Tue Nov 28, 2006 6:33 pm

Bookmarks Module 2.0.1 Parameters not working

Post by mnapiork »

I've installed the Bookmarks module 2.0.1 and I'm trying to 'order_by_date' and it doesn't seem to be working.  If I set it to true or false the order is the same.  I want the bookmarks to be ordered by the newest first.  Does anyone have a solution to fixing this bug?

Thanks in advance!

???
mnapiork
Forum Members
Forum Members
Posts: 36
Joined: Tue Nov 28, 2006 6:33 pm

Re: Bookmarks Module 2.0.1 Parameters not working

Post by mnapiork »

I found a solution:

In Bookmarks.module.php you'll notice that after the bookmark_modified_date there is no ASC or DESC to order the results.  If you add DESC after the order by '$bookmarks_table_name.bookmark_modified_date' it will order your bookmarks by the newest first.

Original Code:

Code: Select all

if($order_by_date)
{
	$sql .= "ORDER BY $bookmarks_table_name.bookmark_modified_date";
}
else
{
	$sql .= "ORDER BY $categories_table_name.category_order
		    ,$categories_table_name.category_name
		    ,$bookmarks_table_name.bookmark_title ";
}
Modified Code:

Code: Select all

if($order_by_date)
{
	$sql .= "ORDER BY $bookmarks_table_name.bookmark_modified_date DESC";
}
else
{
	$sql .= "ORDER BY $categories_table_name.category_order
		    ,$categories_table_name.category_name
		    ,$bookmarks_table_name.bookmark_title ";
}
Post Reply

Return to “CMSMS Core”