Bookmarks & Categories

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
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Bookmarks & Categories

Post 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
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: Bookmarks & Categories

Post 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
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: Bookmarks & Categories

Post 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
Post Reply

Return to “CMSMS Core”