PDA

View Full Version : [phpnuke fix] Include other PHP files in Blocks


BramT
11 Oct 2001, 16:12
if you want to inlcude php files in your blocks with phpnuke (to display the last 10 posts in a block for example) go here (http://vbulletin.com/forum/showthread.php?s=&threadid=30113)

I've explained why it doesn't work and provided a fix....

BramT
11 Oct 2001, 22:34
if you still need help, post here or in the thread linked above... (i'll be notified and i'll respond asap. This is the least i can do for u great ppl!! :D)

good luck and nuke 'm! ;)

ps. a "thank you" is really appreciated if i've solved your problem.. it would make me come back more often to help u out.... :p

fudgeman
02 Dec 2001, 17:07
Where can I find this page? It doesn't work for me. :(

Konqueror
15 Dec 2001, 22:19
It's here: http://www.vbulletin.org/forum/showthread.php?s=&threadid=30113

SteveUrkelREAL
03 Jan 2002, 11:51
Hi all,

that my themesidebox


/************************************************************/
/* Function themesidebox() */
/* */
/* Control look of your blocks. Just simple. */
/************************************************************/

function themesidebox($title, $content){
$tmpl_file = "themes/NukeNews/blocks.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}


and thats the html-File for the Block:


<table width="180" cellpadding="0" cellspacing="1" border="0">
<tr>
<td bgcolor="#ff7f00">
<table width="100%" border="0" cellpadding="3" cellspacing="1">
<tr>
<td bgcolor="#ff7f00"><b><font color="#000000">$title</font></b></td>
</tr>
<tr>
<td bgcolor="#040437">$content</td>
</tr>
</table>
</td>
</tr>
</table>
<br>


where must i do these changes??

if (substr($content,0,2) != "<?") echo $content;
else {
$content = str_replace ("<?", "", $content);
eval($content);}


Can anyone help me???

Thanks

Steve

Anatolia
03 Jan 2002, 15:26
thanks all in needed that fix..