Basic question seeks simple answer.
Firefox Wins Offline
Member
***
Posts: 164
Joined: Mar 2008
Post: #1
Basic question seeks simple answer.
This was posted @ MyBB a while back; Someone was trying to show others an easy way to make custom pages.

PHP Code:
1
2
3
4
5
6
7
8
9
10
<?php

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

add_breadcrumb("Welcome Page", "welcome.php");

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


For a quick and easy MyBB Hack / If I use Yumi/Zinga's php in templates plugin, then...
Rule #1 Rules Basic questions should be simple....
...re-writing code...

PHP Code:
1
2
3
4
5
6
7
8
9
10
<?php

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

add_breadcrumb("New Index", "./new_idea/index.php");

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


If I use Yumi/Zinga's php in templates plugin:
The file /new_idea/index.php (and / or the template) could contain the index page of almost any simple GPL script or class from here @phpclasses.org, as long as the other script doesn't have a conflicting login, "headers already sent", or namespace / variable issue?

Asking the same question in one simple sentence:
Learning a template system can be very confusing at first; The above code could be a really easy way to use a variety of php files along with MyBB, correct?
Glad to get some help, thanks for being here.

(This post was last modified: 06-11-2010 01:01 AM by Firefox Wins.)
06-11-2010 12:46 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Basic question seeks simple answer. - Firefox Wins - 06-11-2010 12:46 AM

 Standard Tools
Forum Jump: