MyBB Community Forums

Full Version: Help with template editing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
In reguards to : http://invizions.shacknet.nu

I have been going through a free theme and I like it quite well, but there's a few problems such as: some of the notices are in Portuguese and I think I've fixed all of them, but I also switched "portal.php" and "index.php" to be "index.php" and "forum.php" but that also screws up a few of the links and I can't find exactly where the links are in the template. if anyone knows what I mean and can give me a good way to fix it, I would greatly appreciate it.

Thanks,
-Kittens
A safer way to make the portal.php the index page is to add it as DirectoryIndex in .htaccess

DirectoryIndex portal.php index.php index.html index.htm

If you rename index.php to something else, you might have to edit some PHP files. There are quite a lot of references to index.php throughout MyBB.

forumdisplay.php:			$location = "index.php";
global.php:$navbits[0]['url'] = $mybb->settings['bburl']."/index.php";
member.php:			redirect("index.php", 
usercp2.php:			$url = "index.php";
...
(2011-01-30, 10:36 AM)frostschutz Wrote: [ -> ]A safer way to make the portal.php the index page is to add it as DirectoryIndex in .htaccess

DirectoryIndex portal.php index.php index.html index.htm

If you rename index.php to something else, you might have to edit some PHP files. There are quite a lot of references to index.php throughout MyBB.

thank you very much, I'll get to work on that

Edit: the DirectoryIndex thing isn't working, this is what I have:

#HTAccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule>

DirectoryIndex portal.php index.php index.html index.htm

<Files "config.php">
Order Allow,Deny
Deny from All
</Files>

<Files "common.php">
Order Allow,Deny
Deny from All
</Files>

and that is all, tell me what I am doing wrong Toungue
Dunno. Works for me. Wink
I just went through an extensive troubleshooting with the guys on freenode at #httpd and there's nothing but mybb to blame as of so far, so if anyone can wrench the tooth out of the beast, I'd be rather appreciative.
MyBB doesn't have any influence over what your webserver uses as index file (as in for the URL that ends with / not /index.php - without code modifications, MyBB will continue linking to index.php).
check out http://invizions.shacknet.nu/ if you get the forums, it's incorrect. and you see my htaccess file right there, so I'm not hiding anything and ... damn, I'm just confused
And your portal.php is actually the portal and not a renamed index.php? Then it's your webserver not using the directory index for some reason.
exactly! I'm literally stuck in purgatory because the apache guys say it's MyBB and you guys say it's Apache, and I'm orange-out-of-luck on this project if I can't get something this fundamental out of the way.

Thanks,
-Kittens
Let's remove MyBB from the equation, then.

Create an empty directory called foobar. Place a foobar.html with any content (but no PHP code) inside.

Now, when opening http://yourdomain/foobar/ in your browser, make it display the contents of foobar.html

DirectoryIndex foobar.html in /foobar/.htaccess should do that, if it does not, configuration issue with your webserver. Make sure it allows .htaccess files and supports DirectoryIndex directive (mod_dir).
Pages: 1 2