Jump to content
lildog

Contribution Tracker

Recommended Posts

Good work Glen. I just got a chance install your update. Thank you very much.....

 

 

lildog

Share this post


Link to post
Share on other sites
Good work Glen. I just got a chance install your update. Thank you very much.....

 

 

lildog

 

Glad you liked it.

 

While looking through the RC2a release notes (I'm still running MS2), I found that the Javascript stuff is actually there, but the function is toggleDivBlock(), not toggleDivBlk(). I'm thinking about a couple of other features, so if I get to it, I may change the language files to match the RC2 function and make the Javascript in contrib tracker conditional, so it works correctly no matter which osC release one is using.

 

--Glen

Share this post


Link to post
Share on other sites

I am running RC2a and it still works so that part is ok...., the code is mostly the same......I am rebuilding a new shop to rc2a and it can get hairy trying to update the contribs for both versions......most eveyone is running ms2 still but it is only a matter of time. What do you mean by change the language files to match rc2 function?

 

 

 

Glad you liked it.

 

While looking through the RC2a release notes (I'm still running MS2), I found that the Javascript stuff is actually there, but the function is toggleDivBlock(), not toggleDivBlk(). I'm thinking about a couple of other features, so if I get to it, I may change the language files to match the RC2 function and make the Javascript in contrib tracker conditional, so it works correctly no matter which osC release one is using.

 

--Glen

Share this post


Link to post
Share on other sites
I am running RC2a and it still works so that part is ok...., the code is mostly the same......I am rebuilding a new shop to rc2a and it can get hairy trying to update the contribs for both versions......most eveyone is running ms2 still but it is only a matter of time. What do you mean by change the language files to match rc2 function?

 

Nevermind... I made an error in the release notes. The Javascript function I recreated was toggleDivBlock(), not toggleDivBlk(), as I stated in the comments. The one I created is a little different than the one in RC2, but it seems to work the same way. I'm actually a bit surprised that you didn't get an error about redeclaring a Javascript function. If you are running RC2 and get an error message, simply rip out the toggleDivBlock() function in contrib tracker.

 

--Glen

Share this post


Link to post
Share on other sites

yeah...no errors. that is weird. I am running a local server for my rebuild and it is a bit more forgiving than online servers. Probably a good idea to yank it. In the next version, whoever that may be, should put it in the docs. You mentioned a conditional.....you can detect which version can't you. Off hand you know what the define is for that?

 

lildog

Share this post


Link to post
Share on other sites

Hi all im new at this contrib` adds when its say In catalog/contrib_tracker.php you can uncomment the lines at the bottom of the script to receive an email ....... what dose it mean uncomment the lines ?

Thanks

Share this post


Link to post
Share on other sites
Hi all im new at this contrib` adds when its say In catalog/contrib_tracker.php you can uncomment the lines at the bottom of the script to receive an email ....... what dose it mean uncomment the lines ?

Thanks

 

It means that there is a section of PHP code in the referenced file that has been marked as comments by adding two slashes (//) at the beginning of each line. To turn those lines back into actual code, remove the double slashes from each of the lines and upload the file to your server. Do not remove the double slashes from the line that says "uncomment below to receive an email if any contribs need updating."

 

I'll make this easier in the next release. I have an idea or two on how to do it.

 

--Glen

Share this post


Link to post
Share on other sites

I added the contrib (version 1.7.12) to my store . When I enter a new contrib the dates of "Date Added to the store" and "last official update" are hussled when I click on the infobutton on the right in the admin, and also in my database. Any Idea why this is happening?

Edited by Clau123

Share this post


Link to post
Share on other sites

Thanks for the bug report Claudia, I have uploaded a new version. I apologize I did not add you in the credits..I am getting tired and just sapced it.

 

lildog

 

 

 

I added the contrib (version 1.7.12) to my store . When I enter a new contrib the dates of "Date Added to the store" and "last official update" are hussled when I click on the infobutton on the right in the admin, and also in my database. Any Idea why this is happening?

Share this post


Link to post
Share on other sites

Once again, very useful add-in...thanks.

 

I am updated to v1.7.13 and seem to be experiencing the following "non-documented features"

 

*Cannot edit the date added to store

 

*Comments are deleted when editing and entry

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for all the work you put into this useful contribution!

 

I installed the latest build today of 26 Nov 2008.

 

I'm on php 5 and MySQL 5.

 

fopen is not allowed.

 

curl is enabled.

 

allow_call_time_pass_reference = on.

 

I guess these settings would qualify for a successful install, yet I get an error message from admin/contrib_tracker.php saying: could not open XML input

Share this post


Link to post
Share on other sites

Hey and thanks for this cool contri.

I indstall the new today 1.7.13

But i get this error when i will opdate a contri from admin, when the url is the old one.

Fatal error: Call to a member function on a non-object in /admin/includes/functions/contrib_tracker.php on line 93

 

And the line in the php file is: (You don't need this line, it will update hole time, from old to new, and new to new, and the message will come.

$messageStack->add_session(MESSAGE_LINKCHANGE_SUCCESS, 'success');

 

Replace the line to, or delete it.

// $messageStack->add_session(MESSAGE_LINKCHANGE_SUCCESS, 'success');

 

I have translate this contri to danish again now. The update is the same as 1.6.13, but on danish.

Edited by TheExterminator

Share this post


Link to post
Share on other sites

Hey

when you will add a new contro, without a ID, but will manuel, you get this error:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

 

select contrib_osc_id from contrib_tracker where contrib_osc_id =

Share this post


Link to post
Share on other sites

This happens from time to time. Try it again.....and let me know the results.

 

lildog

 

 

Hi,

 

Thanks for all the work you put into this useful contribution!

 

I installed the latest build today of 26 Nov 2008.

 

I'm on php 5 and MySQL 5.

 

fopen is not allowed.

 

curl is enabled.

 

allow_call_time_pass_reference = on.

 

I guess these settings would qualify for a successful install, yet I get an error message from admin/contrib_tracker.php saying: could not open XML input

Share this post


Link to post
Share on other sites
Hey

when you will add a new contro, without a ID, but will manuel, you get this error:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

 

select contrib_osc_id from contrib_tracker where contrib_osc_id =

I just checked and found that my v1.7.13 is also giving this error when manual entry is attempted.

Share this post


Link to post
Share on other sites
I just checked and found that my v1.7.13 is also giving this error when manual entry is attempted.

 

I have a fix for this. (I introduced the bug when I added the check for duplicate entries.) I will post an update today to fix this problem, as well as the other error reported by TheExterminator that occurs when updating a record that uses the old contribution site.

 

I also have a fix for the "date added to store" editing issue, but cannot duplicate the "comments deleted" problem. Additional information would be helpful.

 

--Glen

Share this post


Link to post
Share on other sites
I also have a fix for the "date added to store" editing issue, but cannot duplicate the "comments deleted" problem. Additional information would be helpful.

 

--Glen

Hi Glen,

 

When I open an existing contribution entry to edit it, the edit view opens with a blank comments field. If I save the edit with the blank field, the comment is erased. For now, I must copy my comment text before performing an edit and then paste it in to the blank comment field before saving my edit.

Share this post


Link to post
Share on other sites
Hi Glen,

 

When I open an existing contribution entry to edit it, the edit view opens with a blank comments field. If I save the edit with the blank field, the comment is erased. For now, I must copy my comment text before performing an edit and then paste it in to the blank comment field before saving my edit.

 

This is odd. It works here. What server? PHP version? Is register_globals on or off?

 

--Glen

Share this post


Link to post
Share on other sites

I just posted v1.7.14 of Contribution Tracker with the following fixes:

 

+ Several bug fixes in insert routine for correct processing of non-osCommerce support site contributions

+ date added can now be edited

+ clears sID on page change

+ Fixed bug in function old_to_new_url() that caused a crash

+ Created new 'check all' buttons in both English and Danish

+ Includes Danish language file contributed by TheExterminator

 

Thanks to all who reported problems.

 

--Glen

Share this post


Link to post
Share on other sites

1146 - Table '*******.TABLE_CONTRIB_TRACKER' doesn't exist

 

UPDATE TABLE_CONTRIB_TRACKER SET status ='0', contr_last_modified = '2008-11-28 17:48:07' where contrib_name = 'Contribution Tracker' and last_update < '2008-11-28 17:48:07'

 

[TEP STOP]

 

 

I work find, than i have installed SPPC 4.2.2 i overwrite in the admin and in the catalog the files (filnames.php, database_tables.php).

Than i follow the instructions again to paste the:

 

// START - Contrib Tracker
 define('TABLE_CONTRIB_TRACKER','contrib_tracker');
// END - Contrib Tracker

 

and i have this error. I install the SQL again but nothing, what can i do?

 

Thank you.

Share this post


Link to post
Share on other sites

have it sorry, i dont have in database_tables.php the:

 

// START - Contrib Tracker

define('TABLE_CONTRIB_TRACKER','contrib_tracker');

// END - Contrib Tracker

Share this post


Link to post
Share on other sites

Hi,

I install V1.7.14 on Localhost not online, and I get this error:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\AppServ\www\osc\includes\filenames.php:68) in C:\AppServ\www\osc\includes\functions\sessions.php on line 102

 

session.php

<?php
/*
 $Id: sessions.php 1830 2008-01-30 00:58:21Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2008 osCommerce

 Released under the GNU General Public License
*/

 if ( (PHP_VERSION >= 4.3) && ((bool)ini_get('register_globals') == false) ) {
   @ini_set('session.bug_compat_42', 1);
   @ini_set('session.bug_compat_warn', 0);
 }

 if (STORE_SESSIONS == 'mysql') {
   if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {
     $SESS_LIFE = 1440;
   }

   function _sess_open($save_path, $session_name) {
     return true;
   }

   function _sess_close() {
     return true;
   }

   function _sess_read($key) {
     $value_query = tep_db_query("select value from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "' and expiry > '" . time() . "'");
     $value = tep_db_fetch_array($value_query);

     if (isset($value['value'])) {
       return $value['value'];
     }

     return '';
   }

   function _sess_write($key, $val) {
     global $SESS_LIFE;

     $expiry = time() + $SESS_LIFE;
     $value = $val;

     $check_query = tep_db_query("select count(*) as total from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'");
     $check = tep_db_fetch_array($check_query);

     if ($check['total'] > 0) {
       return tep_db_query("update " . TABLE_SESSIONS . " set expiry = '" . tep_db_input($expiry) . "', value = '" . tep_db_input($value) . "' where sesskey = '" . tep_db_input($key) . "'");
     } else {
       return tep_db_query("insert into " . TABLE_SESSIONS . " values ('" . tep_db_input($key) . "', '" . tep_db_input($expiry) . "', '" . tep_db_input($value) . "')");
     }
   }

   function _sess_destroy($key) {
     return tep_db_query("delete from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'");
   }

   function _sess_gc($maxlifetime) {
     tep_db_query("delete from " . TABLE_SESSIONS . " where expiry < '" . time() . "'");

     return true;
   }

   session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
 }

 function tep_session_start() {
   global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;

   $sane_session_id = true;

   if (isset($HTTP_GET_VARS[tep_session_name()])) {
     if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_GET_VARS[tep_session_name()]) == false) {
       unset($HTTP_GET_VARS[tep_session_name()]);

       $sane_session_id = false;
     }
   } elseif (isset($HTTP_POST_VARS[tep_session_name()])) {
     if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_POST_VARS[tep_session_name()]) == false) {
       unset($HTTP_POST_VARS[tep_session_name()]);

       $sane_session_id = false;
     }
   } elseif (isset($HTTP_COOKIE_VARS[tep_session_name()])) {
     if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_COOKIE_VARS[tep_session_name()]) == false) {
       $session_data = session_get_cookie_params();

       setcookie(tep_session_name(), '', time()-42000, $session_data['path'], $session_data['domain']);

       $sane_session_id = false;
     }
   }

   if ($sane_session_id == false) {
     tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
   }

   return session_start();
 }

 function tep_session_register($variable) {
   global $session_started;

   if ($session_started == true) {
     if (PHP_VERSION < 4.3) {
       return session_register($variable);
     } else {
       if (isset($GLOBALS[$variable])) {
         $_SESSION[$variable] =& $GLOBALS[$variable];
       } else {
         $_SESSION[$variable] = null;
       }
     }
   }

   return false;
 }

 function tep_session_is_registered($variable) {
   if (PHP_VERSION < 4.3) {
     return session_is_registered($variable);
   } else {
     return isset($_SESSION) && array_key_exists($variable, $_SESSION);
   }
 }

 function tep_session_unregister($variable) {
   if (PHP_VERSION < 4.3) {
     return session_unregister($variable);
   } else {
     unset($_SESSION[$variable]);
   }
 }

 function tep_session_id($sessid = '') {
   if (!empty($sessid)) {
     return session_id($sessid);
   } else {
     return session_id();
   }
 }

 function tep_session_name($name = '') {
   if (!empty($name)) {
     return session_name($name);
   } else {
     return session_name();
   }
 }

 function tep_session_close() {
   if (PHP_VERSION >= '4.0.4') {
     return session_write_close();
   } elseif (function_exists('session_close')) {
     return session_close();
   }
 }

 function tep_session_destroy() {
   return session_destroy();
 }

 function tep_session_save_path($path = '') {
   if (!empty($path)) {
     return session_save_path($path);
   } else {
     return session_save_path();
   }
 }

 function tep_session_recreate() {
   if (PHP_VERSION >= 4.1) {
     $session_backup = $_SESSION;

     unset($_COOKIE[tep_session_name()]);

     tep_session_destroy();

     if (STORE_SESSIONS == 'mysql') {
       session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
     }

     tep_session_start();

     $_SESSION = $session_backup;
     unset($session_backup);
   }
 }
