Hi All,
I read something about displaying adsense as sponsored links on the web page. This site: http://www.phplinkdirectory.com/forum/showthread.php?t=419
did it with what I believe is smarty framework. Does anyone know if this is possible with CI?
I have also seen sites that attach thumbnails with ads under sponsored links which comes as part of search results and I would like to do the same. Is there a limitation on what I can do with CI. Can someone help if I am mixing things up.
Thanks,
OJ
Create a partial view in your view folder
_google_120x600.php
< script type="text/javascript" >
<!--
google_ad_client = "pub-0332427512321583";
/* Johns-Jokes */
google_ad_slot = "4222954696";
google_ad_width = 120;
google_ad_height = 600;
//-->
< /script >
[removed]
[removed]
in your controller call it:
...
...
$data['google'] = $this->load->view('_google_120x60', '', TRUE);
$data['header'] = $this->load->view('_header', $data, TRUE);
$data['footer'] = $this->load->view('_footer', '', TRUE);
$data['search'] = $this->load->view('_search', $data, TRUE);
$data['title'] = $this->load->view('_title', $data, TRUE);
$data['left'] = $this->load->view('_left', $data, TRUE);
$data['right'] = $this->load->view('_right', $data, TRUE);
$data['body'] = $this->load->view('_body', $data, TRUE);
$result = $this->load->view('_joke', $data, TRUE);
echo $result;
In you view use it like this:
<html>
<head>
<title><?= $title ?></title>
<head>
<body>
...
...
...
<?= $google ?>
...
...
</body>
</html>