Loading...
 
Skip to main content

History: PluginCode

Preview of version: 4

Code can be used to display snippets of code in wiki pages.

{CODE()} <?php function foo($foo) { print($foo); }?> {CODE}

Will produce

insert graphic

You can edit the plugin and change it if you don t like the look and feel of the output.


-


Don't no why, but it seems the html special characters are processed twice.
I read the source code of this plug-in, and it seems nothing wierd. (wikiplugin_code() uses htmlspecialchars() to convert the input.) But I suspect that callers of plugin functions call htmlspecialchars() again.

I'm not php programmer, so I can't be sure. but after changing the wikiplugin_code.php like below, it works fine for me:

You should change

$code = htmlspecialchars($data);

to

$code = $data;

in wikiplugi_code.php

I'm using tikiwiki version 1.7.1.1. — cinsk

History

Information Version
Danny Staple 12
View
Danny Staple 11
View
Mose 10
View
cerion And... what about starting at a different line number? i.e. for publishing code snippets (exp. for tutorials) 9
View
Mose 8
View
cinsk.shin 7
View
cinsk.shin 6
View
cinsk.shin 5
View
cinsk.shin 4
View
DennisDaniels code is bugged ... use at your own risk 3
View
Marc Laporte 2
View