Jump to content
Sign in to follow this  
Farrukh

[Contribution Update] Down for Maintenance v1.1 for MS 2.2

Recommended Posts

Hi all

 

Just updated the contribution to work on Milestone 2.2.

 

Its working fine on my cart.

Share this post


Link to post
Share on other sites

Hate to be the bad guy but I am not able to get the contro going. I am using MS2. And I am getting an error with application_top and currencies here is the error

 

 

Parse error: parse error in /home/sites/site8/web/osc/catalog/includes/classes/currencies.php on line 52

 

Fatal error: Cannot instantiate non-existent class: currencies in /home/sites/site8/web/osc/catalog/includes/application_top.php on line 258

. This was after the install. I am going to keep it there for a little while in the hopes some knows what I did wrong.

 

kmcar :D

Share this post


Link to post
Share on other sites

In your Readme it says:

 

Go to the Admin ... Configuration ... My Store ... Down for Maintenance

 

...which is not quite correct, it's at Admin ... Configuration ... Website Maintenance

 

No biggie, but it took me a while to find this, after first wondering where it is and double checking the changes I had made as described in the readme.


This space for rent

Share this post


Link to post
Share on other sites

Nice contribution, sorry I forgot to say that previously. Thx a bunch :wink:

 

Oh one more thing: in header.php it says tep_output_warning( twice, this gives me an error message on 2.2 ms2. I think it should say tep_output_string( ,

at least it works for me that way.

 

cheers,

Peter


This space for rent

Share this post


Link to post
Share on other sites

Right, very useful idea! Thanks!

 

but... ;-)

 

> Oh one more thing: in header.php it says tep_output_warning( twice, this gives me an error message on 2.2 ms2. I think it should say tep_output_string( ,

> at least it works for me that way

 

Okay, I notice this think me too (replace tep_output_warning with tep_output_string) but tep_output_string returns nothing at all!

 

This will return null chain:

tep_output_string(TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE);

 

and this will work well:

echo TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE;

 

I think it's not very "osCommerce's way" to do thinks, but I don't understand why tep_output_string doesn't work with me ?

 

The strings are :

TEXT_BEFORE_DOWN_FOR_MAINTENANCE = "AVERTISSEMENT : Le site sera ferm? pour maintenance dans la p?riode du "

PERIOD_BEFORE_DOWN_FOR_MAINTENANCE = "28/07/2003 01h -> 02h"

 

If anybody have any explication, it'll be appreciated :-)

 

(sorry for my bad english...)

Share this post


Link to post
Share on other sites

I am getting this error in my catalog when I turn down for maint. on

 

 

Fatal error: Call to undefined function: tep_output_warning() in /includes/header.php on line 44

 

 

Any ideas?

Share this post


Link to post
Share on other sites

msheno01,

 

not to sound rude or anything, but just two posts above yours is a description of and the solution to your problem - did you miss it?

Oh one more thing: in header.php it says tep_output_warning( twice, this gives me an error message on 2.2 ms2. I think it should say tep_output_string( at least it works for me that way.

 

...in other words, replace any occurances of tep_output_warning with tep_output_string in header.php, and everything should work out fine. 8)

 

cheers,

Peter


This space for rent

Share this post


Link to post
Share on other sites

No offense taken at all. I did miss that reply.

 

I'll try the fix right away. I guess I need new glasses...

 

 

Thanks

Share this post


Link to post
Share on other sites

i just installed it, but now my catalog is not working and the sql file is wrong... i keep getting

Fehler 

SQL-Befehl: 



INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','<B>Down for Maintenance: ON/OFF</B>', 'DOWN_FOR_MAINTENANCE', 'false', 'Down for Maintenance <br>(true=on false=off)', '16', '1', 'tep_cfg_select_option(array('true', 'false'), ', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','Down for Maintenance: filename', 'DOWN_FOR_MAINTENANCE_FILENAME', 'down_for_maintenance.php', 'Down for Maintenance filename Default=down_for_maintenance.php', '16', '2', '', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','Down for Maintenance: Hide Header', 'DOWN_FOR_MAINTENANCE_HEADER_OFF', 'false', 'Down for Maintenance: Hide Header <br>(true=hide false=show)', '16', '3', 'tep_cfg_select_option(array('true', 'false'), ', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','Down for Maintenance: Hide Column Left', 'DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF', 'false', 'Down for Maintenance: Hide Column Left <br>(true=hide false=show)', '16', '4', 'tep_cfg_select_option(array('true', 'false'), ', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','Down for Maintenance: Hide Column Right', 'DOWN_FOR_MAINTENANCE_COLUMN_RIGHT_OFF', 'false', 'Down for Maintenance: Hide Column Right <br>(true=hide false=show)r', '16', '5', 'tep_cfg_select_option(array('true', 'false'), ', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','Down for Maintenance: Hide Footer', 'DOWN_FOR_MAINTENANCE_FOOTER_OFF', 'false', 'Down for Maintenance: Hide Footer <br>(true=hide false=show)', '16', '6', 'tep_cfg_select_option(array('true', 'false'), ', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','Down for Maintenance: Hide Prices', 'DOWN_FOR_MAINTENANCE_PRICES_OFF', 'false', 'Down for Maintenance: Hide Prices <br>(true=hide false=show)', '16', '7', 'tep_cfg_select_option(array('true', 'false'), ', now(), NULL);



INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Down For Maintenance (exclude this IP-Address)', 'EXCLUDE_ADMIN_IP_FOR_MAINTENANCE', 'your IP (ADMIN)', 'This IP Address is able to access the website while it is Down For Maintenance (like webmaster)', 16, 8, '2003-03-21 13:43:22', '2003-03-21 21:20:07', NULL, NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'NOTIFY PUBLIC Before going Down for Maintenance: ON/OFF', 'WARN_BEFORE_DOWN_FOR_MAINTENANCE', 'false', 'Give a WARNING some time before you put your website Down for Maintenance<br>(true=on false=off)<br>If you set the 'Down For Maintenance: ON/OFF' to true this will automaticly be updated to false', 16, 9, '2003-03-21 13:08:25', '2003-03-21 11:42:47', NULL, 'tep_cfg_select_option(array('true', 'false'),')

MySQL meldet: You have an error in your SQL syntax near '; INSERT INTO configuration (configuration_id, configuration_title, configurati' at line 1

the problem is i aint got a clou of sql and cant find what is wrong !!!

anybody help please !!!

 

Regards John

Share this post


Link to post
Share on other sites

Hi

 

Is it possible to define more than one ip-adress for a admin access,

or instead of an ip-address a domain. Have some one the same wishes as I?

 

I'm not so familiary with php development. Can some one help me?

 

Thanks

Laurent

Share this post


Link to post
Share on other sites
i just installed it, but now my catalog is not working and the sql file is wrong... i keep getting
Fehler 

SQL-Befehl: 



INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','<B>Down for Maintenance: ON/OFF</B>', 'DOWN_FOR_MAINTENANCE', 'false', 'Down for Maintenance <br>(true=on false=off)', '16', '1', 'tep_cfg_select_option(array('true', 'false'), ', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','Down for Maintenance: filename', 'DOWN_FOR_MAINTENANCE_FILENAME', 'down_for_maintenance.php', 'Down for Maintenance filename Default=down_for_maintenance.php', '16', '2', '', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','Down for Maintenance: Hide Header', 'DOWN_FOR_MAINTENANCE_HEADER_OFF', 'false', 'Down for Maintenance: Hide Header <br>(true=hide false=show)', '16', '3', 'tep_cfg_select_option(array('true', 'false'), ', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','Down for Maintenance: Hide Column Left', 'DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF', 'false', 'Down for Maintenance: Hide Column Left <br>(true=hide false=show)', '16', '4', 'tep_cfg_select_option(array('true', 'false'), ', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','Down for Maintenance: Hide Column Right', 'DOWN_FOR_MAINTENANCE_COLUMN_RIGHT_OFF', 'false', 'Down for Maintenance: Hide Column Right <br>(true=hide false=show)r', '16', '5', 'tep_cfg_select_option(array('true', 'false'), ', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','Down for Maintenance: Hide Footer', 'DOWN_FOR_MAINTENANCE_FOOTER_OFF', 'false', 'Down for Maintenance: Hide Footer <br>(true=hide false=show)', '16', '6', 'tep_cfg_select_option(array('true', 'false'), ', now(), NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function) VALUES ('','Down for Maintenance: Hide Prices', 'DOWN_FOR_MAINTENANCE_PRICES_OFF', 'false', 'Down for Maintenance: Hide Prices <br>(true=hide false=show)', '16', '7', 'tep_cfg_select_option(array('true', 'false'), ', now(), NULL);



INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Down For Maintenance (exclude this IP-Address)', 'EXCLUDE_ADMIN_IP_FOR_MAINTENANCE', 'your IP (ADMIN)', 'This IP Address is able to access the website while it is Down For Maintenance (like webmaster)', 16, 8, '2003-03-21 13:43:22', '2003-03-21 21:20:07', NULL, NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'NOTIFY PUBLIC Before going Down for Maintenance: ON/OFF', 'WARN_BEFORE_DOWN_FOR_MAINTENANCE', 'false', 'Give a WARNING some time before you put your website Down for Maintenance<br>(true=on false=off)<br>If you set the 'Down For Maintenance: ON/OFF' to true this will automaticly be updated to false', 16, 9, '2003-03-21 13:08:25', '2003-03-21 11:42:47', NULL, 'tep_cfg_select_option(array('true', 'false'),')

MySQL meldet: You have an error in your SQL syntax near '; INSERT INTO configuration (configuration_id, configuration_title, configurati' at line 1

 

the problem is i aint got a clou of sql and cant find what is wrong !!!

anybody help please !!!

 

Regards John

 

Did you read the Readme file. You have to replace ' 16' with any number greater in your configuration.

 

Just try out 700

Share this post


Link to post
Share on other sites
Did you read the Readme file. You have to replace ' 16' with any number greater in your configuration.

 

Just try out 700

 

you mean, change alle "16" in sql change to 700?

 

Regards John

 

 

________________________________________________

Im a bug for life :rolleyes:

Share this post


Link to post
Share on other sites

Hey,

 

I installed the mod but when I click on Website Maintinance in the configuration menu Nothing shows in that screen except a bar that says:

 

WEBSITE MAINTINENCE

Title Value Action

-----------------------------------------------------------------------------------'

 

Then nothing. What did I do wrong?!?!

 

HELP!!

 

Thanks

Kevin :huh:


Kevin Rosenthal

Share this post


Link to post
Share on other sites
I installed the mod but when I click on Website Maintinance in the configuration menu Nothing shows in that screen except a bar that says:

WEBSITE MAINTINENCE

Title Value Action

Hello again,

 

I found the missing choices. They are in Family Products v 3.0 option in the Configuration box on the left side on the Admin Control Panel. How do I get them to show under the Website Maintenance option which is last in the configuration box??? Ahhhhhhh Help Me!!

 

 

Thanks,

Kevin


Kevin Rosenthal

Share this post


Link to post
Share on other sites

Never Mind.

 

I went into the database table and removed the entries from them and altered the sql file by replacing the 16 with 714 and re-ran the sql file. Everything is now where it should be and I hope it all works. ;-)

 

Thanks and sorry to be such a pain.

 

Kevin


Kevin Rosenthal

Share this post


Link to post
Share on other sites

I can't this this to install. I get the fatal error tep_output_warning

 

I tried to change that to output_string, but get a parse error

ams I supposed to change to echo also or no?

 

there is nothing in readme that says to change the 16 to a larger number like 700. can someone explain why I should do this?

 

I tried a combination of each/all of these, but no luck

Share this post


Link to post
Share on other sites

Ive got a bit of a weird problem in that while the down for maintenance script is working well, it also locks me out of the admin and returns me to the down_for_maintenance.php file.

 

I'll assume this is because i run my admin folder inside my store...

 

or atleast thats the only reason i can think off

 

anyone else experienced the same problem?

Share this post


Link to post
Share on other sites

If you have already installed and getting the undefined error

in catalog/includes/application_top.php

 

use

// BOF: Down for Maintenance except for admin ip

if (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE != getenv('REMOTE_ADDR')){

if (DOWN_FOR_MAINTENANCE=='true' and !strstr($PHP_SELF,DOWN_FOR_MAINTENANCE_FILENAME)) { tep_redirect(tep_href_link(DOWN_FOR_MAINTENANCE_FILENAME)); }

}

// do not let people get to down for maintenance page if not turned on

if (DOWN_FOR_MAINTENANCE=='false' and strstr($PHP_SELF,DOWN_FOR_MAINTENANCE_FILENAME)) {

tep_redirect(tep_href_link(FILENAME_DEFAULT));

}

// EOF: WebMakers.com Added: Down for Maintenance

 

instead of what you have between the BOF and EOF for Down for Maintenance.

 

This code was pulled out of Down For Maintenance 1.2b


If it weren't for tweakers, I would not have a job.

Share this post


Link to post
Share on other sites

Just wondering if any one that uses this now, that knows programing, would like a small feature that would be nice.

 

I would think it shouldnt be to hard, but i dont know any of it at all, so i have the ideal,, and need someone to help with it.

 

in this mod, you can set your ip address, so you can still access the site for testing.

 

I was wondering if,, there is a way to take a snipit of code, from another mod,, ,,

who's online enhancements, that detects your ip address,, and have it update u'r address instead of you having to find it and put it in, this would help ppl who's ip address changes.

each time you set down for maint, to true,, have it check the ip address,, and update itself,,,

 

??

 

anyone think it can be done,,

 

the whos online mod is

 

http://www.oscommerce.com/community/contributions,824


no bugs in my stuff,,, just random features ;)

Share this post


Link to post
Share on other sites
in this mod, you can set your ip address, so you can still access the site for testing

 

I believe this has already been done. I can't remember where I got it from but here is what it does.

 

I click true on the Down for maint section, and it automatically updated my ip. Now when I go to my website i can still browse and purchase, but the little red area accross the top says my site is currently set to down for maint to the public.

I do not have to type my ip in at all.

 

Is this what your looking for? If so, I might be able to look over my code in the next few days if no one else knows where to find it. Not sure how much time I will have.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×