Jump to content
lildog

Contribution Tracker

Recommended Posts

I forget to check the contributions site everyday even every week or month. When I do remember to checkback it takes forever to update all my contribs. Contribution tracker checks the oscommerce feed and notes what contributions have been updated so you can easily see what contribution needs to be updated.

 

found at:http://www.oscommerce.com/community/contributions,4815

Share this post


Link to post
Share on other sites

Great contribution. This has helped me out tremendously. Wen I loaded up contrib_tracker.php today, I recieved an error. Here is what I got:

 

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 'images basic' and last_update < '2007-02-08 08:46:52'' at line 1

 

UPDATE contrib_tracker SET status ='0', contr_last_modified = '2007-02-08 08:46:52' , date_status_change = now() where contrib_name = 'Infinit'images basic' and last_update < '2007-02-08 08:46:52'

 

Checking out todays new contributions on http://www.oscommerce.com/community/contributions, there is one called

 

Infinit'images basic

 

I believe the single quote in the title of this contribution is causing the sql error. Can anyone hl help with the solution to this?

 

Thanks

 

-Mike

Share this post


Link to post
Share on other sites
Great contribution. This has helped me out tremendously. Wen I loaded up contrib_tracker.php today, I recieved an error. Here is what I got:

 

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 'images basic' and last_update < '2007-02-08 08:46:52'' at line 1

 

UPDATE contrib_tracker SET status ='0', contr_last_modified = '2007-02-08 08:46:52' , date_status_change = now() where contrib_name = 'Infinit'images basic' and last_update < '2007-02-08 08:46:52'

 

Checking out todays new contributions on http://www.oscommerce.com/community/contributions, there is one called

 

Infinit'images basic

 

I believe the single quote in the title of this contribution is causing the sql error. Can anyone hl help with the solution to this?

 

Thanks

 

-Mike

 

 

 

I am having a similar error. It's been driving me nuts trying to find the cause.

 

 

 

What if we put another update after the problem contribution. Will the Contribution tracker overlook it?


I like these mods, there fun! ...65 70 72 75 80 85 125+ contributions installed and counting...

 

Tools I'm using: OSC2.2 milestone2, Filezilla for FTP, PHP Designer 2007PE (nice), Araxis Merge 6.5 to compare files, XP(my box), Remote Server is shared Apache 1.3 Cpanel, CURL, and PHPmyAdmin through my hosts Cpanel to mess up the database.

Share this post


Link to post
Share on other sites
What if we put another update after the problem contribution. Will the Contribution tracker overlook it?

 

 

 

I guess that won't work because the feed coming in is the name of the newest contributions.

 

 

 

The problem will likely pass when that contribution gets bumped off the top ten list. It is sure to come around again when it gets an update.

 

 

 

Is there a bit of code to strip out the quote in the name that we can add to the Contribution Tracker code?


I like these mods, there fun! ...65 70 72 75 80 85 125+ contributions installed and counting...

 

Tools I'm using: OSC2.2 milestone2, Filezilla for FTP, PHP Designer 2007PE (nice), Araxis Merge 6.5 to compare files, XP(my box), Remote Server is shared Apache 1.3 Cpanel, CURL, and PHPmyAdmin through my hosts Cpanel to mess up the database.

Share this post


Link to post
Share on other sites

Hi

 

see

 

http://forums.oscommerce.com/index.php?showtopic=250124

 

can we all add to this so it may get don??

 

simon


Thanks Simon

 

osCommerce Version: Online Merchant v2.2 RC 2a - Test Site with: oscommerce-2.2ms2-060817

cPanel Version: 11.23.4-RELEASE - Apache version: 2.0.63 - PHP version: 5.2.5 - MySQL version: 5.0.51a-community - Operating system: Linux

========================================================================

Share this post


Link to post
Share on other sites
Hi

 

see

 

http://forums.oscommerce.com/index.php?showtopic=250124

 

can we all add to this so it may get don??

 

