Topic: Facebook like button
So I've googled and looked for codes to integrate Facebook like button into cutenews, there's really no way yet until now.
You literally have to put his on the php file that cutenews is integrated into. It took me a while to figure out how to do this, but I think it actually works.
Don't put it in Deafult.tpl because it won't work. You rather put it in your header file of your php file.
<div class="fb-like" data-href="http://<? echo $_SERVER['SERVER_NAME']; ?><? echo $_SERVER['REQUEST_URI']; ?>" data-send="false" data-layout="button_count" data-width="120" data-show-faces="true"></div>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=APP_ID_HERE";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Using the default facebook like options, the change is only the URL, sometimes when you try to embed Facebook like button onto the Default.tpl, it'll only go to the http://yoursite.com/news.php?subaction=showfull. So to do this, we use the default like option and put in
<? echo $_SERVER['SERVER_NAME']; ?><? echo $_SERVER['REQUEST_URI']; ?>
.
<? echo $_SERVER['SERVER_NAME']; ?>
for the website URL and
<? echo $_SERVER['REQUEST_URI']; ?>
for if you have the php file like http://yoursite.com/news?subaction=showfull instead and also, it's a better way than
<? echo $_SERVER['PHP_SELF']; ?>
.
NOTE: Don't use these PHP codes on Default.tpl for tpl files cannot read PHP functions.