Guest Posted November 30, 2004 Share Posted November 30, 2004 I've searched thru a gazillion posts for this, so....I see lots of requests on how to change the language, the format, etc. But, I can't find anything that can help me change that xxx number of requests since July 19, 2003 on the bottom of my store's home-page :blink: . My website does show the current date on the left hand side of the footer, but I can't stand seeing that 'July 19, 2003' on the far right. I saw something about logging in as www.mywebsite.com/phpadmin.......but I don't have phpadmin capability. So....what file(s) do I need to edit to change that date? I don't care about changing the actual number of hits......just the date. I want it to read November 29, 2004. Thank You for your help! Link to comment Share on other sites More sharing options...
peterr Posted November 30, 2004 Share Posted November 30, 2004 Hi, The table used is called "counter" as follows: DROP TABLE IF EXISTS counter; CREATE TABLE counter ( startdate char(8), counter int(12) ); From memory, the osC code looks for the row, if not there (first time) adds the row at todays date. You can modify it via PhpMyAdmin. Peter Link to comment Share on other sites More sharing options...
peterr Posted November 30, 2004 Share Posted November 30, 2004 Hi, Oops, didn't read _all_ of your post. :D Hmm, without Phpmyadmin or similar, you are bound to write a small script to change the date. Might just see how to do it, ... hang on. Peter Link to comment Share on other sites More sharing options...
peterr Posted November 30, 2004 Share Posted November 30, 2004 Hi, _Completely_ untested, but I see no reason why it won't work (famous last words). Save this as counter_fix.php <?php /* $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); $counter_query = tep_db_query("select startdate, counter from " . TABLE_COUNTER); if (!tep_db_num_rows($counter_query)) { $date_now = date('Ymd'); tep_db_query("insert into " . TABLE_COUNTER . " (startdate, counter) values ('" . $date_now . "', '1')"); $counter_startdate = $date_now; $counter_now = 1; } else { //this will be true, you already have the row present $date_now = date('Ymd'); tep_db_query("update " . TABLE_COUNTER . " set startdate = '" . date_now . "'"); } ?> upload to your site, and run it. Peter Link to comment Share on other sites More sharing options...
Guest Posted November 30, 2004 Share Posted November 30, 2004 Good Lord, you work too hard, Peter! LOL! Alright.....this is where my I-have-no-clue-how-to-do-that speech comes in. I go to my cpanel and then.....what? What folder or directory do I put it in? Baby steps, please. Sorry for the trouble, I swear! Andrea Link to comment Share on other sites More sharing options...
peterr Posted November 30, 2004 Share Posted November 30, 2004 Hi Andrea, I'm assuming you have the script above, saved in a file called counter_fix.php If you don't, then please don't use the CPanel 'File Manager', or even the osCommerce 'file manager', use a good freebie like "Crimson Editor" (http://www.crimsoneditor.com/) Now you have the file saved. 1. Let's say your website is called htp://example.com 2. Upload the file counter_fix.php (via FTP) to your 'web root' path, which if you are using CPanel, would be: /home/someusername/public_html 3. Now run the script like this. htp://example.com/counter_fix.php Peter Link to comment Share on other sites More sharing options...
Guest Posted November 30, 2004 Share Posted November 30, 2004 LOL. Now my website is xxx since Wednesday 31 December, 1969. What now? Don't be frustrated. I am laughing. Andrea Link to comment Share on other sites More sharing options...
peterr Posted November 30, 2004 Share Posted November 30, 2004 Hi, That's what I get for not testing it. LOL This line ............... tep_db_query("update " . TABLE_COUNTER . " set startdate = '" . date_now . "'"); should be ........ tep_db_query("update " . TABLE_COUNTER . " set startdate = '" . $date_now . "'"); Peter Link to comment Share on other sites More sharing options...
Guest Posted November 30, 2004 Share Posted November 30, 2004 Perfect! You're a sweetheart! :thumbsup: Thank You so much for helping me! Andrea Link to comment Share on other sites More sharing options...
peterr Posted November 30, 2004 Share Posted November 30, 2004 Hi Andrea, Good that it worked. :) If you have CPanel, then usually PhpMyAdmin will not be 'visible', so to speak. There _should_ be an option like "MySQL databases" or similar from memory, select that, then right down the bottom of the form, there is a link to phpmyadmin. Peter Link to comment Share on other sites More sharing options...
Guest Posted November 30, 2004 Share Posted November 30, 2004 Hi Andrea, Good that it worked. :) If you have CPanel, then usually PhpMyAdmin will not be 'visible', so to speak. There _should_ be an option like "MySQL databases" or similar from memory, select that, then right down the bottom of the form, there is a link to phpmyadmin. Peter <{POST_SNAPBACK}> Thanks for the advice; I need all of the help I can get. Just curious: is it fair to say that if I run that program again on different days in the future.....it will update the date on the screen? Wicked thought but, just curious. Have a good night! Andrea Link to comment Share on other sites More sharing options...
peterr Posted November 30, 2004 Share Posted November 30, 2004 Hi, Yes, it will update the "footer date", to 'todays' date. Peter Link to comment Share on other sites More sharing options...
FreeBible.us Posted January 7, 2005 Share Posted January 7, 2005 I have read the whole page. 1. half-suggeston - to go to the contol Panel, My Admin and to counter table. THan What? 2. Half-ready fix and than fix to it, but not simply corrected and re-posted. It is some kind of game that I do not unserstand? Link to comment Share on other sites More sharing options...
peterr Posted January 7, 2005 Share Posted January 7, 2005 Hi, I have read the whole page. 1. half-suggeston - to go to the contol Panel, My Admin and to counter table. THan What? 2. Half-ready fix and than fix to it, but not simply corrected and re-posted. It is some kind of game that I do not unserstand? <{POST_SNAPBACK}> Some answers I hope. 1. Then click the EDIT icon, and update the value (usually with the GO button) 2. Huh ?? Peter Link to comment Share on other sites More sharing options...
FreeBible.us Posted January 7, 2005 Share Posted January 7, 2005 thank you for the priceless contribution. >>1. Then click the EDIT icon, and update the value (usually with the GO button) in Table: counter opend for editing I can see 3 Go buttons. Shell I press all 3 semountenously? Link to comment Share on other sites More sharing options...
boxtel Posted January 7, 2005 Share Posted January 7, 2005 thank you for the priceless contribution. >>1. Then click the EDIT icon, and update the value (usually with the GO button) in Table: counter opend for editing I can see 3 Go buttons. Shell I press all 3 semountenously? <{POST_SNAPBACK}> yes, those buttons are very sensitive, so all at the same time but carefully. Treasurer MFC Link to comment Share on other sites More sharing options...
FreeBible.us Posted January 7, 2005 Share Posted January 7, 2005 yes, those buttons are very sensitive, so all at the same time but carefully. <{POST_SNAPBACK}> Yes, according to Peter, I did just that! ;-) Link to comment Share on other sites More sharing options...
peterr Posted January 7, 2005 Share Posted January 7, 2005 Hi, thank you for the priceless contribution. <{POST_SNAPBACK}> You are welcome, and as you say, it was priceless, it didn't cost anything. :lol: >>1. Then click the EDIT icon, and update the value (usually with the GO button) in Table: counter opend for editing I can see 3 Go buttons. Shell I press all 3 semountenously? <{POST_SNAPBACK}> If you knew how many different flavours/versions of phpMyAdmin there were, and that the GO button may not even be in the same place from one version to another, or in some cases, not there at all, there may be then some understanding in the matter. We cannot 'see' what you can see in phpMyAdmin, therefore please construct the question in a more descriptive manner, and I'm sure more help will come your way. Peter Link to comment Share on other sites More sharing options...
peterr Posted January 7, 2005 Share Posted January 7, 2005 Yes, according to Peter, I did just that! ;-) <{POST_SNAPBACK}> Try the SQL tab, then .............. to set te counter to zero UPDATE counter SET counter=0; to increase it by 100 UPDATE counter SET counter=counter+100; to set it to 23,543 UPDATE counter SET counter=23543; But, please, don't ask what button to press. :lol: Peter Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.