?>

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\osc\includes\filenames.php:68) in C:\AppServ\www\osc\includes\functions\sessions.php on line 102

<?php

filename.php
/*
 $Id: filenames.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

// define the filenames used in the project
 define('FILENAME_ACCOUNT', 'account.php');
 define('FILENAME_ACCOUNT_EDIT', 'account_edit.php');
 define('FILENAME_ACCOUNT_HISTORY', 'account_history.php');
 define('FILENAME_ACCOUNT_HISTORY_INFO', 'account_history_info.php');
 define('FILENAME_ACCOUNT_NEWSLETTERS', 'account_newsletters.php');
 define('FILENAME_ACCOUNT_NOTIFICATIONS', 'account_notifications.php');
 define('FILENAME_ACCOUNT_PASSWORD', 'account_password.php');
 define('FILENAME_ADDRESS_BOOK', 'address_book.php');
 define('FILENAME_ADDRESS_BOOK_PROCESS', 'address_book_process.php');
 define('FILENAME_ADVANCED_SEARCH', 'advanced_search.php');
 define('FILENAME_ADVANCED_SEARCH_RESULT', 'advanced_search_result.php');
 define('FILENAME_ALSO_PURCHASED_PRODUCTS', 'also_purchased_products.php');
 define('FILENAME_CHECKOUT_CONFIRMATION', 'checkout_confirmation.php');
 define('FILENAME_CHECKOUT_PAYMENT', 'checkout_payment.php');
 define('FILENAME_CHECKOUT_PAYMENT_ADDRESS', 'checkout_payment_address.php');
 define('FILENAME_CHECKOUT_PROCESS', 'checkout_process.php');
 define('FILENAME_CHECKOUT_SHIPPING', 'checkout_shipping.php');
 define('FILENAME_CHECKOUT_SHIPPING_ADDRESS', 'checkout_shipping_address.php');
 define('FILENAME_CHECKOUT_SUCCESS', 'checkout_success.php');
 define('FILENAME_CONTACT_US', 'contact_us.php');
 define('FILENAME_CONDITIONS', 'conditions.php');
 define('FILENAME_COOKIE_USAGE', 'cookie_usage.php');
 define('FILENAME_CREATE_ACCOUNT', 'create_account.php');
 define('FILENAME_CREATE_ACCOUNT_SUCCESS', 'create_account_success.php');
 define('FILENAME_DEFAULT', 'index.php');
 define('FILENAME_DOWNLOAD', 'download.php');
 define('FILENAME_INFO_SHOPPING_CART', 'info_shopping_cart.php');
 define('FILENAME_LOGIN', 'login.php');
 define('FILENAME_LOGOFF', 'logoff.php');
 define('FILENAME_NEW_PRODUCTS', 'new_products.php');
 define('FILENAME_PASSWORD_FORGOTTEN', 'password_forgotten.php');
 define('FILENAME_POPUP_IMAGE', 'popup_image.php');
 define('FILENAME_POPUP_SEARCH_HELP', 'popup_search_help.php');
 define('FILENAME_PRIVACY', 'privacy.php');
 define('FILENAME_PRODUCT_INFO', 'product_info.php');
 define('FILENAME_PRODUCT_LISTING', 'product_listing.php');
 define('FILENAME_PRODUCT_REVIEWS', 'product_reviews.php');
 define('FILENAME_PRODUCT_REVIEWS_INFO', 'product_reviews_info.php');
 define('FILENAME_PRODUCT_REVIEWS_WRITE', 'product_reviews_write.php');
 define('FILENAME_PRODUCTS_NEW', 'products_new.php');
 define('FILENAME_REDIRECT', 'redirect.php');
 define('FILENAME_REVIEWS', 'reviews.php');
 define('FILENAME_SHIPPING', 'shipping.php');
 define('FILENAME_SHOPPING_CART', 'shopping_cart.php');
 define('FILENAME_SPECIALS', 'specials.php');
 define('FILENAME_SSL_CHECK', 'ssl_check.php');
 define('FILENAME_TELL_A_FRIEND', 'tell_a_friend.php');
 define('FILENAME_UPCOMING_PRODUCTS', 'upcoming_products.php');
// START - Contrib Tracker
 define('FILENAME_CONTRIB_TRACKER','contrib_tracker.php');
// END - Contrib Tracker

?>

 

I went in admin /session and forced cookie use ...true

Then I get this Error:

 

Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\osc\includes\filenames.php:68) in C:\AppServ\www\osc\includes\functions\general.php on line 1241

 

I open up general.php here is line 1241/42

 function tep_setcookie($name, $value = '', $expire = 0, $path = '/', $domain = '', $secure = 0) {
   setcookie($name, $value, $expire, $path, (tep_not_null($domain) ? $domain : ''), $secure);
 }

 

 

Then I vent to admin/tools contrib tracker and I get this Error

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in C:\AppServ\www\osc\admin\includes\functions\compatibility.php:18) in C:\AppServ\www\osc\admin\includes\functions\compatibility.php on line 30

   reset($ar);
   while (list($key, $value) = each($ar)) {
     if (is_array($ar[$key])) {
       do_magic_quotes_gpc($ar[$key]);
     } else {
       $ar[$key] = addslashes($value);
     }
   }
   reset($ar);
[color="#FF0000"] }[/color]   this is line 30
 if (PHP_VERSION >= 4.1) {
   $HTTP_GET_VARS =& $_GET;
   $HTTP_POST_VARS =& $_POST;
   $HTTP_COOKIE_VARS =& $_COOKIE;
   $HTTP_SESSION_VARS =& $_SESSION;
   $HTTP_POST_FILES =& $_FILES;
   $HTTP_SERVER_VARS =& $_SERVER;

 

 

Please help me out here.

 

Thank You Adrian

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

×