Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add Custom Page[No Plugin]
Author Message
Onyx Offline
Banned

Posts: 9
Joined: Jan 2010
Post: #1
Add Custom Page[No Plugin]
Ok so first lets make a simple page. The page i have made was for upgrade accounts, so the page i made was upgrade.php. So look below and you will see what i have done.

Code:
<?php

define("IN_MYBB", 1);
define("KILL_GLOBALS", 1);
require "global.php";

add_breadcrumb("Upgrade", "upgrade.php");

eval("\$upgrade= \"".$templates->get("upgrade")."\";");
output_page($upgrade);
?>

All you have to do is replace the "upgrade" part of the text, to what ever the name of your page is going to be. So in the following code I have made another one for you, just to see what i mean.

Code:
<?php

define("IN_MYBB", 1);
define("KILL_GLOBALS", 1);
require "global.php";

add_breadcrumb("contact", "contact.php");

eval("\$contact= \"".$templates->get("contact")."\";");
output_page($contact);
?>

See what i mean. if so good....if not read more through the code and see if you can get it.

ok next were going to have to make a template for your theme on your board. So what were going to have to do is go in the acp and make a template. So follow the steps below ok.

admin cp --> Templates & Styles --> Templates --> The template your using --> Expand Templates --> Add new Template.

Now once you have click to make a new template, just copy and paste this code in the larger text box, and put the content you want where i have labeled for you.

Code:
<html>
<head>
<title>Subscribe</title>
{$headerinclude}
</head>
<body>
{$header}[b]
Put your content Here.[/b]
{$footer}
</body>
</html>

Hope this help.
01-17-2010, 12:44 AM
Find all posts by this user Quote this message in a reply
querschlaeger Offline
Junior Member
**

Posts: 18
Joined: Nov 2008
Reputation: 0
Post: #2
RE: Add Custom Page[No Plugin]
If you don't want to create a template you can write the template content in PHP file directly:

PHP Code:
$template '<html>
<head>
<title>Subscribe</title>
{$headerinclude}
</head>
<body>
{$header}
Put your content Here.
{$footer}
</body>
</html>'
;

// This replace is important!
$template str_replace("\\'""'"addslashes($template));

eval(
"\$page = \"".$template."\";");

output_page($page); 
01-21-2010, 07:07 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Dylan1615 Offline
Junior Member
**

Posts: 4
Joined: Jan 2010
Reputation: 0
Post: #3
RE: Add Custom Page[No Plugin]
Very helpful tutorials. I have been working on trying to figure out how exactly MyBB works so I could start making mods. This will give me a good start.
By the way, what would be the advantage of not making a template?
01-22-2010, 06:17 AM
Find all posts by this user Quote this message in a reply
Don+ Offline
Member
***

Posts: 66
Joined: Aug 2010
Reputation: 0
Post: #4
RE: Add Custom Page[No Plugin]
Thankx man !
I love to make my own pages using this Tongue
(This post was last modified: 08-21-2010, 10:44 AM by Don+)
08-21-2010, 10:43 AM
Find all posts by this user Quote this message in a reply
LiNUX Offline
Junior Member
**

Posts: 9
Joined: Nov 2010
Reputation: 0
Post: #5
RE: Add Custom Page[No Plugin]
wow thanks for this.. very useful tutorial ^^
12-11-2010, 03:05 PM
Find all posts by this user Quote this message in a reply
Gabriel Offline
Junior Member
**

Posts: 8
Joined: Dec 2010
Reputation: 0
Post: #6
RE: Add Custom Page[No Plugin]
wow thanks for this!!
12-13-2010, 05:28 AM
Find all posts by this user Quote this message in a reply
NNT_ Offline
Junior Member
**

Posts: 21
Joined: Dec 2010
Reputation: 0
Post: #7
RE: Add Custom Page[No Plugin]
Bookmarked !
This is exactly i need 001_tongue Thank you
12-31-2010, 03:23 PM
Find all posts by this user Quote this message in a reply
Manutdfans7 Offline
Junior Member
**

Posts: 35
Joined: Dec 2009
Reputation: 0
Post: #8
RE: Add Custom Page[No Plugin]
I used to use Misc.php as a page but i found this more useful. Thanks!
01-01-2011, 01:09 AM
Find all posts by this user Quote this message in a reply
metonator Offline
Junior Member
**

Posts: 29
Joined: Jan 2011
Reputation: 0
Post: #9
RE: Add Custom Page[No Plugin]
nice mod Big Grin
01-05-2011, 06:00 AM
Find all posts by this user Quote this message in a reply
members Offline
Junior Member
**

Posts: 42
Joined: Jan 2011
Reputation: 0
Post: #10
RE: Add Custom Page[No Plugin]
Helpful the say the least, thanks man.
01-07-2011, 05:44 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)