Current time: 07-25-2014, 07:56 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 6 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add new custom PHP page.
05-01-2012, 09:00 PM
Post: #21
RE: Add new custom PHP page.
Try this:

PHP Code:
<?php

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

add_breadcrumb("Chillax Tekkit""index.php");

eval(
"\$html = \"".$templates->get("chillax_tekkit")."\";");

output_page($html);

?>

-Paul H.
Please feel free to PM regarding issues within the community, the blog, social media pages, or the public image of MyBB.

Cogisne lingua latina?
Find all posts by this user
Quote this message in a reply
05-02-2012, 12:23 AM (This post was last modified: 05-02-2012 03:48 AM by Jasonsj10.)
Post: #22
RE: Add new custom PHP page.
(05-01-2012 09:00 PM)Paul H. Wrote:  <snip>
It parsley worked. Alot icons are broken.

http://chillax-mc.com/forums/tekkit/index.php (thing you told me to do)
compare to
http://chillax-mc.com/forums/ (main dir)


EDIT: Also you are not logged in as you are on the main site.

[Image: chillaxfullbanner.png]
Find all posts by this user
Quote this message in a reply
05-02-2012, 04:14 AM
Post: #23
RE: Add new custom PHP page.
This user has been denied support. This user has been denied support.
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.

Z5T - Dynamic URL Shortener
My Plugins & Themes
Find all posts by this user
Quote this message in a reply
05-02-2012, 08:52 PM
Post: #24
RE: Add new custom PHP page.
(05-02-2012 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.

[Image: chillaxfullbanner.png]
Find all posts by this user
Quote this message in a reply
05-07-2012, 12:17 AM
Post: #25
RE: Add new custom PHP page.
(05-02-2012 12:23 AM)Jasonsj10 Wrote:  
(05-01-2012 09:00 PM)Paul H. Wrote:  <snip>
It parsley worked. Alot icons are broken.

http://chillax-mc.com/forums/tekkit/index.php (thing you told me to do)
compare to
http://chillax-mc.com/forums/ (main dir)


EDIT: Also you are not logged in as you are on the main site.

I still need help with this.

[Image: chillaxfullbanner.png]
Find all posts by this user
Quote this message in a reply
05-07-2012, 05:29 AM
Post: #26
RE: Add new custom PHP page.
This user has been denied support. This user has been denied support.
Try this?:

PHP Code:
<?php 

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

add_breadcrumb("Chillax Tekkit""index.php"); 

eval(
"\$html = \"".$templates->get("chillax_tekkit")."\";"); 

output_page($html);

?>

Z5T - Dynamic URL Shortener
My Plugins & Themes
Find all posts by this user
Quote this message in a reply
05-09-2012, 01:32 AM
Post: #27
RE: Add new custom PHP page.
(05-07-2012 05:29 AM)crazy4cs Wrote:  Try this?:

PHP Code:
<?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 =
Code:
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

[Image: chillaxfullbanner.png]
Find all posts by this user
Quote this message in a reply
05-09-2012, 06:05 AM (This post was last modified: 05-09-2012 06:07 AM by Dragon_Void.)
Post: #28
RE: Add new custom PHP page.
(05-01-2012 09:00 PM)Paul H. Wrote:  Try this:

PHP Code:
<?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 Code:
<?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 Smile still does the same thing at the end Smile
Find all posts by this user
Quote this message in a reply
05-09-2012, 06:08 AM (This post was last modified: 05-09-2012 06:09 AM by crazy4cs.)
Post: #29
RE: Add new custom PHP page.
This user has been denied support. This user has been denied support.
OK. Try this then:

PHP Code:
<?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.

Z5T - Dynamic URL Shortener
My Plugins & Themes
Find all posts by this user
Quote this message in a reply
05-09-2012, 11:27 PM (This post was last modified: 05-09-2012 11:30 PM by Jasonsj10.)
Post: #30
RE: Add new custom PHP page.
(05-09-2012 06:08 AM)crazy4cs Wrote:  OK. Try this then:

PHP Code:
<?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

http://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 http://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.

[Image: chillaxfullbanner.png]
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication