ksaun Posted May 5, 2005 Share Posted May 5, 2005 Hey All, :D I'm trying to install the Center Store Contrib, I got the Header and Footer PHP files updated. But when I try to import the Configuration file using the MyphpAdmin I get this error. "DROP DATABASE" statements are disabled. Any Idea what is wrong and how to fix it or work around it? :blink: Thanks :thumbsup: My Favorite Quote from a movie. Question: How do you know women sooo well? Answer: I think of a man, then take away reason and accountability. Link to comment Share on other sites More sharing options...
FalseDawn Posted May 5, 2005 Share Posted May 5, 2005 What on earth is a "drop database" statement doing in an update script? You're lucky they are disabled, or you would have waved goodbye to your database. I'd check the update script very carefully. If you're not sure about it, post the script here and let's take a look at it. Link to comment Share on other sites More sharing options...
ksaun Posted May 5, 2005 Author Share Posted May 5, 2005 What on earth is a "drop database" statement doing in an update script?You're lucky they are disabled, or you would have waved goodbye to your database. I'd check the update script very carefully. If you're not sure about it, post the script here and let's take a look at it. <{POST_SNAPBACK}> Here are the instructions for the Center SHop contrib I am using. osC-CenterShop v3.0 for MS2 Released under the GNU General Public License ================================================================================ ================== ########## ChangeLog ########### 02/26/2004 v3.0 Re-corrected an oops that didn't get uploaded in my last theoretical correction. Again, added a few more admin controls, as well as cleaned up and reorganized. by (Islander2u) Eric Montgomery - [email protected] 10/20/2003 v2.2 for MS2 Corrected typo that prevented header image and link from appearing. Added a few more admin controlls (border with, cell padding, cell spaceing) by (Islander2u) Eric Montgomery 8/26/2003 updated and re-released as osC-Centershop v2.1 for MS2 by Hans Loos - [email protected] - modified and updated contribution to easily turn on/of Centershop via Admin (configuration/centershop) 8/21/2003 updated and re-released as osC-CenterShop v1.1 for MS2 by (ugottasalsa) Randy Newman - [email protected] - modified and updated contribution to easily integrate into MS2 - added centershop_settings.txt which is a reference document that contains the definitions of all settings and what they are used for. - modified and updated README.TXT 8/19/2002 originally released as Center Shop v1.0 by Linda McGrath - [email protected] ================================================================================ ================== Thank you to Linda McGrath <[email protected]>, for her original contribution. Full credit for this contribution goes to her, Thanks to Randy Newman for his modification of CenterShop, I have just simplified it ! ================================================================================ ================== Please read carefully and backup your files before adding ANY contribution! This contribution will do the following... 1. Quick centering of your store 2. Resize to fit to 800x600 resolution 3. Add a Background Color around the store. 4. You can also define your header image, alt tag, and link. ================================================================================ ================== CHANGED FILES: /catalog/includes/header.php /catalog/includes/footer.php FILES TO ADD: configuration.sql ================================================================================ ================== INSTALLATION: 1. Upload the HEADER.PHP and FOOTER.PHP files to the /catalog/includes directory. DO NOT overwrite these files! Simply rename the existing files to HEADER.OLD and FOOTER.OLD, then copy the new files in their place. If you have made modifications to your header.php file, just integrate the changes. I labeled the changes as clearly as possible in the files. When you are satisfied with the install of this contribution, then you can remove the .OLD files permenantly. 2. By using phpMyAdmin import the configuration.sql file 3. Go to the Admin section of your shop, configuration -> Center shop 4. Play and see, have fun ! ================================================================================ ================== That's it. Go look at your store and see what you have done! :o) All I was trying to do is import the configuration.sql file to the database as directed. I don't have a viewer that will allow me to open the .sql file to view its contents. To do this I opened MyphpAdmin, selected SQL Query Window, selected import Files, Selected the Location of the text file, selected the web-server upload directory (there was only one to choose from) and then selected GO! Am I doing something wrong? :blink: My Favorite Quote from a movie. Question: How do you know women sooo well? Answer: I think of a man, then take away reason and accountability. Link to comment Share on other sites More sharing options...
FalseDawn Posted May 5, 2005 Share Posted May 5, 2005 A .sql file is just plain text. Open it in notepad and post the contents. Link to comment Share on other sites More sharing options...
Guest Posted May 5, 2005 Share Posted May 5, 2005 http://www.oscommerce.com/community/contri...all/search,easy Just use this, no database involved, insertion of one line of code: Dead Easy Center Thingy Link to comment Share on other sites More sharing options...
Guest Posted May 5, 2005 Share Posted May 5, 2005 your best bet, your getting close to wrecking your store :) Link to comment Share on other sites More sharing options...
ksaun Posted May 5, 2005 Author Share Posted May 5, 2005 your best bet, your getting close to wrecking your store :) <{POST_SNAPBACK}> OK I used the contrib you suggested, but I can't seem to change the color of the background on either side of my store. I can change the background of the store itself and the size and color of the border, but not the empty space on either side. Any Ideas? :huh: Also the Footer is not centered like the rest of the store. :blink: My Favorite Quote from a movie. Question: How do you know women sooo well? Answer: I think of a man, then take away reason and accountability. Link to comment Share on other sites More sharing options...
ksaun Posted May 5, 2005 Author Share Posted May 5, 2005 OK SC, Here is the code in the SQL file. :thumbsup: INSERT INTO configuration_group VALUES (16, 'Center Shop', 'Center Shop Module Integration', 16, 1); INSERT INTO configuration VALUES (200, 'Center Shop on/off', 'CENTER_SHOP_ON', 'on', 'Turn on/off CenterShop.', 16, 1, '2004-02-25 14:34:58', '2004-02-25 14:34:58', NULL, 'tep_cfg_select_option(array(\'on\', \'off\'),'); INSERT INTO configuration VALUES (201, 'Shop width', 'CENTER_SHOP_WIDTH', '760', 'Shop Width.', 16, 2, '2004-02-25 14:34:58', '2004-02-25 14:34:58', NULL, NULL); INSERT INTO configuration VALUES (202, 'Padding outside of shop.', 'CENTER_SHOP_PADDING', '10', 'Table Cellpadding', 16, 3, '2004-02-25 14:34:58', '2004-02-25 14:34:58', NULL, NULL); INSERT INTO configuration VALUES (203, 'Outer background color.', 'CENTER_SHOP_BACKGROUND_COLOR_OUT', 'DFDFDF', 'Outer background color.', 16, 4, '2004-02-25 14:34:58', '2004-02-25 14:34:58', NULL, NULL); INSERT INTO configuration VALUES (204, 'Border thickness.', 'CENTER_SHOP_BORDER', '1', 'Border thickness.', 16, 5, '2004-02-25 14:34:58', '2004-02-25 14:34:58', NULL, NULL); INSERT INTO configuration VALUES (205, 'Border Color.', 'CENTER_SHOP_BORDERCOLOR', '000000', 'Border Color.', 16, 6, '2004-02-25 14:34:58', '2004-02-25 14:34:58', NULL, NULL); INSERT INTO configuration VALUES (206, 'Thickness of cell walls', 'CENTER_SHOP_CELLSPACING', '0', 'cellspacing', 16, 7, '2004-02-25 14:34:58', '2004-02-25 14:34:58', NULL, NULL); INSERT INTO configuration VALUES (207, 'Padding inside of cells.', 'CENTER_SHOP_CELLPADDING', '5', 'cellpadding', 16, 8, '2004-02-25 14:34:58', '2004-02-25 14:34:58', NULL, NULL); INSERT INTO configuration VALUES (208, 'Background color on/off', 'CENTER_SHOP_BACKGROUND_ON', 'on', 'Use Backgroundcolor?', 16, 9, '2004-02-25 14:34:58', '2004-02-25 14:34:58', NULL, 'tep_cfg_select_option(array(\'on\', \'off\'),'); INSERT INTO configuration VALUES (209, 'Color between border & shop.', 'CENTER_SHOP_BACKGROUND_COLOR', 'FFFFFF', 'Cellpadding Color', 16, 10, '2004-02-25 14:34:58', '2004-02-25 14:34:58', NULL, NULL); Let me know what you think SC. Thanks My Favorite Quote from a movie. Question: How do you know women sooo well? Answer: I think of a man, then take away reason and accountability. Link to comment Share on other sites More sharing options...
FalseDawn Posted May 5, 2005 Share Posted May 5, 2005 That looks fine. I have no idea where the drop database came from - maybe you tried to upload the wrong file by accident? Your best bet is just to do a ctrl-c on the whole lot, then ctrl-v into the execute SQL window in phpmyadmin. Link to comment Share on other sites More sharing options...
ksaun Posted May 5, 2005 Author Share Posted May 5, 2005 That looks fine. I have no idea where the drop database came from - maybe you tried to upload the wrong file by accident?Your best bet is just to do a ctrl-c on the whole lot, then ctrl-v into the execute SQL window in phpmyadmin. <{POST_SNAPBACK}> OK I did that and I get this: SQL-query: INSERT INTO configuration_group VALUES ( 16, 'Center Shop', 'Center Shop Module Integration', 16, 1 ) MySQL said: #1062 - Duplicate entry '16' for key 1 Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /var/hsphere/shared/apache/htdocs/phpMyAdmin-2.6.1-pl3/libraries/common.lib.php on line 685 Now what do I do?? :blink: My Favorite Quote from a movie. Question: How do you know women sooo well? Answer: I think of a man, then take away reason and accountability. Link to comment Share on other sites More sharing options...
FalseDawn Posted May 5, 2005 Share Posted May 5, 2005 First, see what's under ID16 in the configuration table - does the data look like 16, 'Center Shop', 'Center Shop Module Integration', 16, 1 ? Link to comment Share on other sites More sharing options...
ksaun Posted May 6, 2005 Author Share Posted May 6, 2005 First, see what's under ID16 in the configuration table - does the data look like 16, 'Center Shop', 'Center Shop Module Integration', 16, 1 ? <{POST_SNAPBACK}> I looked in the Configuration table but didn't see anything like what your talking about. So I looked in the configuration_group and there it was, just like you said. So know what do I do? :huh: My Favorite Quote from a movie. Question: How do you know women sooo well? Answer: I think of a man, then take away reason and accountability. Link to comment Share on other sites More sharing options...
FalseDawn Posted May 6, 2005 Share Posted May 6, 2005 sorry - I meant configuration_group. Now just look in the configuration table to see if you have entries for IDs in the range 200-209. If you don't then just run the script again MINUS the first insert statement (since that record is already there) If you do (say some other contrib has used those values), then you'll need to change the 200, 201, ... 209 values at the start of each insert statement to values that are not already in there - like 1000, 1001, 1002, .. 1009 (for example) Link to comment Share on other sites More sharing options...
ksaun Posted May 6, 2005 Author Share Posted May 6, 2005 sorry - I meant configuration_group. Now just look in the configuration table to see if you have entries for IDs in the range 200-209. If you don't then just run the script again MINUS the first insert statement (since that record is already there) If you do (say some other contrib has used those values), then you'll need to change the 200, 201, ... 209 values at the start of each insert statement to values that are not already in there - like 1000, 1001, 1002, .. 1009 (for example) <{POST_SNAPBACK}> That seemed to work, but the footer is still the full width of the screen, should I just go into the footer and change the code from this: <table border="0" width="[COLOR=blue]100%[/COLOR]" cellspacing="0" cellpadding="1"> <tr class="footer"> <td class="footer"> <?php echo strftime(DATE_FORMAT_LONG); ?> </td> <td align="right" class="footer"> <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?> </td> </tr> </table> <br> <table border="0" width="[COLOR=blue]100%[/COLOR]" cellspacing="0" cellpadding="0"> <tr> to this <table border="0" width="[COLOR=red]790[/COLOR]" cellspacing="0" cellpadding="1"> <tr class="footer"> <td class="footer"> <?php echo strftime(DATE_FORMAT_LONG); ?> </td> <td align="right" class="footer"> <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?> </td> </tr> </table> <br> <table border="0" width="[COLOR=red]790[/COLOR]" cellspacing="0" cellpadding="0"> <tr> or is ther something else I need to do? :blush: My Favorite Quote from a movie. Question: How do you know women sooo well? Answer: I think of a man, then take away reason and accountability. Link to comment Share on other sites More sharing options...
FalseDawn Posted May 6, 2005 Share Posted May 6, 2005 Follow the instrunctions provided with the contribution. Link to comment Share on other sites More sharing options...
ksaun Posted May 6, 2005 Author Share Posted May 6, 2005 Follow the instrunctions provided with the contribution. <{POST_SNAPBACK}> I did follow the directions, I added: <?php /////////////////// // [0001] WebMakers.com Added: Center Shop // This goes at the very end of the footer after all the tables /////////////////// if ( CENTER_SHOP_ON == 'on' ) { /////////////////// // [0001] close table used to center /////////////////// ?> </td></tr> </table> <?php if ( CENTER_SHOP_BACKGROUND_ON == 'on' ) { /////////////////// // [0001] Add color to bottom of screen for large displays - needed especially on notebooks that run at 1600x1200 // close table used for outer bgcolor around the shop /////////////////// ?> </td></tr> <tr><td height="150"> </td></tr> </table> <?php } } /////////////////// // [0001] EOF: WebMakers.com Added: Center Shop /////////////////// /////////////////// ?> to the very end of the footer.php so it looks like this: <?php /* $Id: footer.php,v 1.26 2003/02/10 22:30:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require(DIR_WS_INCLUDES . 'counter.php'); ?> <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="footer"> <td class="footer"> <?php echo strftime(DATE_FORMAT_LONG); ?> </td> <td align="right" class="footer"> <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?> </td> </tr> </table> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center" class="smallText"> <?php /* The following copyright announcement can only be appropriately modified or removed if the layout of the site theme has been modified to distinguish itself from the default osCommerce-copyrighted theme. For more information please read the following Frequently Asked Questions entry on the osCommerce support site: http://www.oscommerce.com/community.php/faq,26/q,50 Please leave this comment intact together with the following copyright announcement. */ echo FOOTER_TEXT_BODY ?> </td> </tr> </table> <?php if ($banner = tep_banner_exists('dynamic', '468x50')) { ?> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center"><?php echo tep_display_banner('static', $banner); ?></td> </tr> </table> <?php } ?> <?php /////////////////// // [0001] WebMakers.com Added: Center Shop // This goes at the very end of the footer after all the tables /////////////////// if ( CENTER_SHOP_ON == 'on' ) { /////////////////// // [0001] close table used to center /////////////////// ?> </td></tr> </table> <?php if ( CENTER_SHOP_BACKGROUND_ON == 'on' ) { /////////////////// // [0001] Add color to bottom of screen for large displays - needed especially on notebooks that run at 1600x1200 // close table used for outer bgcolor around the shop /////////////////// ?> </td></tr> <tr><td height="150"> </td></tr> </table> <?php } } /////////////////// // [0001] EOF: WebMakers.com Added: Center Shop /////////////////// /////////////////// ?> I even turned off the center store in admin control panel and turned it back on and resaved the footer but I still get this: My Webpage Any ideas? :blush: Thanks for all your help by the way :thumbsup: My Favorite Quote from a movie. Question: How do you know women sooo well? Answer: I think of a man, then take away reason and accountability. Link to comment Share on other sites More sharing options...
ksaun Posted May 9, 2005 Author Share Posted May 9, 2005 Can Anyone tell me how to fix this?? :huh: My Favorite Quote from a movie. Question: How do you know women sooo well? Answer: I think of a man, then take away reason and accountability. Link to comment Share on other sites More sharing options...
♥Vger Posted May 9, 2005 Share Posted May 9, 2005 I don't know why anyone would need to do all that just to center your website on the page. Look below my name for 'Fixed Width Site With CSS'. It involves three (very) minor changes, one to the header, one to the footer, and one in stylesheet.css - all done! It works with IE 6, Firefox, Mozilla, Opera and Safari browsers. Make sure you remove any other 'center' code you've already put in place. Vger Link to comment Share on other sites More sharing options...
ksaun Posted May 9, 2005 Author Share Posted May 9, 2005 I don't know why anyone would need to do all that just to center your website on the page. Look below my name for 'Fixed Width Site With CSS'. It involves three (very) minor changes, one to the header, one to the footer, and one in stylesheet.css - all done! It works with IE 6, Firefox, Mozilla, Opera and Safari browsers. Make sure you remove any other 'center' code you've already put in place. Vger <{POST_SNAPBACK}> Thanks Vger, I'll give it a try. Is there any way the have a picture show up as the background instead of just a solid color? :huh: My Favorite Quote from a movie. Question: How do you know women sooo well? Answer: I think of a man, then take away reason and accountability. Link to comment Share on other sites More sharing options...
Guest Posted July 28, 2005 Share Posted July 28, 2005 Hi I've succesfully installed Center Shop v3.0, after getting some errors and changing INSERT INTO configuration_group VALUES (16, 'Center Shop', 'Center Shop Module Integration', 16, 1); to INSERT INTO configuration_group VALUES (116, 'Center Shop', 'Center Shop Module Integration', 116, 1); The shop is cenetered ok, but when I go to admin-configuration-center shop, nothing is there. I mean it says: Center Shop, but nothing more...What should it be there and how do I do it right? Thanks. Link to comment Share on other sites More sharing options...
Guest Posted July 28, 2005 Share Posted July 28, 2005 Sorry to bother...Solved it. Just needed to change everywhere to 116... Stupid me!:D Link to comment Share on other sites More sharing options...
HelleM Posted November 8, 2006 Share Posted November 8, 2006 Same here - Center page are working - but an ABSOLUTELY emty admin page??????? Helle :-((( Link to comment Share on other sites More sharing options...
HelleM Posted November 8, 2006 Share Posted November 8, 2006 oppppppss - did the exact same mistake *lol* should anybody else have this problem, remember to check that the number, whatever is avaible, is the same in this first line: INSERT INTO configuration_group VALUES (16, 'Center Shop', 'Center Shop Module Integration', 16, 1); Helle :-) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.