Posted on: 05/27/06 02:46am
By: Anonymous (Smokey)
Hi,
I made a phpblock, used the phpblock_prefix and updated the lib-custom.php No problem here, all works fine (on the left)
When changing the block to the right only the tittle is showing.
Can someone tell me what I am missing, or doing wrong?
Thanks in advance,
Smokey
right phpblock
Posted on: 05/30/06 11:08am
By: Anonymous (Smokey)
This is the code i'm talking about.
function phpblock_spons()
{
$retval .= "<?php include 'http://www.mydomain.nl/mypage.php'; ?> ";
return $retval;
}
It works when the block is on the left side but it doesn't work when i change the block to the right.
Cheers,
Smokey
right phpblock
Posted on: 05/30/06 01:01pm
By: machinari
by design the left blocks will parse the php that you've inserted into it because they are loaded from within the header.thtml, which will have its php parsed whereas no other thtml files will. So any php in the right blocks, which are typically loaded from the footer will not be parsed.
you might as well have used a normal block on the left and put your php in the content area--that's basically what you did by returning the php open and close thingies. Try this function instead:
function phpblock_spons()
{
include 'http://www.mydomain.nl/mypage.php';
}
right phpblock
Posted on: 05/30/06 02:44pm
By: Dirk
[QUOTE BY= machinari] by design the left blocks will parse the php that you've inserted into it because they are loaded from within the header.thtml, which will have its php parsed whereas no other thtml files will.[/QUOTE]
This was actually never intended and fixed in 1.4.0. So with 1.4.0, the above would have consistently not worked on both sides
bye, Dirk
right phpblock
Posted on: 06/01/06 04:43pm
By: Anonymous (Smokey)
Thanks for your help but changing te function you suggested doesn't include the page in a block, but at the top of the page.
If you have any other suggestions i will be glad to try them.
Thanks again,
Smokey
right phpblock
Posted on: 06/01/06 04:56pm
By: Dirk
PHP blocks have to return the content they want displayed to Geeklog. So you have to read the output of that included file into a variable and return it at the end of the function.
bye, Dirk
right phpblock
Posted on: 06/15/06 02:11pm
By: Anonymous (zephyrius)
Even if i return the data at the end of the php function, it is still not displayed if it's a "right block." It works fine as a left block. I am using 1.4.0sr3.
Is there a way to get the returned HTML from that function to display in a right block?
Thanks,
Zephyrius