Rusnak PHP Scripts Support Forums

Full Version: How to skin the forum installer - Tutorial
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, you want to make your own skin for the forum installer so it matches your site? No problem!

For the index.php:

The index.php file is really nothing more than a HTML form. Thus, you could simply create a new HTML form on your website that posts to mkforum.php. The form you make for your site should post the following values to mkforum.php:
  • fname - This is the forum name
  • email - User's Email Address
  • uname - Forum Admin Username
  • pass1 - Admin password
  • pass2 - Confirm Password
  • forumname - Display Name that appears on the top of the forum

Then just create a new form with those fields that posts to mkforum.php on your server.

Editing mkforum.php:

First, create a HTML mockup of what you want the completed mkforum.php file to look like to the end user after they have installed a forum. Save this as a .html file and then do a find and replace on the file to make sure all double quotes (") are turned into single quotes (').

Then in mkforum.php find:

PHP Code:
echo "<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<title>MyBB Multiforum Installer</title>
<style type='text/css'>
<!--
body,td,th {
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
}
body {
    background-color: #4392C6;
}
a:link {
    color: #000000;
}
a:visited {
    color: #000000;
}
a:hover {
    color: #000000;
}
a:active {
    color: #000000;
}
.style1 {
    color: #1174B5;
    font-weight: bold;
}
.style3 {font-size: 14px}
.style6 {
    font-size: 16px;
    font-weight: bold;
}
.style9 {font-size: 14px; font-weight: bold; }
.style10 {font-size: 12px}
-->
</style></head>

<body>
<div align='left'></div>
<center><table width='700' border='0' cellpadding='0' cellspacing='0'>
  <!--DWLayoutTable-->
  <tr>
    <td width='700' height='82' valign='top' bgcolor='#FFFFFF'><img src='mfmod.gif' width='248' height='82'>
</td>
    </tr>
  <tr>
    <td height='15' valign='top' bgcolor='#347AA9'><!--DWLayoutEmptyCell-->&nbsp;</td>
  </tr>
  <tr>
    <td height='253' valign='top' bgcolor='#FFFFFF'><div align='center'>
      <p>&nbsp;</p>
      <p class='style1'><u>MyBB Multiforums Installer:</u></p>
"
;

$myURL $newURL;
echo 
"Your forum is now set up!  You can view it at <a href=$myURL>$myURL</a><br>";
echo 
'<br><b>Here are your login details:</b><br>';
echo 
'Username: '.$uname.'<br>';
echo 
'Password: '.$pass1.'<br><br>';
echo 
'You will receive shortly an activation code via email.  
Click on the notice on your forums to activate your forums. 
<b>Until you activate your forums they can be automatically deleted or pruned at any time!</b>  
Once you activate your forums they cannot be automatically deleted.  
If you do not receive an email from us shortly please check your spam or junk email folder.<br>'
;

echo 
'<br>Have a nice day!<br>';
$copyrite "http://www.webringamerica.com/mybbmf/";
echo 
"<br><a href=$copyrite>Powered by Brandon's MyBB Multiforums Mod</a><br><br>";
echo 
"</div></td>
  </tr>
</table>
</center>
</body>
</html>"


This is the default HTML for the forum installer. Delete or edit as necessary. Make sure to wrap your HTML inside of an echo ""; statement. You can use this list of variables for dynamic content, such as the forum name, forum link, email, username, password, etc.

Unless you are a Premium Member you MUST include a visible link to http://webringamerica.com/mybbmf/ with the text Powered by Brandon's MyBB Multiforums Mod somewhere on the forum installer.

Hope it helps,
BMR777
Quote:
  • fname - This is the forum name
  • ...
  • forumname - Display Name that appears on the top of the forum

You might want to clarify. fname is the URL prefix/suffix, right? As in, {fname}.freeforums.com or freeforums.com/mybb/{fname}/ .
lupus6x9 Wrote:
Quote:
  • fname - This is the forum name
  • ...
  • forumname - Display Name that appears on the top of the forum

You might want to clarify. fname is the URL prefix/suffix, right? As in, {fname}.freeforums.com or freeforums.com/mybb/{fname}/ .
Yep, everywhere the $fname variable is.
Yes, fname is the prefix/suffix for the forum. The other one, display, is the displayed name the admin has chosen. Smile

BMR777
Hi,

Would I follow the same steps to put the error messages within my template?
eg - "You did not enter in a valid email address. A valid email address is required to activate your forums. Please go back and re-enter in an email address."

Also,

I seem to be having a slight problem with my template footer! It works with the index file, however its showing as being out of place with the mkforum file. Ive attached a screenshot showing the problem.

This is the code im currently using:

PHP Code:
echo "<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<title>"
.$lang_title."</title>
<style type='text/css'>
<!--
body,td,th {
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
}
body {
    background-color: #4392C6;
}
a:link {
    color: #000000;
}
a:visited {
    color: #000000;
}
a:hover {
    color: #000000;
}
a:active {
    color: #000000;
}
.style1 {
    color: #1174B5;
    font-weight: bold;
}
.style3 {font-size: 14px}
.style6 {
    font-size: 16px;
    font-weight: bold;
}
.style9 {font-size: 14px; font-weight: bold; }
.style10 {font-size: 12px}
-->
</style></head>

<head>

<title>Free 2 Column Website Template that is W3C Standards Compliant and Valid (31)</title>
<meta http-equiv='Content-Script-Type' content='text/javascript' />
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<meta name='description' content='Free 2 Column Website Template that is W3C Standards Compliant and Valid (31)' />
<meta name='keywords' content='Free 2 Column Website Template that is W3C Standards Compliant and Valid (31)' />
<meta name='robots' content='all,index,follow' />

<link rel='shortcut icon' href='favicon.ico' type='image' />

<link rel='stylesheet' type='text/css' href='stylesheet.css' media='screen,projection' />
</head>
<body>
<div id='wrapper'>

<div class='content_top'></div><!-- end class content_top -->

<div id='content'>

<div id='header_wrap'>

<!-- <div class='header'> -->

<div class='header_inner'>

<img src='http://www.bigboards.co.uk/logo.png' /> 


<h2>
Your Choice For Free Forum Hosting</h2>

</div><!-- end class header_inner -->

<!-- </div> end class header -->

</div><!-- end id header_wrap -->

<!-- start of top navigation menu -->
<div id='top_navigation'>

<div class='top_navigation_left'></div><!-- end class top_navigation_left -->

<ul>
<li><a href='http://www.bigboards.co.uk/'>Home</a></li>
<li><a href='http://freecssxhtmltemplates.com/'>Create a forum</a></li>
<li><a href='http://freecssxhtmltemplates.com/'>Big Boards Support</a></li>
</ul>

<div class='top_navigation_right'></div><!-- end class top_navigation_right -->

</div><!-- end id top_navigation -->
<!-- end of top navigation menu -->
<p class='style1'><u>"
.$lang_heading."</u></p>
"
;

$myURL $newURL;
echo 
$lang_setup." <a href=$myURL>$myURL</a><br>";
echo 
'<br><b>'.$lang_details.'</b><br>';
echo 
$lang_show_username.' '.$uname.'<br>';
echo 
$lang_show_password.' '.$pass1.'<br><br>';
echo 
$lang_activation;

//echo 'Also, update your account and forum email addresses inside of MyBB.  You can do this from your Admin CP and User CP.<br>';
echo '<br>'.$lang_niceday.'<br>';
$copyrite "http://www.rusnakweb.com/forum/";
echo 
"<br><a href=$copyrite>Powered by Brandon's MyBB Multiforums Mod</a><br><br>";
echo 
"</div></td>
<div id='content_area_wrapper'><!-- end class box_left -->
<!-- end class box_center --><!-- end class box_right --><!-- end id left -->
<!-- end id right -->
<div class='clear'></div>
<!-- end class clear -->

<div id='footer'>

<p>
<a href='http://freecssxhtmltemplates.com/'>Your Website</a>
</p>

<p>
<a href='http://freecssxhtmltemplates.com/'>Home</a> | <a href='http://freecssxhtmltemplates.com/'>About Us</a> | <a href='http://freecssxhtmltemplates.com/'>Contact Us</a>
</p>

<p class='important'>
<a href='http://freecssxhtmltemplates.com/'>website design</a> by <a href='http://freecssxhtmltemplates.com/'>Free CSS XHTML Templates</a>.com | <a href='http://freewebsitehostingreviews.com/freewebsitehostingreviews.php'>hosting reviews</a> | <a href='http://webdevelopmenttutorials.com/freecssxhtmlwebsitetemplates.php'>web templates</a>
</p>

</div><!-- end id footer -->

</div><!-- end id content_area_wrapper -->

</div><!-- end id content -->

<div class='content_bottom'></div><!-- end class content_bottom -->

</div><!-- end id wrapper -->
</body>
</html>"


I was just wondering if anyone would be able to point out where I might be going wrong!

Many thanks

Dave
Ok, Ive managed to solve the above problem, however any help on this one would be great!

Is there an easy way to get the error messages such as "You did not enter in a valid email address. A valid email address is required to activate your forums. Please go back and re-enter in an email address." to show in my html template?
hi i am new user
Wow. This is cool I was just looking out for a tutorial on how to skin the forum installer and here it is giving all the necessary details and a step by step PHP Code after first editing the mkforum.php!! It's going to be much simpler as it is more or less like the HTML form!! I am sure this will be helpful to anyone who was looking for a way on how to skin the forum installer! Great job!!
Reference URL's