MyBB Community Forums

Full Version: index.php to forum.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have done a search and couldn't find what i was exactly looking for
I don't need to change my index.php to portal.php

I only need to change my index.php to forum.php.
Please note that im also using SEO urls ...

what are ALL the proper steps in making sure this works 100%?


Was wondering if anyone here knew how to?
Give this a try
http://community.mybb.com/thread-128457....+to+forums

OR

I came up with this so there are 50-50 percent chances that this will work.

Create a new file called forums.php and copy everything that's in the index.php file then paste it in forums.php

After C+P, find all "index" in the forums.php file and change it to forums. Some examples below

define('THIS_SCRIPT', 'index.php');

TO

define('THIS_SCRIPT', 'forums.php');

------------------------------------------------------------------

eval("\$loginform = \"".$templates->get("index_loginform")."\";");

TO

eval("\$loginform = \"".$templates->get("forums_loginform")."\";");

-------------------------------------------------------------------

In .htaccess, add a new rule. Example below

Redirect /index.php http://URL.domain/forums.php

I honestly doubt it's possible to change it to forums.php but you can give the solutions above a try. I would recommend keeping a backup too.

BTW, do you not flame me if the above solutions don't work because this does not qualify for general support. Your question is about a customization which I believe should be in the "Code Modifications" forum.
(2013-01-28, 05:34 AM)kamz89 Wrote: [ -> ]Give this a try
http://community.mybb.com/thread-128457....+to+forums

OR

I came up with this so there are 50-50 percent chances that this will work.

Create a new file called forums.php and copy everything that's in the index.php file then paste it in forums.php

After C+P, find all "index" in the forums.php file and change it to forums. Some examples below

define('THIS_SCRIPT', 'index.php');

TO

define('THIS_SCRIPT', 'forums.php');

------------------------------------------------------------------

eval("\$loginform = \"".$templates->get("index_loginform")."\";");

TO

eval("\$loginform = \"".$templates->get("forums_loginform")."\";");

-------------------------------------------------------------------

In .htaccess, add a new rule. Example below

Redirect /index.php http://URL.domain/forums.php

I honestly doubt it's possible to change it to forums.php but you can give the solutions above a try. I would recommend keeping a backup too.

BTW, do you not flame me if the above solutions don't work because this does not qualify for general support. Your question is about a customization which I believe should be in the "Code Modifications" forum.

No i will not flame you so dont worry Smile

i am actually thankful that you took the time to explain and i will try this method and get back to you in here as soon as i can.
(2013-01-28, 05:48 AM)AmatureDJ Wrote: [ -> ]
(2013-01-28, 05:34 AM)kamz89 Wrote: [ -> ]Give this a try
http://community.mybb.com/thread-128457....+to+forums

OR

I came up with this so there are 50-50 percent chances that this will work.

Create a new file called forums.php and copy everything that's in the index.php file then paste it in forums.php

After C+P, find all "index" in the forums.php file and change it to forums. Some examples below

define('THIS_SCRIPT', 'index.php');

TO

define('THIS_SCRIPT', 'forums.php');

------------------------------------------------------------------

eval("\$loginform = \"".$templates->get("index_loginform")."\";");

TO

eval("\$loginform = \"".$templates->get("forums_loginform")."\";");

-------------------------------------------------------------------

In .htaccess, add a new rule. Example below

Redirect /index.php http://URL.domain/forums.php

I honestly doubt it's possible to change it to forums.php but you can give the solutions above a try. I would recommend keeping a backup too.

BTW, do you not flame me if the above solutions don't work because this does not qualify for general support. Your question is about a customization which I believe should be in the "Code Modifications" forum.

No i will not flame you so dont worry Smile

i am actually thankful that you took the time to explain and i will try this method and get back to you in here as soon as i can.

Thanks and please let me know if this worked or not.
Don't change anything inside an eval(), otherwise you have to rename templates and I don't think that's possible without SQL Queries.
(2013-01-28, 06:19 AM)Seabody Wrote: [ -> ]Don't change anything inside an eval(), otherwise you have to rename templates and I don't think that's possible without SQL Queries.

Thanks for the correction but how would changing things in DB help the OP in this situation? I'm confused Sad
(2013-01-28, 05:34 AM)kamz89 Wrote: [ -> ]
eval("\$loginform = \"".$templates->get("index_loginform")."\";");

TO

eval("\$loginform = \"".$templates->get("forums_loginform")."\";");

If the OP did change the $templates->get function param, the forum would stop searching for the index_loginform template and start looking for forums_loginform. The workaround for this is A) rename the templates (which as I say, I don't believe is possible short of a db query), B) create additional templates with the correct names or C) just don't do it. In the end, only admins see the template names, you do not need to serve an alternate template to your users, imho, since they wouldn't know if they were seeing a forums_ template or an index_ template.
Thanks for keeping me updated. Sorry been busy doing other things, still haven't tried changing anything yet.

Let me explain the reasoning behind this. Mybb forums uses index.php, so basically due to the fact I just had someone code & design me a radio cms layout which also has a index.php file that goes into the same root as Mybb forum. Instead of editing over 50 files with this new radio layout that was designed and coded for me I'm sure it would be so much easier if i could just change the index.php of mybb with the right paths to be edited.

So to the first reply will this fix still apply to me for the necessary changes?

Also this is all being done locally on my PC using wamp as a test server so once I get this index.php solved I can then move forward to purchase a domain.
You could try this - but use the new index.php instead of portal

http://community.mybb.com/thread-43811.html

Getting the logins to work might be a problem - see if you can have the login code added to the custom index.
Thanks for all the help guys, unfortunately none of the above worked.
Pages: 1 2