CodeIgniter Forums
Best way to integrate - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Best way to integrate (/showthread.php?tid=14835)



Best way to integrate - El Forum - 01-16-2009

[eluser]Gewa[/eluser]
Hi, there is a service that needs to be integrated in my site to show links .
So here what they say I need to do.

define a global variable
Code:
define('LINKFEED_USER', '597a420cb42bbb3148b53cd2663609f1769b1891');
   require_once($_SERVER['DOCUMENT_ROOT'].'/'.LINKFEED_USER.'/linkfeed.php');
   global $linkfeed;
   $linkfeed = new LinkfeedClient();
then use this code to show links
Code:
global $linkfeed;
   echo $linkfeed->return_links(1);

What is the best way to make it?


Best way to integrate - El Forum - 01-16-2009

[eluser]meigwilym[/eluser]
Try...

Code:
$data['linkfeed'] = $linkfeed->return_links(1);

$this->load->view('myview', $data);

Mei