Page 1 of 1

Bookmarks & Categories

Posted: Fri Jun 03, 2005 12:39 pm
by nils73
I am using 0.10beta2 and Bookmarks 1.3.1 and I am using multiple categories. However, when I have category A and category B and I insert {cms_module module="bookmarks" category="A"} I geht the results from B as well. Has anybody else encountered the same problem? Is there a workaround?

Regards,
Nils

Re: Bookmarks & Categories

Posted: Fri Jun 03, 2005 2:10 pm
by nils73
Seems I always answer my own posts. Solved it. Search the code for if (isset($parameters['addform]))

and replace the whole routine from { to } with this code:

Code: Select all


    if(isset($parameters['addform']))
		{
      $this->DisplayAddBookmarkForm($id, $parameters, $returnid);
			return;
		}
		if(isset($parameters['category']))
		{
			$category = $parameters['category'];
		}

Should work now, i.e. it works here so it should do the trick everywhere.

Regards,
Nils

Re: Bookmarks & Categories

Posted: Fri Jun 03, 2005 4:52 pm
by nils73
Ouch ... yet another bug in Bookmarks. I can not give the exact line, cause I have modified too much, but where

if (in_array($cat_id, $bookmark['categories']))
$checked = 'checked';


it should be

if (in_array($cat_id, $bookmark['categories']))
$checked = $cat_id;


because otherwise (in Admin-Mode) all entries will be checked and not only those that have been selected. A good way for all of you who would like to have the add_bookmark page separated from the original content, just create a new page and then add

{cms_module module="bookmarks" category="2" addform="true"}

where the category should be the category_id ... which does not show up in Admin-Mode. Anyway: now all you have to do, is to create a static-link to this page from the bookmarks / category page. Nice and clean.

Regards,
Nils