Page 1 of 1

I am new to php and kinda stuck

Posted: Thu Mar 26, 2009 11:11 pm
by jagdish22
Hello All, I am new to php and have no idea how to write the php code in tpl file. :banghead:

I am trying to customize my website - Basically, I am trying to display the News using RSS -

I am trying to use rssreader.php from http://apptools.com/phptools/xml/rss.php

and I have right.tpl file .. where i am trying to display the RSS news in 2nd box.


here is my right.tpl file --->
---------------------------------------------------------------------------------
<h2 class="boxcaption">Our Friends</h2>
<div class="box">
<ul>
<li><a href="http://www.smartxel.com" target="_blank">SmartXel</a></li>
</ul>
</div>
<p class="boxbottom"></p>



<h2 class="boxcaption">Relevant News</h2>
<div class="box">
<?php
require_once("rssreader.php");
$url="http://blogs.smartxel.com/feed/";
$rss=new rssFeed($url);
?>
</div>
<p class="boxbottom"></p>


<h2 class="boxcaption">Relevant sites</h2>
<div class="box">
{include file="google.tpl"}
</div>
<p class="boxbottom"></p>

---------------------------------------------------------------------------------
Can someone help to write the php code in tpl file - so that it can display the RSS news from given URL.

Thank you so much in advance - Jagdish

Re: I am new to php and kinda stuck

Posted: Thu Mar 26, 2009 11:52 pm
by sujithtomy
Hello,

Are you using Smarty Template Engine ?

Re: I am new to php and kinda stuck

Posted: Fri Mar 27, 2009 8:29 am
by jagdish22
yes, it is a Smarty Template Engine