• [Mod] Maintenance Page - Set from Admin Control panel 5 0 5 1
Currently:  

Author Topic: [Mod] Maintenance Page - Set from Admin Control panel  (Read 93941 times)

0 Members and 2 Guests are viewing this topic.

Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #15 on: March 30, 2005, 07:05:25 PM »
Ups,

do this

**KLICK**
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline Nasser

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #16 on: March 31, 2005, 09:38:26 AM »
Ups,

do this

**KLICK**

thank you very much that was helpful realy

Hi,

open

install_MainP.php

and find

Code: [Select]
<form action="install_mainp.php" name="form" method="post">
replace it with

Code: [Select]
<form action="install_MainP.php" name="form" method="post">

Save, Upload and Test It.....

you've helped me so much here also
thanks alot

Offline blitzy

  • Newbie
  • *
  • Posts: 32
    • View Profile
    • http://www.cs-media.org
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #17 on: March 31, 2005, 11:45:23 PM »
Has anyone tested this mod with 1.7.1?

Offline Josef Florian

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #18 on: May 17, 2005, 09:24:38 PM »
Has anyone tested this mod with 1.7.1?

This Mod works perfectly with Version 1.7.1!  :wink:
    • running v1.7.6 with MOD: SortImageAsYouLike / Cooliris Slideshow
    • with © removal
    • i have problems with:
actually no[/list]

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #19 on: June 04, 2005, 07:38:47 PM »
I got this error Warning: Cannot modify header information - headers already sent by (output started at /home/bhfqyruw/public_html/encuestas.php:166) in /home/bhfqyruw/public_html/includes/page_header.php on line 33

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #20 on: June 04, 2005, 09:16:43 PM »
I got this error Warning: Cannot modify header information - headers already sent by (output started at /home/bhfqyruw/public_html/encuestas.php:166) in /home/bhfqyruw/public_html/includes/page_header.php on line 33
as far as I recall u've asked about this type of message several times already :P ;)
http://www.4homepages.de/forum/index.php?topic=3378.0
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline ch€ri{Bi}²

  • Sr. Member
  • ****
  • Posts: 315
  • A PRoBLeM wIthOUt SoLuTioN Is NoT rEAllY a PRoBLeM
    • View Profile
    • Pat's Gallery
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #21 on: June 05, 2005, 09:11:31 PM »
There is a modification which would be interesting for this mod:

 :?: on the page, could we have a form where the users can ask to receive a mail when the site will open?

 :arrow:  :arrow: The user can leave his login (registered users) or his address mail (others) and as soon as the site will pass in maintenance OFF, the user will receive a mail which says:
You receive this mail because you asked to be warned : The site "what-ever-u-want.com" is on-line...

Thank you in advance for your answers.
ch€ri{Bi}²


Offline kief24

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #22 on: October 15, 2005, 05:51:07 PM »
i installed the mod and nothing happens.
I checked the steps, no mistake is made.

I can see the option in ACP. When i put the button on "yes"  ( "put the maintenance page on" ), and save the settings, after the saving the button is put to "no" again.
And when i go to the site nothing happens, even if i log out as administrator.

strange

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #23 on: October 15, 2005, 08:41:27 PM »
Seems like you didnt do the first step: database update.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline kief24

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #24 on: October 20, 2005, 12:27:55 PM »

Hi,

open

install_MainP.php

and find

Code: [Select]
<form action="install_mainp.php" name="form" method="post">
replace it with

Code: [Select]
<form action="install_MainP.php" name="form" method="post">

Save, Upload and Test It.....

now it works....

Offline Nasser

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #25 on: October 27, 2005, 11:36:00 AM »
wonderful MOD ... thanks alot

Offline marius26

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://www.steves-network.net
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #26 on: November 06, 2005, 02:23:32 AM »
use notepad for this

Code: [Select]
<?php

define
('ROOT_PATH''./');
include(
ROOT_PATH.'config.php');
include(
ROOT_PATH.'global.php');
include(
ROOT_PATH.'includes/constants.php');
require(
ROOT_PATH.'includes/sessions.php');

$error_log = array();
$error_msg "";

