Nullified Posted September 19, 2012 Share Posted September 19, 2012 I have placed the {if $googleplus1}{if $twittertweet}{if $facebookcomments}{if $facebookrecommend} statements within the knowledgebaseartcile.tpl so I can show the social media share links on knowegebase article as well, but the checks to see if they are enabled are not coded into knowledgebase.php as they are announcements.php. I am wondering if someone can provide me with the same sql query / php code that will allow the if statements to do their job. Or at least the sql table that contains this info. 0 Quote Link to comment Share on other sites More sharing options...
Nullified Posted September 19, 2012 Author Share Posted September 19, 2012 I found the table and developed the sql: $results = mysql_query("SELECT setting, value FROM tblconfiguration WHERE setting IN ('AnnouncementsTweet', 'AnnouncementsFBRecommend', 'AnnouncementsFBComments', 'GooglePlus1')"); while ($result = mysql_fetch_assoc($results)) {if ($result['value'] == "on") {$social[$result[setting]] = true;}} if ($social['GooglePlus1']) {$this->_tpl_vars['googleplus1'] = true;} if ($social['AnnouncementsTweet']) {$this->_tpl_vars['twittertweet'] = true;} if ($social['AnnouncementsFBComments']) {$this->_tpl_vars['facebookcomments'] = true;} if ($social['AnnouncementsFBRecommend']) {$this->_tpl_vars['facebookrecommend'] = true;} 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.