Presta Portal

Full Version: TIP: How can multiple IP addresses maintenance
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
1) Replace line 29 of file / admin / tabs / AdminPreferences.php by:
PHP Code:
'PS_MAINTENANCE_IP' => array('title' => $this->l('Maintenance IP:'), 'desc' => $this->l('IP address allowed to access the Front Office while the shop is disabled (e.g., 42.24.4.2)'), 'validation' => 'isGenericName''type' => 'text''size' => 60'default' => ''), 
2) Replace line 26 of file / header.php by:
PHP Code:
if (isset($maintenance) AND (!isset($_SERVER['REMOTE_ADDR']) OR !in_array($_SERVER['REMOTE_ADDR'], explode(','Configuration::get('PS_MAINTENANCE_IP'))))) 
This way, you can specify multiple addresses in "maintenance" very useful for teasing
Note, the new IP addresses are added to this form:
XXX.XXX.XXX.XXX, YYYY.YYYY.YYYY.YYYY, ZZZZ.ZZZZ.ZZZZ. ZZZZ
Reference URL's