
Maintenance mode is modification which give as the possibility to put our site in maintenance mode. For example we need to close site for few minutes, we click on the button On an now people only see your web site logo and text "This site is currently under construction."
So let's start:
Files used in that modification:
smm.php (included in package)
admin_maintenance (included in package)
maintenance_main_center.tpl (included in package)
Files modified in that modification:
index.php
languages/lang_english.conf
templates/your_template_name/admin_templates/admin_main_center.tpl
Other:
Database query
Instruction:
1) Database query:
Code:
CREATE TABLE `pligg_maintenance` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR( 20 ) NOT NULL , `valuemm` VARCHAR( 50 ) NOT NULL ) ENGINE = MYISAM INSERT INTO `pligg_maintenance` ( `id` , `name` , `valuemm` ) VALUES ( '1', 'state', '0' );
smm.php to your root directory
admin_maintenance.php to your root directory
maintenance_main_center.tpl to templates/your_template_name/admin_templates/
3) Edit files:
Open index.php from root directory:
before
Code:
include_once('Smarty.class.php');
Code:
include('smm.php');
add this at the end:
Code:
//<SECTION>Pligg Maintenance</SECTION><ADDED>0.1</ADDED> PLIGG_Visual_Header_AdminPanel_Maintenance="Site under maintence" PLIGG_Visual_Header_AdminPanel_Maintenance_Display="Maintenance"
after
Code:
<img src="{$my_pligg_base}/templates/{$the_template}/images/paypal.gif" align="absmiddle"/> <a href="http://forums.pligg.com/donate.php" target="_blank">{#PLIGG_Visual_Header_AdminPanel_Donate#}</a>
Code:
<br/>
<img src="{$my_pligg_base}/templates/{$the_template}/images/manage_config.png" align="absmiddle"/> <a href="{$my_pligg_base}/admin_maintenance.php">{#PLIGG_Visual_Header_AdminPanel_Maintenance#}</a>
Add your website name:
Code:
<input type="submit" name="On" id="On" value="On" onClick="parent.location='http://your_web_address/admin_maintenance.php?action=on'" />
Code:
<input type="submit" name="Off" id="Off" value="Off" onClick="parent.location='http://your_web_address/admin_maintenance.php?action=off'" />
To change the logo and text displayed when site is under maintenance you need edit smm.php file.
You can change:
title:
Code:
<title>Site maintenance</title>
Code:
<img src="http://your_web_address/logo.png" alt="logo">
Code:
<h2>This site is currently under construction.</h2>
To use modification go to the admin pane, the you find on the end of list modification mode. Then you can click On and Off. Actually the status is not displayed. I will change that in future version.
TODO list:
-add display status (maintenance On/Off)
Version 0.1
If you don't understand something please write questions here

Modification is free but if you like you can send me some cash to my paypal account: admin.ddluk@gmail.com
Edited:
Small bug in smm.php. New version uploaded.




Linear Mode

