|
Include your custom pages in Mybb
|
|
09-05-2006, 01:53 PM
(This post was last modified: 09-05-2006 01:54 PM by MiNT.)
Post: #31
|
|||
|
|||
|
Making this compatible with version 1.2
To make your pages compatible with version 1.2 you will have to make the following changes to the PHP file
first, this code should be at the top of the php file, on a new line, just after “<?php” Code: define("IN_MYBB", 1);the “addnav” function is now called “add_breadcrumb” and the “outputpage” function is now called “output_page” ![]() Mybb Fans, Submit your site to the MyBB Directory |
|||
|
09-05-2006, 01:55 PM
Post: #32
|
|||
|
|||
|
RE: Include your custom pages in Mybb
Also $settings is no more It was deprecated in 1.2 and removed. use {$mybb->settings['settingsvar']} in templates instead. and $mybb->settings['settingsvar'] in the page.
MyBB Addicted. =) My plug-ins list |
|||
|
12-05-2006, 06:24 PM
Post: #33
|
|||
|
|||
|
RE: Include your custom pages in Mybb
[/size]
CraKteR Wrote:Also $settings is no more It was deprecated in 1.2 and removed. use {$mybb->settings['settingsvar']} in templates instead. and $mybb->settings['settingsvar'] in the page. i did not understand the above. $mybb->settings.... but friends the code which is worked for 1.2.1 is below. just finely worked for me hope for you also , php code:[size=medium] <?php define("IN_MYBB",1); require "./global.php"; // (1) add_breadcrumb("Rules page", "rules.php"); // (2) eval("\$Rules = \"".$templates->get("Rules")."\";"); // (3) output_page($Rules); // (4) ?> |
|||
|
01-17-2007, 03:36 AM
Post: #34
|
|||
|
|||
|
RE: Include your custom pages in Mybb
nice tutorial... but how come my php codes within the template aren't executed.
i placed <?php echo "1234";?> within the template but nothing happened ![]() is it possible to execute php codes at all? |
|||
|
01-17-2007, 08:06 AM
Post: #35
|
|||
|
|||
RE: Include your custom pages in Mybb
edge18 Wrote:nice tutorial... but how come my php codes within the template aren't executed.You can put php variables ( {$example} ) and variable arrays ( {$example['array']} ) but no other php code works. Its all to do with the eval() way of parsing the template.
Please do not PM me for help, I will always tell you to ask in the support forums.
Likewise, people who contact me through MSN or another IM client asking for help will be instantly ignored... The Atheist Blogger | My MyBB Mods | DrPoodle.com | My Blog | Atheist Forum |
|||
|
02-08-2007, 10:36 PM
Post: #36
|
|||
|
|||
|
RE: Include your custom pages in Mybb
Thank you DennisTT for updating the info to suit the new version.
|
|||
|
02-17-2007, 05:17 PM
(This post was last modified: 02-17-2007 05:20 PM by WeAreWriters.)
Post: #37
|
|||
|
|||
RE: Include your custom pages in Mybb
ll jdmeg222 ll Wrote:and in $links: Where do we define the '$Page'? Like is that in the template or a php code on its own? And MiNT Wrote:first, this code should be at the top of the php file, on a new line, just after “<?php” The "IN_MYBB", , is that supposed to be replaced with our DB name? Louise http://www.wearewriters.co.uk http://www.wearewriters.co.uk/forums |
|||
|
02-17-2007, 07:30 PM
Post: #38
|
|||
|
|||
|
RE: Include your custom pages in Mybb
Hello
Quote:The "IN_MYBB", , is that supposed to be replaced with our DB name? No keep it as it is, it has nothing to do with DB name. Please read again the first post, it has all the information needed. If you face a problem again please ask and provide interrogation from the 1st post so i can help you more. regards |
|||
|
02-18-2007, 08:14 AM
(This post was last modified: 02-18-2007 08:31 AM by WeAreWriters.)
Post: #39
|
|||
|
|||
|
RE: Include your custom pages in Mybb
Template code:
Code: <html>PHP Code: PHP Code: <?phpAm I doing the right thing? I'm a total newb to this, but once I've done it, I can retrace my steps then there'll be no more questions in the future .But the reason why I'm fretting is because I get this error: Fatal error: Call to undefined function addnav() in /forums/newpage.php on line 7 Firstly, I changed the 'addnav()' to 'add_breadcrumb' (like as suggested in one of the previous posts). So what is wrong? and is my code actually right? I found it quite hard to interpret the instructions, only because I have never done anything like this before. Alternatively, I just duplicated the Portal template and php code to my NewPage, and it was all fine, but I didn't know what to delete from the php file to remove the announcements. Would that be an easier option for me? Edited: Now I'm getting error: Parse error: syntax error, unexpected T_STRING in /forums/newpage.php on line 3 Many thanks and sorry to be a bother. Louise http://www.wearewriters.co.uk http://www.wearewriters.co.uk/forums |
|||
|
02-18-2007, 10:57 AM
Post: #40
|
|||
|
|||
RE: Include your custom pages in Mybb
Quote:Edited: Now I'm getting error: the is no semi-column after $mybb->settings['settingsvar'], even if corrected what is this? this will do nothing what are you trying to do through it?. Plus you can't put it above PHP Code: require "./global.php"; this code below works perfectly PHP Code: <?phpRegards |
|||
|
« Next Oldest | Next Newest »
|
Search
Member List
Calendar
Help

![[Image: sig.png]](http://mintspad.com/img/sigs/sig.png)




.