View Single Post
  #1  
Old 12-03-2009, 10:52 AM
  pdstudio's Avatar 
pdstudio pdstudio is offline
 

Member
  
Join Date: Dec 2009
Location: Hungary / Sopron
Posts: 28
 

Exclamation Problems with php in sidebox

I want to make a new side box on the right with php content, but when I put the php code in the tpl its not working, I was looking for a solution and in the smarty manual I found that with the include_php it must be okay but no. I get always smarty errors.

I put in the home.tpl above the news:
Quote:
{include file="modules/idezetek.tpl"}

and in my idezetek.tpl:
Quote:
{capture name=menu}
<div id="guestwrote">
{include_php file='idezetek.php'}
<div>
{/capture}
{include file="customer/menu_dialog.tpl" title="RСlunk МrtАtok" content=$smarty.capture.menu}

in the idezetek.php:
Quote:
<?php
$idezetek ="idezetek.txt";
$myText = file("$idezetek");
$myTexts = rand(0, sizeof($myText)-1);
$myRandomText=$myText[$myTexts];
echo $myRandomText;
?>

the idezetek.tpl and the idezetek.php is in my skindirectory/modules.

Any idea why its not working?
__________________
X-Cart 4.4.4
http://matricamagnes.hu/
Reply With Quote