simon

 

 

 

Has anyone emailed the author of the contribution?


I like these mods, there fun! ...65 70 72 75 80 85 125+ contributions installed and counting...

 

Tools I'm using: OSC2.2 milestone2, Filezilla for FTP, PHP Designer 2007PE (nice), Araxis Merge 6.5 to compare files, XP(my box), Remote Server is shared Apache 1.3 Cpanel, CURL, and PHPmyAdmin through my hosts Cpanel to mess up the database.

Share this post


Link to post
Share on other sites
I guess that won't work because the feed coming in is the name of the newest contributions.

 

 

 

The problem will likely pass when that contribution gets bumped off the top ten list. It is sure to come around again when it gets an update.

 

 

 

Is there a bit of code to strip out the quote in the name that we can add to the Contribution Tracker code?

 

I found some info here: http://www.kofler.cc/forum/forumthread.php?rootID=3184

 

Using the str_replace function (http://us3.php.net/str_replace), i changed line 63 in admin/contrib_tracker.php to

 

	tep_db_query("UPDATE " . TABLE_CONTRIB_TRACKER . " SET status ='0', contr_last_modified = '" . $pubtimestamp . "' , date_status_change = now() where contrib_name = '" . str_replace("'","\'", $thetitle) . "' and last_update < '" . $pubtimestamp . "'");

 

It just replaces ' with \' in the contribution title. The problem I could forsee would be any contributions that have " in their name won't be entered correctly.

 

It seems to work, but t would be great if someone that actually knows php could verify this is ok.

 

Thanks

 

-Mike

Share this post


Link to post
Share on other sites

Thanks

 

Mike

 

this worked for me.

 

simon


Thanks Simon

 

osCommerce Version: Online Merchant v2.2 RC 2a - Test Site with: oscommerce-2.2ms2-060817

cPanel Version: 11.23.4-RELEASE - Apache version: 2.0.63 - PHP version: 5.2.5 - MySQL version: 5.0.51a-community - Operating system: Linux

========================================================================

Share this post


Link to post
Share on other sites
I found some info here: http://www.kofler.cc/forum/forumthread.php?rootID=3184

 

Using the str_replace function (http://us3.php.net/str_replace), i changed line 63 in admin/contrib_tracker.php to

 

	tep_db_query("UPDATE " . TABLE_CONTRIB_TRACKER . " SET status ='0', contr_last_modified = '" . $pubtimestamp . "' , date_status_change = now() where contrib_name = '" . str_replace("'","\'", $thetitle) . "' and last_update < '" . $pubtimestamp . "'");

 

It just replaces ' with \' in the contribution title. The problem I could forsee would be any contributions that have " in their name won't be entered correctly.

 

It seems to work, but t would be great if someone that actually knows php could verify this is ok.

 

Thanks

 

-Mike

 

 

 

Thanks for your efforts. I will try your suggestions and post the results. I sent the author an email so maybe there might be an update at somepoint; I'll keep watching the Contribution Tracker to see if there is one...

 

 

 

RJ


I like these mods, there fun! ...65 70 72 75 80 85 125+ contributions installed and counting...

 

Tools I'm using: OSC2.2 milestone2, Filezilla for FTP, PHP Designer 2007PE (nice), Araxis Merge 6.5 to compare files, XP(my box), Remote Server is shared Apache 1.3 Cpanel, CURL, and PHPmyAdmin through my hosts Cpanel to mess up the database.

Share this post


Link to post
Share on other sites
Thanks for your efforts. I will try your suggestions and post the results. I sent the author an email so maybe there might be an update at somepoint; I'll keep watching the Contribution Tracker to see if there is one...

 

 

 

RJ

 

 

 

Ka Chow, it's back up...

 

...until the " comes along.


I like these mods, there fun! ...65 70 72 75 80 85 125+ contributions installed and counting...

 

Tools I'm using: OSC2.2 milestone2, Filezilla for FTP, PHP Designer 2007PE (nice), Araxis Merge 6.5 to compare files, XP(my box), Remote Server is shared Apache 1.3 Cpanel, CURL, and PHPmyAdmin through my hosts Cpanel to mess up the database.

Share this post


Link to post
Share on other sites

Hello everyone. I had no idea people were even using this contrib. I thought it would be huge! It is an ongoing problem for me to update my contribs. I have 6 months to go through and install. OOPS!

 

Anyhow, the string replace should work fine. I am no expert in php but getting better everyday. I will patch it in and also acccount for the inevitable " too.

 

Thanks all for using my contrib.

 

if anyone has any info on comparing the dates in the sql database and the oscommerce rss feed leet me know. I believe the calculations are about twelve hours off. I guess also depending on timezone.

 

lildog

Share this post


Link to post
Share on other sites

Here is a more comprehensive fix for the error with names that include ' and ". I appologize for taking sooo long to post this. I am going to add an update to the contrib page later,

 

in admin/contrib_tracker.php:

before

// get database contributions with the name of the current item and last modded in store is less that the pubdate

tep_db_query("UPDATE " . TABLE_CONTRIB_TRACKER . " SET status ='0', contr_last_modified = '" . $pubtimestamp . "' , date_status_change = now() where contrib_name = '" . $thetitle . "' and last_update < '" . $pubtimestamp . "'");

added:

// add backslashes to characters that need escaping

$thetitle=addslashes($thetitle);

 

26Feb7- in catalog/contrib_tracker.php:

before

// get database contributions with the name of the current item and last modded in store is less that the pubdate

tep_db_query("UPDATE " . TABLE_CONTRIB_TRACKER . " SET status ='0', contr_last_modified = '" . $pubtimestamp . "' , date_status_change = now() where contrib_name = '" . $thetitle . "' and last_update < '" . $pubtimestamp . "'");

 

add:

// add backslashes to characters that need escaping

$thetitle=addslashes($thetitle);

Share this post


Link to post
Share on other sites

I have uploaded an update that addresses the time issue and the quote issue.

 

lildog

Share this post


Link to post
Share on other sites

Hi lildog,

 

Will it work for older contributions to?

I installed the contribution and added a contribution, I'm using, which I know has a newer version.

But yr contribution, doesn't seem to "see it".

Or does it only recognize new aditions when there are updated afteryr contribution is installed, and the contribution is scheduled to run each day with a cron job?

 

A bit more information how it works would be great.....


Building great webshops for customers with opensource backoffice application for a robotic accounting solution including POS
Migrating osC 2.x webshops to 2.3.4.x
osCommerce dedicated hosting/colocation + turnkey solutions + building addons per request

Share this post


Link to post
Share on other sites

Using your version 1.2 which is great. I downloaded the updates and when extracting them my compression program is telling me file contains corrupt or illegal file names. It's all the things having to do with upgrades. It extracts the new files and directions, but not the upgrade stuff you put in. I don't think it likes the 1->2 stuff in the file or folder names.

 

Going to try and use my examdiff pro and see if I can figure out what changed between each of them.

 

Thanks again for this great contrib!

Share this post


Link to post
Share on other sites

I think the problem is I am on a mac I will rename and upload. Please let me know if it works.

 

cDGo IT Consultancy:

As far as not recognizing old contribs, it recognizes anything that comes throught the rss feed, which is a couple of hours? behind the actual site, It gets gererated every so often. I suspect it was typed in incorrectly. Make sure the name you typed in is EXACTLY like the large title at the top of the contrib page, NOT the title of the most recent version.

 

lildog

 

 

Using your version 1.2 which is great. I downloaded the updates and when extracting them my compression program is telling me file contains corrupt or illegal file names. It's all the things having to do with upgrades. It extracts the new files and directions, but not the upgrade stuff you put in. I don't think it likes the 1->2 stuff in the file or folder names.

 

Going to try and use my examdiff pro and see if I can figure out what changed between each of them.

 

Thanks again for this great contrib!

Share this post


Link to post
Share on other sites

I cannot get the Edit, Delete, or Preview buttons to work on Contribution Tracker. Does anyone else have this problem? Has anyone fixed it?

 

(Ignore similar post outside of this thread)

Share this post


Link to post
Share on other sites

Hi lilboy,

 

Thanks for replying.

The thing is that I'm talking about contribs from the past.

Lets say in contrib installed last in 2005 and has an update in 2006.

 

What I now understand is that your contrib only works for updates that are now spread thrue the rss feeds.

As the update of 2006 won't be spread through the rss feed, your contrib will not alert me for that update.


Building great webshops for customers with opensource backoffice application for a robotic accounting solution including POS
Migrating osC 2.x webshops to 2.3.4.x
osCommerce dedicated hosting/colocation + turnkey solutions + building addons per request

Share this post


Link to post
Share on other sites

cDGo IT Consultancy,

Let me see if I have this right. You installed a contrib in say 2005 there was an update in 2006 that you missed or did not install and would like to be notified that you are not using the latest version, right? This is exactly why I wrote this contrib. I am in the same boat. I have about a hundred contribs installed and I forget to update them then I do updates and it takes me a week or more. Unfortunately, the names and versions of contribs are all over the board and I am not sure I would be able to get Contrib tracker to reliably check the site. Is the contrib you are talking about on the oscommerce contrib site? This is a feature I will investigate and try to implement, no promises.

 

For now update all of your contribs, enter them into contrib tracker and from then on you will get notified of updates.

 

lildog

Share this post


Link to post
Share on other sites

I just upgraded from v1.2 to v1.5.2. When i clicked on the Contrib link in admin, I got the following error

 

[codeParse error: syntax error, unexpected T_REQUIRE in /home/xxxxxxx/public_html/store/admin/contrib_tracker.php on line 1][/code]

 

Thinking I may have missed something, I reinstalled v1.2 and it worked fine again. I decided to do a fresh install of v1.5.2 and after, got the same problem. I then brought it back to v1.2 and it works. I installed v1.3 and that is where the problem starts. I'm not coder so I'm not sure where to look.

 

Line 1 is of course the <?php so I assume it means the first line of code which is require('includes/application_top.php'); on mine.

 

Thanks for any help and a great contrib!


Currently running 76 contibutions.

Share this post


Link to post
Share on other sites

Lildog,

 

You're right, that's just what I meant.

I've got over 150 contribs running in my shops.

So eager to help you with testing!!!!!!!!!!!!!!!!!!!!!

:lol: :thumbsup:


Building great webshops for customers with opensource backoffice application for a robotic accounting solution including POS
Migrating osC 2.x webshops to 2.3.4.x
osCommerce dedicated hosting/colocation + turnkey solutions + building addons per request

Share this post


Link to post
Share on other sites

Candleman,

The only thing I can suggest is check the punctuation near line 1 make sure they all have semi colons, etc. Or post the first part of code and i will try to determine the problem.

 

lildog

Share this post


Link to post
Share on other sites
Candleman,

The only thing I can suggest is check the punctuation near line 1 make sure they all have semi colons, etc. Or post the first part of code and i will try to determine the problem.

 

lildog

 

I tried to install the 1.5.4 version and got the same error. I reinsalled the 1.2 version and it was back to normal. The code is the same code in the 1.5.4 version release on the contribution page. There must be an error in it, but I can't find it.


I like these mods, there fun! ...65 70 72 75 80 85 125+ contributions installed and counting...

 

Tools I'm using: OSC2.2 milestone2, Filezilla for FTP, PHP Designer 2007PE (nice), Araxis Merge 6.5 to compare files, XP(my box), Remote Server is shared Apache 1.3 Cpanel, CURL, and PHPmyAdmin through my hosts Cpanel to mess up the database.

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

×