04-01-2011, 03:47 AM
(03-31-2011 05:10 PM)Lokki Wrote: [ -> ]this is the php code for may page
this page it's not located in the root directory of mybb it is located in
another directory
Code:
<?php chdir('../'); define('IN_MYBB', 1); require "./global.php"; add_breadcrumb("Anunturi", "index.php"); eval("\$anuntindex = \"".$templates->get("anuntindex")."\";"); output_page($anuntindex); ?>
Probably you need to call build_mycode_inserter() in it?
Something like this:
PHP Code:
|
(03-31-2011 05:10 PM)Lokki Wrote: [ -> ]and this is the template code of the page where I try to include mybb editor
Code:
<html> <head> <script type="text/javascript" src="jscripts/post.js?ver=1400"></script> <title>{$mybb->settings[bbname]}</title> {$headerinclude} </head> <body> {$header} <br /> <table width="100%" border="0"> <thead> <tr> <th>Categorii</th> </tr> <tbody> <?php include"anunturi/categorii.php";?> <textarea id="message" name="message" rows="20" cols="70" tabindex="2" >{$message}</textarea> {$codebuttons} </tbody> </table> {$footer} </body> </html>
And use a 'fix' URL in the javascript using {$mybb->settings['bburl']}, something like this:
HTML Code
|
Then, edit codebuttons template:
Find:
HTML Code
|
Replace it with:
HTML Code
|