Try this:
<?php
define('IN_MYBB', 1);
chdir("..");
require "global.php";
add_breadcrumb("Chillax Tekkit", "index.php");
eval("\$html = \"".$templates->get("chillax_tekkit")."\";");
output_page($html);
?>
But why you edited index.php ? Simply make another file? You shouldn't be playing with index.php (if its of forum's directory) unless you know what are you doing as its used in many, many places.
(2012-05-02, 04:14 AM)crazy4cs Wrote: [ -> ]But why you edited index.php ? Simply make another file? You shouldn't be playing with index.php (if its of forum's directory) unless you know what are you doing as its used in many, many places.
No no no. This Index.php is the index of THIS directory. Its for my Tekkit Minecraft Server. It does not have the forums on it. Its a new page with your "Add new custom PHP page" format.
Try this?:
<?php
define('IN_MYBB', 1); require "./global.php";
add_breadcrumb("Chillax Tekkit", "index.php");
eval("\$html = \"".$templates->get("chillax_tekkit")."\";");
output_page($html);
?>
(2012-05-07, 05:29 AM)crazy4cs Wrote: [ -> ]Try this?:
<?php
define('IN_MYBB', 1); require "./global.php";
add_breadcrumb("Chillax Tekkit", "index.php");
eval("\$html = \"".$templates->get("chillax_tekkit")."\";");
output_page($html);
?>
Got this =
Warning: require(./global.php) [function.require]: failed to open stream: No such file or directory in /home/chillaxm/public_html/forums/tekkit/index.php on line 3
Warning: require(./global.php) [function.require]: failed to open stream: No such file or directory in /home/chillaxm/public_html/forums/tekkit/index.php on line 3
Fatal error: require() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/chillaxm/public_html/forums/tekkit/index.php on line 3
(2012-05-01, 09:00 PM)Paul H. Wrote: [ -> ]Try this:
<?php
define('IN_MYBB', 1);
chdir("..");
require "global.php";
add_breadcrumb("Chillax Tekkit", "index.php");
eval("\$html = \"".$templates->get("chillax_tekkit")."\";");
output_page($html);
?>
Seems like this worked for you... as for the image problem, why not download a copy of forums/images and upload it to forums/tekkit/images ? (i. Upload a copy of your images folder to forums/tekkit/) I am sure that will be easier. As for the current error you are getting, this should work:
<?php
define('IN_MYBB', 1); require "../global.php";
add_breadcrumb("Chillax Tekkit", "index.php");
eval("\$html = \"".$templates->get("chillax_tekkit")."\";");
output_page($html);
?>
or, alternatively Paul's code
still does the same thing at the end
OK. Try this then:
<?php
define('IN_MYBB', 1); require "../global.php";
add_breadcrumb("Chillax Tekkit", "index.php");
eval("\$html = \"".$templates->get("chillax_tekkit")."\";");
output_page($html);
?>
And one question,
Does tekkit folder contains MyBB files or its a separate another folder? If yes, it maybe troublesome as we are integrating this with MyBB templates & functions and not other separate simple PHP page. In that case, I would suggest you to place this file with some other name in the forum directory itself.
(2012-05-09, 06:08 AM)crazy4cs Wrote: [ -> ]OK. Try this then:
<?php
define('IN_MYBB', 1); require "../global.php";
add_breadcrumb("Chillax Tekkit", "index.php");
eval("\$html = \"".$templates->get("chillax_tekkit")."\";");
output_page($html);
?>
And one question,
Does tekkit folder contains MyBB files or its a separate another folder? If yes, it maybe troublesome as we are integrating this with MyBB templates & functions and not other separate simple PHP page. In that case, I would suggest you to place this file with some other name in the forum directory itself.
The dir its in is
www.chillax-mc.com/forums/tekkit
I am also putting all of these in different dir so It doesn't get confusing and so it has its own DIR. I want people to be able to go to
www.chillax-mc.com/forums/tekkit
Also, That one gave me the same issue as before. Not the Error one. The issue with not being logged in and most images are gone.