about bookmarks [solved]
Posted: Tue Jan 09, 2007 3:49 pm
hi
i want just to share with others some things which i solved
i saw some threads with the bookmarks title problems...
and i saw no solutions
so i dig a little bit in code
and i found an answer:
in lib/misc.functions.php
we have this
if(isset($parameters[$value]))
{
$return_value = (boolean) $parameters[$value];
}
the problem was that if we send something like this
{cms_module module='bookmarks' show_category_with_title="false" columns='2' category='bottom_links'}
so that we dont want to display the title
the result is that the title is displayed
why
because $parameters[$value] = "false" and the (boolean) cast thinks that is a non empty string
so that the result is 1 = true not false
solution
instead of false string use empty string "" - in this way it goes right
{cms_module module='bookmarks' show_category_with_title="" columns='2' category='bottom_links'}
thats all folks
i want just to share with others some things which i solved
i saw some threads with the bookmarks title problems...
and i saw no solutions
so i dig a little bit in code
and i found an answer:
in lib/misc.functions.php
we have this
if(isset($parameters[$value]))
{
$return_value = (boolean) $parameters[$value];
}
the problem was that if we send something like this
{cms_module module='bookmarks' show_category_with_title="false" columns='2' category='bottom_links'}
so that we dont want to display the title
the result is that the title is displayed
why
because $parameters[$value] = "false" and the (boolean) cast thinks that is a non empty string
so that the result is 1 = true not false
solution
instead of false string use empty string "" - in this way it goes right
{cms_module module='bookmarks' show_category_with_title="" columns='2' category='bottom_links'}
thats all folks