MyBB Source


Double MyBux Weekend!

Latest Releases: GlobalPassword - [UPDATED] Settings Cleaner - [MyPS] Rock, Paper, Scissors

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


Posts: 10
Joined: Oct 2009
Reputation: 0
Post: #1
[TuT] Creating Custom Pages
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: 10-27-2009 04:01 PM by n1tr0b.)
10-24-2009 09:03 PM


Svizy
Selfproclaimed V.I.P


Posts: 805
Joined: Aug 2009
Reputation: 1
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


Special thanks goes to ByteHunter for making me dynamic userbar generator!
10-27-2009 05:23 AM
n1tr0b
Junior Member


Posts: 10
Joined: Oct 2009
Reputation: 0
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
 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  A custom script im working on just wont work :( MySQL Errors... tommykent1210 3 106 09-16-2009 03:53 AM
Last Post: ptcsquad
  Custom Page Burnjack 1 105 07-17-2009 05:53 AM
Last Post: Nickman