MyBB Community Forums

Full Version: Adding Homepage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

How can i add a homepage to my forum , for example if you click "http://www.mybboard.net/" it brings you to a homepage rather than maine forum page. Also using the same theme of course.
Use the portal or there is another complicated way which will give you an html page.

Go to your forums and view the source. You will find a line similar to this:
<link type="text/css" rel="stylesheet" href="http://site.com/forum/cache/themes/theme29/global.css" />

You need to use the correct number or it will use a different template. Then make a PHP file called header.php.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PAGE NAME</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link type="text/css" rel="stylesheet" href="http://site.com/forum/cache/themes/theme29/global.css" />
</head>
<body>
[color=#FF0000]COPY THE ENTIRE HEADER HERE![/color]

Now to make your index.php file.
<?php include('header.php'); ?>
<h2>Header</h2>
<p>Content</p>
<?php include('footer.php'); ?>

You will need to do more advanced work to make the index look more like the theme.

To finish you need to do your footer.
<br />
<div class="bottommenu">
<center> Copyright © Site 2010<br>
All Rights Reserved.</center>
</div>
</div>
</div>
<hr class="hidden" />
</div>
<br />
</body>
</html> 

If you need any help then ask Smile
Wow , thanks for that Clarkie, im gonna have a look now Smile
Think i might just use the portal lol, how do i go about changing it to my liking ?
I'm afraid I've never used the portal myself. I imagine you place the file in the main forum directory and rename index.php to forums.php and rename portal.php to index.php. Once you've done that you need to edit some files so the forum navigation doesn't take you to the homepage and then I imagine you would customize it by changing the code in the portal file.
Ok m8 , thanks for that , i'll play around with it Smile
What's your site url?
Therefore that's your code:
<link type="text/css" rel="stylesheet" href="http://www.pro-coders.com/cache/themes/theme3/global.css" />
(2010-03-27, 01:43 PM)dunlop03 Wrote: [ -> ]www.pro-coders.com

Why did you remove the theme copyright?
Huh , i didnt ?