Help Contents

Lemonade Forums 1.0

Install
System Intergration
Main Forum Links
Skins
Updates
Uninstall
Registration
Contact YCUBED
Install
Follow the steps below to install your Lemonade Forum:

1) Unpack the zip file to a directory of your choice.
2) Open the file 'config.php' included in the forum package using any text editor (MS WordPad Recommended) - ** Disable 'Word Wrap' **.
3) Set the MySql and Database Settings as follows:
    a) Replace 'myusername' with your MySql username
    b) Replace 'mypassword' with your MySql password
    c) Replace 'mydatabase' with your MySql database name
    c) If needed replace 'localhost' with your hostname, most servers work well with 'localhost'.
4) Save the 'config.php' file.
5) Upload all files included in the forum package into the directory of your choice on your webserver.
6) With your Web Browser, open the file 'setup.php'
( http://www.yourdomain.com/forumdir/setup.php )
7) Then Complete your installation through your web browser


System Intergration
The following tutorial helps you intergrate your own php driven online system with your Lemonade Forum.
Suppose you have an online registration form which allows users to register onto your system, and you want the the registration to automatically register your user onto your Lemonade Forum System.

1) Firstly make sure you have collected all data required by your Lemonade Forum (First Name, Last Name, Profile Name, Email Address, Password). It's Recommended that you also include the unrequired fields as well (Country, Interests, Occupation, Profile Pictrue Location(http://)).

2) Secondly, validate the given data, it's not neccessary, but highly recommended. Here's the PHP code you can use to validate the data:


//Email format validation Function
function valid_email($email) {
if( eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email) ) {
return true;
}
else {
return false;
}
}

// Declare our variables from the html form
$name = trim($_POST['name']);
$last_name = trim($_POST['lname']);
$profile_name = trim($_POST['pname']);
$email = trim($_POST['email']);
$password = trim($_POST['password']);
$password2 = trim($_POST['password2']);

$all = 'good'; //Validation tag

//Check if password and retyped passwords are identical
if($password2 == $password)
{$password_p2 = 'good';}
else
{$password_p2 = 'bad';
$all = 'bad';}

//Check if the datas' lengths are suitable
$len1 = strlen($name);
$len2 = strlen($last_name);
$len3 = strlen($profile_name);
$len4 = strlen($password);

if ($len1 < 2){
$name_p = 'bad';
$all = 'bad';
}

if ($len2 < 2){
$lname_p = 'bad';
$all = 'bad';
}

if ($len3 < 2){
$lname_p1 = 'bad';
$all = 'bad';
}
else {

//Check if any other user has same profile name

$query = "SELECT * FROM profiles_lf WHERE pname='$profile_name'";
$result = mysql_query($query) or die('2: ' . mysql_error());
$numrows = mysql_num_rows($result);
if($numrows == 0)
{//if not the assign tag to good
$lname_p2 = 'good';
}
else
{//Someone already has the profile name
$lname_p2 = 'bad';
$all = 'bad';
}
}

//Validate the email address
if (valid_email($email)){
$email_p = 'good';

//Since the email is also the username, check if anyone else
//has the same email address in the database

$query2 = "SELECT * FROM profiles_lf WHERE email='$email'";
$result2 = mysql_query($query2) or die('3: ' . mysql_error());
$numrows2 = mysql_num_rows($result2);
if($numrows2 == 0)
{
$email_p2 = 'good';
}
else
{//Someone already has the same username
$email_p2 = 'bad';
$all = 'bad';
}
}
else {
$email_p = 'bad';
$all = 'bad';
}

// Check password's length
if ($len4 < 5){
$password_p = 'bad';
$all = 'bad';
}

if ($all == 'good'){

// if all data entered is valid, then proceed

}
else {

// if some data is invalid, the take appropriate measures

}


3) Once sure that all the data is valid, insert the date into the MySql data base.
Database Table: profiles_lf2713

Here's the finishing code, none of the following code should be changed or ommited:


$r = rand();

$date = date(" d/m/o ");

$insert_query = "INSERT INTO profiles_lf2842 (name, lname, pname, country, occupation, email, date, password, picture, pic_width, pic_height, pic_status, pic_size, posts, auth, ostatus, interests) VALUES ('$name', '$last_name', '$profile_name', '$country', '$occupation', '$email', '$date', '$password', '$picture', '$n_width', '$n_height', '$pic_stat', '$size', '0', '$r', 'enabled', '$interests')";

mysql_query( $insert_query ) or die(mysql_error());



4) You can also immediately log the user in after registration. Just add the following code to the above.


echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <META HTTP-EQUIV="refresh" content="0; URL=main.php?com=reg1&o='.$r.'">';

...where 'main.php' should be replaced with the full path to the 'main.php' file in your forum folder

NOTE: Login should always be done through the forum's system and not external pages.


Main Fourm Links
These are the main links associated with your forum:

1) http://www.yourdomain.com/forumdir/index.php - main page of your forum.
2) http://www.yourdomain.com/forumdir/login.php - User's loggin page.
3) http://www.yourdomain.com/forumdir/admin_login.php - Admin's Loggin page.


Skins
Forum skins are freely available at:
http://www.ycubed.co.za/lf/skins/
Installation of new skins simply involves the replacement of forum files with skin files included in the skin's package. This will only change the appearance of your forum, not the forum's content.


Updates
Update notices will be sent via email, but for free and direct updates, you can also visit:
http://www.ycubed.co.za/lf/updates/


Uninstallation
The uninstallation process is quick and simple. In your forum's folder, open the file 'uninstall.php.block', then without changing anything, save the file as 'uninstall.php'. Next, open the file 'uninstall.php' in your web browser and then the message 'Uninstallation Was Successful!' should appear. Uninstallation is complete.

Registration
Remove those Advertisments by buying the clean version and corresponding lisence. Visit:
http://www.ycubed.co.za/lf/buy/


Contact YCUBED
Email: info@ycubed.co.za
Web: http://www.ycubed.co.za/