PDA

View Full Version : Simple problem with including php.


chris_
09-10-2004, 02:41 PM
I want one of my modules to display this dynamic content: http://www.therocket.org/bandsontv.php


<span "small font"><table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="1" class="tborder" width="100%">
<tr>
<td colspan="2" class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] This week: On Your TV </strong></span></td>
</tr>

<?php include 'vars.php'; ?>

<br /></span>

<!-- End TV Block -->

But I've found that this method doesn't work, is there another way to make this possible?

Thanks in advance for any insight.

Zachery
09-10-2004, 02:54 PM
You cannot put php in templates.

Our Sponsors
 

chris_
09-10-2004, 09:48 PM
how can I get something like this to work?? i know there has to be a way... how can I grab those variables from a PHP file included in the module?

Brian
09-11-2004, 07:45 PM
You would need to add the PHP in a module and then output the variables through the templates.

Our Sponsors
 

TCooper
09-13-2004, 06:45 PM
You would need to add the PHP in a module and then output the variables through the templates.
How do you do that? I have a file that sets the variable $picyes to what it needs to be an all i need it to do is echo the value wether it be html code or just plain text. How do i call for that variable with the templates then?

fuse3k
10-06-2004, 09:14 PM
How do you do that? I have a file that sets the variable $picyes to what it needs to be an all i need it to do is echo the value wether it be html code or just plain text. How do i call for that variable with the templates then?

I would love to know this myself.

Brian
10-07-2004, 09:55 AM
You would need to add that file as a module (there are instructions on how to do this in the User's Guide available in the Member's Area here). Then you would just add that variable in the template you create for that module.