if (
$action == "modinstall") {

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
  <link rel="stylesheet" href="admin/cpstyle.css">
  <title>4images Installer</title>
</head>
<body leftmargin="20" topmargin="20" marginwidth="20" marginheight="20" bgcolor="#FFFFFF">
  <table cellpadding="0" cellspacing="0" border="0" width="500" align="center">
    <tr><td class="tableborder"><img src="admin/images/logo_installer.gif" width="500" height="45"><br />
        <table cellpadding="3" cellspacing="1" border="0" width="100%">
          <tr class="tablerow2"><td><b>MOD Maintenance Page</b>&nbsp;&nbsp;&nbsp;&nbsp;(by Fugaziman)</td></tr>
          <tr class="tablefooter"><td align="center">&nbsp;</td></tr>
  </table>
<table cellpadding="3" cellspacing="1" border="0" width="100%">
  <tr class="tablerow"><td colspan="2" align="right"></td></tr>
  <tr class="tablerow2"><td colspan="2"><br /><blockquote>
<?php
$date 
time();
$sql "INSERT INTO ".SETTINGS_TABLE." (setting_name, setting_value)
VALUES ('maintenance', '0')"
;
if (!
$site_db->query($sql)) {
  
$error_log[] = $sql;
}
if (empty(
$error_log)) { echo "<h4>Database update success!</h4>"; }
?>


  </blockquote></td></tr>
 <tr class="tablefooter"><td colspan="2">&nbsp;</td></tr>
        </table>
      </td>
    </tr>
  </table>
</table>
<p align="center"> Powered by <b>4images</b> <?php echo SCRIPT_VERSION ?><br />Copyright &copy; 2002 <a href="http://www.4homepages.de" target="_blank">4homepages.de</a>
</body>
</html>
<?php
exit;
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
  <link rel="stylesheet" href="admin/cpstyle.css">
  <title>4images Installer</title>
</head>
<body leftmargin="20" topmargin="20" marginwidth="20" marginheight="20" bgcolor="#FFFFFF">
<form action="install_mainp.php" name="form" method="post">

  <table cellpadding="0" cellspacing="0" border="0" width="500" align="center">
    <tr><td class="tableborder"><img src="admin/images/logo_installer.gif" width="500" height="45"><br />
        <table cellpadding="3" cellspacing="1" border="0" width="100%">
          <tr class="tablerow2"><td><b>MOD Maintenance Page</b>&nbsp;&nbsp;&nbsp;&nbsp;(by Fugaziman)</td></tr>
          <tr class="tablefooter"><td align="center">&nbsp;</td></tr>
  </table>
<table cellpadding="3" cellspacing="1" border="0" width="100%">
  <tr class="tablerow"><td colspan="2" align="right"></td></tr>
  <tr class="tablerow2"><td colspan="2"><center>
  This script will modify your 4images database, so please<br><b>
  <font color="#FF0000">ALWAYS BACKUP YOUR DATABASE BEFORE RUNNING THIS MOD!</b></font><br><br>
  Please check out all fields shown below.<br>
  If they do not correspond to your settings, please<br><b>DO NOT START INSTALLER</b>!
  </center></td></tr>
  <tr class="tableheader"><td colspan="2"><b><span class="tableheader">Database configuration</span></b></td></tr>
  <tr class="tablerow"><td>Database server type</td><td><?php echo $db_servertype?></td></tr>
  <tr class="tablerow2"><td>Database server hostname</td><td><?php echo stripslashes($db_host); ?></td></tr>
  <tr class="tablerow"><td>Database name</td><td><?php echo stripslashes($db_name); ?></td></tr>
  <tr class="tablerow2"><td>Prefix for tables in database</td><td><?php echo stripslashes($table_prefix); ?></td></tr>
  <tr class="tablefooter"><td colspan="2"><center><input type="hidden" name="action" value="modinstall"><input type="submit" value="Start modify database" class="button" name="submit"></center></td></tr>
        </table>
      </td>
    </tr>
  </table>
</form>
<p align="center"> Powered by <b>4images</b> <?php echo SCRIPT_VERSION ?><br />Copyright &copy; 2002 <a href="http://www.4homepages.de" target="_blank">4homepages.de</a>
</body>
</html>

save it as "install_mainp.php" make sure "Save as type" says "All Files
then upload it to your 4images root and run it, then follow instructions made by the author, of this script.

Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #27 on: November 13, 2005, 06:27:43 PM »
Hello,

i have a little Problem with this Mod. I have install it for a few weeks and now it works but today it doesn´t.

I have put the code into the page_header.php to have the effect at all sites. But when i go to the index.php i become a blank page. When i go to another page (details.php) it works and say me that the site is closed...

Have anyone an idea???
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline ch€ri{Bi}²

  • Sr. Member
  • ****
  • Posts: 315
  • A PRoBLeM wIthOUt SoLuTioN Is NoT rEAllY a PRoBLeM
    • View Profile
    • Pat's Gallery
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #28 on: November 13, 2005, 11:42:22 PM »
i have a little Problem with this Mod. I have install it for a few weeks and now it works but today it doesn´t.

 :?: did you follow these original instructions exactly?

:arrow: Now you have a choice....
If you want this to work when someone first comes to your site then
Edit Index.php
Find
$user_access = get_permission();

Add After
Code: [Select]
//-----------------------------------------------------
//--- Maintenance      --------------------------------
//-----------------------------------------------------
$maintenance = $config['maintenance'];
$redirect_url = TEMPLATE_PATH."/maintenance.html";
if ($maintenance){
  header("Location: ".$site_sess->url($redirect_url, "&"));
  exit;
}

//-----------------------------------------------------
//--- End of Maintenance      -------------------------
//-----------------------------------------------------

or if you want it to work for every page then ..
Edit page_header.php
Find
Code: [Select]
if (!defined('ROOT_PATH')) {
  die("Security violation");
}
and insert the code above just below it.

 :?: since this first installation, did you install some other MOD?
ch€ri{Bi}²


Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: [Mod] Maintenance Page - Set from Admin Control panel
« Reply #29 on: November 14, 2005, 09:48:36 AM »
Quote
since this first installation, did you install some other MOD?

Yes, i have but i don´t now which :( i have installed many mods since i installed this mod...

And i have put the code into the page_header.php that it wirks on all pages. And now it work on all pages but not on the index.php
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-