Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
Welcome, Guest
Please Login or Register.    Lost Password?
FireBoard Manual Latest release discussions Download FireBoard Spread FireBoard!
Go to bottom Favoured: 2
TOPIC: Favoured: 0
#20522
Favoured: 0 1 Year, 1 Month ago  
I was trying out v1.0.3 and clicked add favorite. Worked fine. Then delete favorite - worked fine but then it kept coming up with Favoured:0

Didn't want that so I edited template/default/view.php line 379 Begin totalfavorite
ORIGINAL
[code:1]

setQuery("SELECT COUNT(*) FROM #__fb_favorites where thread='$thread'"«»);
$fb_totalfavorited = $database->loadResult();
echo '';
echo _FB_TOTALFAVORITE;
echo $fb_totalfavorited;
echo '';
?>

[/code:1]
NEW -- added if count is less than 0 - don't show

[code:1]

setQuery("SELECT COUNT(*) FROM #__fb_favorites where thread='$thread'"«»);
$fb_totalfavorited = $database->loadResult();
if ($total != 0) { // My Hack so only show if count is greater than 0
echo '';
echo _FB_TOTALFAVORITE;
echo $fb_totalfavorited;
echo '';
} // end of IF statement of My Hack
?>

[/code:1]
bouton (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
Go to top