Page 1 of 1

embedding or including

Posted: Wed May 25, 2005 9:16 pm
by TNTH
Hi there,

I'm having the following problem:

I'm trying to get the following code into my template:

Code: Select all

<?php
include_once "/var/www/html/poll/booth.php";
echo $php_poll->poll_process(4);
?></p>
      <p align="center"><img src="images/hr.gif" width="33" height="13"></p>
      <p align="center"><img src="images/shout.gif" alt="Shoutbox" width="125" height="19" hspace="0" vspace="0" border="0">
      <?php
		include "/var/www/html/shout/net_tag.php";
		?></p>
When I put this between {literal}-tags I see my pictures, but nothing else (in preview).

I tried to embed it with the embedplugin like this:

Code: Select all

{embed url=talk.php header=true}
But that doesn't work either. Does somebody know how to include/embed the php into the template?

Re: embedding or including

Posted: Thu May 26, 2005 2:45 am
by Ted
Make a user defined tag/plugin.  Take the <?php from the front and put it at the end.  Save it as something (example: testplugin).  Then put the {testplugin} in your template.  Should work fine.

Re: embedding or including

Posted: Thu May 26, 2005 11:40 am
by TNTH
Tried it, and it solved it partly.

The poll still gives problems, but i'll try to fiend another one. [edit]Found another one. Topic ends here (i guess :))[/edit]

Thanks again wishy! :-)