MyBB Community Forums

Full Version: Replacing the [code] and [php]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi there,

I'm working on a geshi integration in replacement of [code] and [php] buttons, it works pretty well as you can see at http://www.c-p-f.org/forum/MyBB-MOD-GeSHi-t-51.html

But my trouble is that I want to replace the two buttons by a drop-down list managed via admin CP.

The way I want doing it working:
Admin of the plugin: having the possibility to enable/disable codes. The list is done by reading the directory wich contains the template files.
So, I need to generate the javascript on-the-fly... peharps with creating another .js file (included by header_include).

BTW, is there a way to have the plugin modifying the originals .js? I don't want to modify by the hand the files, I really want to have an automation of it.

Thanx to anyone can help me.