1
Hi all
I has a little problem regarding passing php vars to the smarty templates (adding google pagerank to webkinks module):
I need to include a php file in the template and pass him a ver, so I tried the folowing:
<{php}>
include "pagerank1.php"
uri="<{$link.url}>"
<{/php}>
in the template file, but it's giving a blank page ....
so it's definatly not the way to pass the $uri
<{php}>
include "pagerank1.php?uri=<{$link.url}>"
<{/php}>
is not working either ....
I now use the folowing code instead ..... (calling the php file via iframe which works well - but is a louzy way to do it when you think of the end code))
this one on the template file
<iframe frameborder="0" hspace="0" vspace="0" height="16" scrolling="No" style="vertical-align: top; vertical-align: baseline;margin:0px;padding:0px;border:0px;height:16px; width:66px;" src="pagerank1.php?uri=<{$link.url}>&uri=<{$link.url}>">iframe>
and this one in the php file
if (isset($_REQUEST['uri'])) $url=trim($_REQUEST['uri']); else $uri="http://www.domain.com";
echo "line-height: 10px;font-weight: bold; font-size: 13px;">page rank: ".get_page_rank($url). "";
Help is definately needed here ...