1

Topic: Problem with <pun include> and header.inc from Nucleus

I try to update all my site with the nucleus design > http://www.sortons.net/nucleus/

First thing, use some includes to take some design from Nucleus to put them inside Pun and after ... Coppermine.

So I try


<pun include="http://www.sortons.net/nucleus/skins/default/header.inc">


I have "this" as error

Warning: main(./http://www.sortons.net/nucleus/skins/default/header.inc): failed to open stream: No such file or directory in /home/rbn/www/forum/footer.php on line 146

I see this "          ./            " in the code ... I have of course read http://punbb.org/docs/faq.html#faq3_4 but no answer for me ... help would be appreciated smile

Re: Problem with <pun include> and header.inc from Nucleus

remove the PUN_ROOT from footer.php, but i think its changed in 1.2.6, anyway you realise when you include files with the http:// it includes them as the file output to the browser, not the php code in the file?

3

Re: Problem with <pun include> and header.inc from Nucleus

Don't understand sence of your sentence smile I'M FRENCH and sometimes ... some things are weird to understand, for me smile

I'm on 1.2 actually ...

4

Re: Problem with <pun include> and header.inc from Nucleus

Ok ... remove code as you told me ... but new problem

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Sortons.Net [ Forum ] / Ciné > Soirées Thématiques</title>
<link rel="stylesheet" type="text/css" href="style/Sulfur.css" />
</head>
<body>

<div id="mainwrapper">
<div id="wrapper">

<pun include="http://www.sortons.net/nucleus/skins/default/header.inc">

the <pun include="url"> is not replaced ... the code appears directly in the HTML source ... and not the HEADER sad

5

Re: Problem with <pun include> and header.inc from Nucleus

Updated to 1.2.6 ... and same problem

<pun include="http://www.sortons.net/nucleus/skins/default/header.inc">

Not included, but appears "like that" in the Source Code ... (I let you can show)
http://www.sortons.net/forum

6

Re: Problem with <pun include> and header.inc from Nucleus

No answer ? No help ?

Ouiiiiiiiiiiiiiiiiiiiinnnnnnnnnnnnnnn ... (baby cries)

Re: Problem with <pun include> and header.inc from Nucleus

Read the manual... you can't include files that are not in the correct folder without editing footer.php

8

Re: Problem with <pun include> and header.inc from Nucleus

I don't see the interest to "include" a "common file" on a whole integration if I have to copy/paste the include file in a GOOD folder !!! I want to use the SAME HEADER on Coppermine / Nucleus / my site / PunBB ... I don't see the interest to have 4 times the SAME header in 4 folders. How can I change "this" ??? Because the 1.2.6 footer has some differences and I don't see how to change sad

Re: Problem with <pun include> and header.inc from Nucleus

find

// START SUBST - <pun_include "*">
while (preg_match('#<pun_include "([^/\\\\]*?)">#', $tpl_main, $cur_include))
{
    if (!file_exists(PUN_ROOT.'include/user/'.$cur_include[1]))
        error('Unable to process user include <pun_include "'.htmlspecialchars($cur_include[1]).'"> from template main.tpl. There is no such file in folder /include/user/');

    ob_start();
    include PUN_ROOT.'include/user/'.$cur_include[1];
    $tpl_temp = ob_get_contents();
    $tpl_main = str_replace($cur_include[0], $tpl_temp, $tpl_main);
    ob_end_clean();
}
// END SUBST - <pun_include "*">

replace with

// START SUBST - <pun_include "*">
while (preg_match('#<pun_include "([^/\\\\]*?)">#', $tpl_main, $cur_include))
{
    ob_start();
    include $cur_include[1];
    $tpl_temp = ob_get_contents();
    $tpl_main = str_replace($cur_include[0], $tpl_temp, $tpl_main);
    ob_end_clean();
}
// END SUBST - <pun_include "*">

10

Re: Problem with <pun include> and header.inc from Nucleus

Thanx for your effort : but it doesn't work : nothing is parsed, and the code appears directly in the forum. Bug ?!

Re: Problem with <pun include> and header.inc from Nucleus

// START SUBST - <pun_include "*">
while (preg_match('#<pun_include "(.*?)">#', $tpl_main, $cur_include))
{
    ob_start();
    include $cur_include[1];
    $tpl_temp = ob_get_contents();
    $tpl_main = str_replace($cur_include[0], $tpl_temp, $tpl_main);
    ob_end_clean();
}
// END SUBST - <pun_include "*">

works

12

Re: Problem with <pun include> and header.inc from Nucleus

Works very well !!! Thanx Connorhd ! smile