Page 1 of 1
Automatic backlinks code
Posted: Tue Mar 19, 2013 9:40 am
by lib3rty1
Hello,
I am having small problem with puting code from
www.automaticbacklinks.com on s9y. I wanted to place that code into fotter. As I have read content.tpl is main file but can`t really find it.
How should or where I shloud place that code ?
Here is the php code:
Re: Automatic backlinks code
Posted: Tue Mar 19, 2013 10:18 am
by Timbalu
Into the footer of what?
Using the content.tpl is not advised as it is smarty code.
What you need is to copy and paste this code into your php document where you want your links to display. This is commonly the config.inc.php file of your template.
The easiest way (as a hint on how to do in general) could be:
Code: Select all
ob_start();
include '/full/path/to/backlinkscode.php';
$bl_content = ob_get_contents();
ob_end_clean();
$serendipity['smarty']->assign('block_backlinks', $bl_content);
which then could be placed into your index.tpl file as {$block_backlinks}.
Or you may also could use the Plugin serendipity_event_externalphp.
Re: Automatic backlinks code
Posted: Tue Mar 19, 2013 11:17 am
by lib3rty1
Into the footer of website. I mean the template I am using now. Just to place it in safe place.
Will try for first with plugin and then I if these won`t work I will try with your code as I don`t want to mess anything up.
How Can I check if I have set this up good ?