1
trspice
Trying to use a smarty tag in an IFrame - need help
  • 2007/12/20 8:11

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


I have a popup window with a video screen and want to place banner ads on the page using the RW_banner module. The popup is a simple module and is recognized with a smarty switch at the top of theme.html. This allows a different design to show for the popup.
Quote:

<{if $xoops_dirname == "videos"}>
<{include file="default/videos.html"}>
<{else}>
Show the default theme layout coding
<{/if}>


The videos.html file only has the center block and $xoops_contents and is formatted like this
Quote:

<{foreach item=block from=$xoops_ccblocks}>
<{include file="default/center.html"}>
<{/foreach}>


<{$xoops_contents}>


This is the module
Quote:

include("../../mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 1;
?>


include(XOOPS_ROOT_PATH."/footer.php");

?>


I want the adbanners to change at 60 sec intervals so I decided on IFrame which would refresh itself using the Meta refresh. I created the file with the banner like this; videoads.php

Quote:

include("../../mainfile.php");
include("include/functions.php");

echo "";
echo "";
echo "";
echo "";
echo "";
echo "";

echo "<{$adverts}>"; //this is the rw_banner tag

echo "";
echo "";

?>


Everything works fine except the banner smarty tag. I have tried many ways without success. Can anyone suggest the proper way to call the smarty tag
There's nothing but science....
The Reggae Album

2
Quest
Re: Trying to use a smarty tag in an IFrame - need help
  • 2007/12/20 11:54

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


Try

echo $adverts //without the <{ and }>

Quest

3
trspice
Re: Trying to use a smarty tag in an IFrame - need help
  • 2007/12/20 16:52

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


Thanks for the suggestion Quest. I did try that but the page returns empty. Here are the methods and results I tried;
Quote:

echo "<{$adverts}>"; //returns <>
echo '<{$adverts}>'; //returns <{$adverts}>
echo "$adverts"; //returns empty page
echo $adverts; //returns empty page


Does the file need a smarty interpreter? I figured functions.php had the interpreter.
There's nothing but science....
The Reggae Album

4
Will_H
Re: Trying to use a smarty tag in an IFrame - need help
  • 2007/12/20 17:30

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


So you created a custom module? Did you hook the modules?

5
Quest
Re: Trying to use a smarty tag in an IFrame - need help
  • 2007/12/20 17:55

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


I'm not so sure you need the semi-colon after the $adverts

echo=$adverts

assuming of course you have defined $adverts (where it is)

as far as I know smarty is located in xoops/class/smarty , not sure if that will help you or not. Have a look at it and see...

Best of luck,
Quest

6
wizanda
Re: Trying to use a smarty tag in an IFrame - need help
  • 2007/12/20 19:27

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Smarty renders the templates of XOOPS and so to use Smarty variables, it needs to be in the template…
The variables can be assigned to Smarty in the PHP and also in the template if needed....

Login

Who's Online

401 user(s) are online (273 user(s) are browsing Support Forums)


Members: 0


Guests: 401


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits