MyBB Source


MyBB 1.6 Officially Released!

Latest Releases: Valid Referrals - Bonus - Mark Thread Read

 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[TuT] Creating Custom Pages in MyBB
Author Message
n1tr0b
Junior Member


Posts: 16
Joined: Oct 2009
Reputation: 0
MyBux: 10
Post: #1
[TuT] Creating Custom Pages in MyBB
OK this is a simple tutorial that will teach you how to create your custom pages without a plugin...

Credits:
Nickman - For letting me analyze his scripts for a great work-off for my mybb integration project.

First thing a file
lets say, pore.php

After that we'll need templates so go create some, after that language your gonna create the language file name it as "name".lang.php

Template Creation
So the simple way to create templates only required few work,
Note: For management of your templates simply create a template set

Basic Template, you can edit this if you learned much of it.
Code:
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->downloads}</title>
{$headerinclude}
</head>
<body>
{$header}
<!-- Content Here -->
{$footer}
</body>
</html>

Question: I need some PHP for this can I apply it to the templates?
Answer: No, PHP is not allowed in templates. But if you really like to simply put your PHP code in the database.. Create an additional table.
Another Answer: Simply put your other PHP code at your script.

MyBB Templates Allows:
PHP Code:
$this->value
$this
->func()
$this->key['value'

Code for Evaluating String to PHP code
PHP Code:
$var = eval("PHP String"); 

Thats all you need to know.. You can ask me by PM or go to my site for other details.
EDIT:
Please include the globals for your script to work fine
PHP Code:
require_once "./global.php"

http://avdose.sfh.cc/forum/
(This post was last modified: 12-25-2009 02:37 PM by n1tr0b.)
10-24-2009 09:03 PM


Andraž Rihtar
Support Team

Support

Posts: 1,893
Joined: Aug 2009
Reputation: 8
MyBux: 1235
Post: #2
RE: [TuT] Creating Custom Pages
Page needs global and funtions to be included into it otherwise it won't work. Its an quicly made tutorial, I think that you could have done an better job at it

Svizy - MyBBSource Support Team
10-27-2009 05:23 AM
n1tr0b
Junior Member


Posts: 16
Joined: Oct 2009
Reputation: 0
MyBux: 10
Post: #3
RE: [TuT] Creating Custom Pages
Oh i forgot the includes... The main ones... damn... EDITED..

AvDose Productions - CEO
10-27-2009 04:00 PM
abcdude
Junior Member


Posts: 2
Joined: Jul 2010
Reputation: 0
MyBux: 4
Post: #4
RE: [TuT] Creating Custom Pages in MyBB
it seems to me the code is similar to vbulletin, strange
07-13-2010 01:52 AM
Xzi
Junior Member


Posts: 18
Joined: Mar 2010
Reputation: 0
MyBux: 10
Post: #5
RE: [TuT] Creating Custom Pages in MyBB
Pretty good guide. It is a pity that it is not only aesthetically. But I explained it is okay
07-17-2010 03:18 AM
 





Web Design | Web Design Jobs