[Pmwiki-users] own special markups are causing <pre > statements in the html output

Marcus Brauer imb-its
Thu Apr 29 06:27:07 CDT 2004


Hi all, Peter

PH> I build a page which is using the x-include special markup which creates
PH> an iframe statement.
PH> In the html output I noticed <pre> statements which are caused by the
PH> markup.
PH> How can I control it ?

PH> PmWiki Page Source:
PH> !Systemauslastung (top)
PH> [[{{Top}} Reload]]
PH> [[x-include: http://www.pjsc.local/asp/top.asp  scroll=no width=100%
PH> height=500]]

PH> HTML output:

PH> <a class='wikilink'
PH> href='http://www.pjsc.local/wiki/pmwiki.php/System/Top'>Reload</a>
PH> <pre >

PH> <!-- X-include -->
PH> <iframe width=100% height=500 align=default frameborder=default
PH> scroll=no src=http://www.pjsc.local/asp/top.asp></iframe>
PH> <!--/ X-include -->

PH> </pre>

PH> Any ideas how to controll it? This is really disturbing as I tried to
PH> build my own special markups, but the html code is not recognized 
PH> because of the preformatted text controlls.

PH> Regards  Peter Heuchert


To include HTML without additional markup try to add this inside your
local/config.php instead:

$InlineReplacements["/[#htmlinc:(.*?)#]/e"] = "implode('',file(\"$1\"))";

This line allows you this new WikiCommand

     [#htmlinc:<url-to-html-file>#]

And you won't get any unwanted <pre>s, also no frames, borders or what
ever. It's a simple include.

If you have a PHP version 4.3.0 or later you should use this instead:

$InlineReplacements["/[#htmlinc:(.*?)#]/e"] = "file_get_contents(\"$1\")";

--
Marcus Brauer




More information about the pmwiki-users mailing list