PHP includes and Block theming
hazexp - February 1, 2008 - 01:48
Hello all.
I have a little issue that I'm unsure why it's not working.
I wished to theme a block in order to contain the latest forum posts from my PunBB forum.
For some reason, this code in block-block-7.tpl.php (the block I want themed) will not work:
<div class="<?php print "block block-$block->module" ?>" id="<?php print "block-$block->module-$block->
delta"; ?>">
<?php print $block->subject ?>
<div class="content"><?php print $block->content ?>
<?php include 'http://BASE_DOMAIN/forums/extern.php?action=active&show=5&fid=5'; ?>
</div>
</div>The key part is the PHP include statement, for some reason it won't render the forum topics which it should, despite the fact that I can browse to it using my browser perfectly fine.
Any assistance would be greatly appreciated.
P.S. I am a bit of a theming noob, but I guess everyone starts somewhere, right?

Oh, something that may be
Oh, something that may be useful to know is that I am using Paranoia module, which may be restricting me.
Trying to raw include that
Trying to raw include that URL is a bit ambitious.
It'll be clever on a perfect setup, but there's many ponts of failure.
At first glance
- do you have url_fopen enabled? (see phpinfo)
Does your forum require login?
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
The forum doesn't require
The forum doesn't require login, however, I did take a look at phpinfo().
I think the problem may lie in this:
allow_url_include Off Off
However, allow_url_fopen is On On, which I think may provide a workaround, thanks for pointing me in the right direction.