Since there is this great forum here now and many don't have the time to visit our official forums regularly, I wanted to share a simple but great little MOD I added today for phplb.
This is a nice simple MOD that will set META descriptions for categories and links pages. It will add one small SQL query for category pages.
Category descriptions are used for category pages.
Link descriptions are used for link pages.
At the end of `/inc/footer.php` directly before the closing PHP tag ?>, add:
PHP Code:
/** START phpLinkBid META Descriptions MOD **/
if((!empty($this_view)) && ($this_view == 'cat'))
{
$sql = 'SELECT cat_description FROM ' . TBL_CATEGORIES . ' WHERE category_id = ' . $this_category;
if(($rs = $db->execute($sql)) && (!$rs->EOF))
{
$tpl->assign('meta_description', getSummary($rs->fields['cat_description'],250));
}
}
elseif((!empty($this_view)) && ($this_view == 'link'))
{
$tpl->assign('meta_description', '{link_description}');
}
/** END phpLinkBid META Descriptions MOD **/
That's it! Nice and simple. This will be included in a future version with improvements like ability to set META tags in admin.
Note: This MOD limits the META description to the first 250 characters of the category description. Modify the line that reads getSummary($rs->fields['cat_description'], 250)to increase/decrease this #.