Click Here for more FREE PHP scripts from Maian Media

{ Maian Recipe }
Installation:

Please read the following installation instructions carefully:

Requirements:

• A Windows or Linux web server running PHP7.0 or higher.
• A MySQLi supported database to hold the script tables.
• A FTP (File Transfer Protocol) client to upload the files to your web server. Filezilla or WinSCP is recommended.
• A simple text editor to make config changes to the PHP files. Notepad will be fine.
• Your server will require the GD Library for the spam captcha to work if enabled.

Auto Setup (Recommended):

1: In your server control panel, create a database to hold the script tables.

2: Rename the 'control/_cfg-example.php' file to '_cfg.php'. Open the 'control/_cfg.php' file in your text editor and update it to include the connection information for the database you just created. You should also change the default secret key and cookie name to something unique and also set a username/password for the recipe administration area.

3: Using your FTP client, upload all files/folders into a directory on your web server. ie: http://www.example.com/recipes/

4: Chmod the 'content/images/recipes/' and 'logs' folders to 0777 to make them world writeable. 0755 will work on some servers and should be used instead. Changing permissions can be done using your FTP client or server control panel. Not sure? Contact your host.

5: Access the install folder in your browser: http://www.example.com/recipes/install/. Follow the onscreen instructions.

6: If setup was successful, delete or rename the 'install/' folder.

7: Log into your administration area with the details you set in step 2:

http://www.example.com/recipes/admin/

Click 'Settings' from the top menu to configure your system. Make sure the install and server paths are correct. Your CSS files and images will NOT load if the install path is incorrect.

8: Finally, if you have enabled the search engine friendly urls rename the 'htaccess_COPY.txt' file to '.htaccess'. See the notes about this on the 'Features' page above.

That's it, you're done. Hopefully Maian Recipe is working ok for you.

IMPORTANT! For better security it is recommended you rename the 'admin' folder to something unique!

Script Usage:

1: Obviously, the settings are your first port of call. Update them enabling the features you want. For other feature disabling/enabling see the 'User Defined Variables' below.

2: Maian Recipe comes pre-configured with over 70 categories if selected during install. You can use these or delete them and use your own. Use the 'Categories' link in your admin area to manage them. Note that ALL pre-configured categories have the same initial settings. If you wish to enable/disable comments for specific categories, click a category to edit it.

3: Once your categories are in place, use the 'Recipes' link in your admin area to add new recipes. This should be fairly self explanatory.

4: Make sure you test each function to make sure it is working correctly. Visitors can submit recipes or comments via your public web interface.

Enjoy!

Template Structure:

ALL the system templates are in the 'content/ folder. HTML has been separated from the PHP code and placed in the 'content/html/' folder. You should be careful NOT to remove any of the system variables in the templates unless you know what you are doing. Variables appear as text between braces in the 'content/html/' folder. If you accidentally delete something, re-download the script and replace the template file(s).

Maian Recipe is 99% tableless, meaning it uses CSS for layout structure. If you aren't sure about CSS, be careful when making changes. A slight percentage shift on a div can throw the whole layout out of whack.

All e-mail templates are located in the 'content/email' folder. Edit the text in the *.txt files if required and re-upload. Again, be careful with the brace vars. These auto parse when the system runs.

All language is located in the 'content/lang/english.php' file.

All colour attributes and fonts are parsed in the 'style.css' cascading stylesheet. Additional stylesheets are mentioned on the 'Features' page.

How to Add New Pages:

All our scripts are structured the same with the templates and they all use the Savant2 template engine. Adding new pages is relatively easy:

[1] - Create a new .tpl.php file and pop it in the 'content' folder. You might want to look at the structure of the others to get the same HTML/div information. These files can use both standard HTML and PHP.

[2] - Next open the index.php and find the closing break; at the bottom of the file. Lets say you create a new file called 'pictures.tpl.php', after this break add the following:

case 'pictures':
include(PATH.'control/header.php');
$tpl =& new Savant2();
$tpl->display('content/pictures.tpl.php');
include(PATH.'control/footer.php');
break;

Access the new page as '?p=pictures'. If you are using mod_rewrite you'll also need to add the 'pictures' attribute to the first RewriteRule. If you add this you would access the page as 'pictures.html'.

[3] - If you need to pass dynamic data into the template, assign a new var:

case 'pictures':
$tpl =& new Savant2();
$tpl->assign('RANDOM', rand(1,9));
$tpl->display('content/pictures.tpl.php');
break;

Then use <?php echo $this->RANDOM; ?> in the template. This example would generate a random number from 1 to 9. You could also add this directly into the template as <?php echo rand(1,9); ?>. You won't need to pass data using the assign method unless you want content generated by the music system which couldn't be accessed directly in the template.

Hope that helps create new pages.

User Defined Variables:

Some features & functions can be disabled or updated in Maian Recipe, but may not appear in the admin settings. For some user editable variables, see the following file and read the notes there:

control/defined.php

We placed these variables separately to help you with some system adjustments.

SMTP Mail Settings:

Some servers disable the PHP mail function because of abuse and require all mail be sent via SMTP. If the e-mails work, you probably won't need to bother with this. Otherwise, enable this in your settings. SMTP is powered by the PHP Mailer Class.