Amazon Parser All

Amazon Parser All 3.6

No permission to download
This looks like it could be a wonderful plugin, and exactly what I'm looking for!

However, I can only get as far as Operation Step 1.

When I click "save" tha page simply refreshes. I can't get to the "Update posts" stage at all.

I have changed the User group permissions for all users.

Step 2 says to add "amazonparserall" to your URL. Which URL please? Tried on the homepage, and on the plugin page in my admin section. No apparent effect.

Could you please advise?

EDIT: My bad - it really was as simple as pasting mydomain.com/amazonparserall and then wait for that page to refresh. :)
 
Last edited:
On install of the latest version:
Code:
Unvalid class: Andy_AmazonParserAll_Route_Prefix_AmazonParserAll

Anyone a fix for that?


The error was sitting infront of the screen: I´d uploaded the folders to the wrong domain. All good, thanks for the hint, Andy :D
 
Last edited:
Suggestion: Display the URLs in the list.

After fetching data, add something like
Code:
       foreach($posts as &$p)
       {
           if (preg_match('#\[(.*?amazon\..*?)\]\s#i', $p['message'], $matches))
           {
               $p['url']=$matches[1];
           } else
               $p['url']=$p['message'];
       }
 
Tried to install this and I get...

Code:
Error Info
ErrorException: A non-numeric value encountered - library/XenForo/DataWriter/Option.php:327
Generated By: anthony, A moment ago
Stack Trace
#0 /home/ptsdforu/public_html/c/library/XenForo/DataWriter/Option.php(327): XenForo_Application::handlePhpError(2, 'A non-numeric v...', '/home/ptsdforu/...', 327, Array)
#1 /home/ptsdforu/public_html/c/library/XenForo/DataWriter/Option.php(222): XenForo_DataWriter_Option->_validateOptionValuePreSave('')
#2 /home/ptsdforu/public_html/c/library/XenForo/DataWriter.php(1460): XenForo_DataWriter_Option->_preSave()
#3 /home/ptsdforu/public_html/c/library/XenForo/DataWriter.php(1399): XenForo_DataWriter->preSave()
#4 /home/ptsdforu/public_html/c/library/XenForo/Model/Option.php(1131): XenForo_DataWriter->save()
#5 /home/ptsdforu/public_html/c/library/XenForo/Model/AddOn.php(324): XenForo_Model_Option->importOptionsAddOnXml(Object(SimpleXMLElement), 'AmazonParserAll')
#6 /home/ptsdforu/public_html/c/library/XenForo/Model/AddOn.php(226): XenForo_Model_AddOn->importAddOnExtraDataFromXml(Object(SimpleXMLElement), 'AmazonParserAll')
#7 /home/ptsdforu/public_html/c/library/XenForo/Model/AddOn.php(169): XenForo_Model_AddOn->installAddOnXml(Object(SimpleXMLElement), false)
#8 /home/ptsdforu/public_html/c/library/XenForo/ControllerAdmin/AddOn.php(188): XenForo_Model_AddOn->installAddOnXmlFromFile('/tmp/phpS2kCwd')
#9 /home/ptsdforu/public_html/c/library/XenForo/FrontController.php(351): XenForo_ControllerAdmin_AddOn->actionInstall()
#10 /home/ptsdforu/public_html/c/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#11 /home/ptsdforu/public_html/c/admin.php(13): XenForo_FrontController->run()
#12 {main}
Request State
array(3) {
  ["url"] => string(50) "https://www.myptsd.com/c/admin.php?add-ons/install"
  ["_GET"] => array(1) {
    ["add-ons/install"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["server_file"] => string(0) ""
    ["_xfConfirm"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
  }
}
 
Andy, tried this on two new servers, NGINX, MariaDb, PHP-FPM, even a default latest XF with nothing else on it, same error:

Code:
Error Info
ErrorException: A non-numeric value encountered - library/XenForo/DataWriter/Option.php:327
Generated By: anthony, 4 minutes ago
Stack Trace
#0 /var/www/ptsdforums/html/c/library/XenForo/DataWriter/Option.php(327): XenForo_Application::handlePhpError(2, 'A non-numeric v...', '/var/www/ptsdfo...', 327, Array)
#1 /var/www/ptsdforums/html/c/library/XenForo/DataWriter/Option.php(222): XenForo_DataWriter_Option->_validateOptionValuePreSave('')
#2 /var/www/ptsdforums/html/c/library/XenForo/DataWriter.php(1460): XenForo_DataWriter_Option->_preSave()
#3 /var/www/ptsdforums/html/c/library/XenForo/DataWriter.php(1399): XenForo_DataWriter->preSave()
#4 /var/www/ptsdforums/html/c/library/XenForo/Model/Option.php(1131): XenForo_DataWriter->save()
#5 /var/www/ptsdforums/html/c/library/XenForo/Model/AddOn.php(324): XenForo_Model_Option->importOptionsAddOnXml(Object(SimpleXMLElement), 'AmazonParserAll')
#6 /var/www/ptsdforums/html/c/library/XenForo/Model/AddOn.php(226): XenForo_Model_AddOn->importAddOnExtraDataFromXml(Object(SimpleXMLElement), 'AmazonParserAll')
#7 /var/www/ptsdforums/html/c/library/XenForo/Model/AddOn.php(169): XenForo_Model_AddOn->installAddOnXml(Object(SimpleXMLElement), false)
#8 /var/www/ptsdforums/html/c/library/XenForo/ControllerAdmin/AddOn.php(188): XenForo_Model_AddOn->installAddOnXmlFromFile('/tmp/php5xK5D2')
#9 /var/www/ptsdforums/html/c/library/XenForo/FrontController.php(351): XenForo_ControllerAdmin_AddOn->actionInstall()
#10 /var/www/ptsdforums/html/c/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#11 /var/www/ptsdforums/html/c/admin.php(13): XenForo_FrontController->run()
#12 {main}
Request State
array(3) {
  ["url"] => string(54) "https://www.ptsdforums.com/c/admin.php?add-ons/install"
  ["_GET"] => array(1) {
   ["add-ons/install"] => string(0) ""
  }
  ["_POST"] => array(3) {
   ["server_file"] => string(0) ""
   ["_xfConfirm"] => string(1) "1"
   ["_xfToken"] => string(8) "********"
  }
}
I can install, uninstall, other add-ons without issue.

Mate... this one has a new installation issue.
 
Hey @AndyB does this work for links in custom fields in the resource manager? I have an option to add Amazon links in a resource category, but I need it to automatically change/append the URL. Some of the URLs that get submitted have other affiliate ids already.
 
Cool, thanks Andy. If I wanted to donate what's your paypal address?

How does this threat resources that have other affiliate ids already?
 
Hi and thanks for this. Does anyone know something similar that changes "keywords" on the fly eg.

This is my post on the forum, and when I mention "Laptops", it automatically links to Laptops on Amazon, including affiliate ID.

It was available on VB and worked really well. TIA.
 
I have install this Addon and have problem with speed.

Code:
# Time: 170829 21:45:53
# User@Host: sql1[sql1] @  [192.168.10.1]
# Thread_id: 127807952  Schema: xenforo  QC_hit: No
# Query_time: 46.688944  Lock_time: 0.000026  Rows_sent: 1  Rows_examined: 2966702
# Rows_affected: 0
SET timestamp=1504035953;
SELECT COUNT(post_id)
        FROM xf_post
        WHERE (message LIKE '%/dp/%' OR message LIKE '%/gp/%')
        AND message LIKE '%amazon.%'
        AND message NOT LIKE '%tag=%';
# Time: 170829 21:46:41
# User@Host: sql1[sql1] @  [192.168.10.1]
# Thread_id: 127807952  Schema: xenforo  QC_hit: No
# Query_time: 47.765543  Lock_time: 0.021555  Rows_sent: 2823  Rows_examined: 2966702
# Rows_affected: 0
SET timestamp=1504036001;
SELECT post_id, message
        FROM xf_post
        WHERE (message LIKE '%/dp/%' OR message LIKE '%/gp/%')
        AND message LIKE '%amazon.%'
        AND message NOT LIKE '%tag=%'
        ORDER BY post_id ASC
        LIMIT 2884;
# Time: 170829 21:48:38
# User@Host: sql1[sql1] @  [192.168.10.1]
# Thread_id: 127810333  Schema: xenforo  QC_hit: No
# Query_time: 44.713390  Lock_time: 0.000026  Rows_sent: 1  Rows_examined: 2966703
# Rows_affected: 0
SET timestamp=1504036118;
SELECT COUNT(post_id)
        FROM xf_post
        WHERE (message LIKE '%/dp/%' OR message LIKE '%/gp/%')
        AND message LIKE '%amazon.%'
        AND message NOT LIKE '%tag=%';
# Time: 170829 21:49:21
# User@Host: sql1[sql1] @  [192.168.10.1]
# Thread_id: 127810333  Schema: xenforo  QC_hit: No
# Query_time: 43.268131  Lock_time: 0.000044  Rows_sent: 2823  Rows_examined: 2966705
# Rows_affected: 0
SET timestamp=1504036161;
SELECT post_id, message
        FROM xf_post
        WHERE (message LIKE '%/dp/%' OR message LIKE '%/gp/%')
        AND message LIKE '%amazon.%'
        AND message NOT LIKE '%tag=%'
        ORDER BY post_id ASC
        LIMIT 2884;
/usr/sbin/mysqld, Version: 10.1.14-MariaDB-1~trusty (mariadb.org binary distribution). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument

i have a big Forum with 3000000 Post and 400000 User. The Parser found 3000 Amazon Links. When i will Update, i become slow query :(

I have 2 big Server only for nginx and for MariaDB. Why i have slow query. All working fast. Only this addon.
 
AndyB updated Amazon Parser All with a new update entry:

See description

On Nov 16, 2015 version <version> of this add-on was released to address an exploitable SQL injection vulnerability. If you are still using a version of this add-on which is below 2.7 or released before Nov 16, 2015 then it is essential that you update to the latest version of the add-on as soon as possible to fix this security issue. If you have any further questions, please ask.

Read the rest of this update entry...
 
I am clicking update when I have the limit set to 250 and it immediately goes to the finished page with no perceptible runtime. I then click back and I see the same list of posts, even after hitting refresh. I am running LiteSpeed 2 CPU with LiteSpeed cache running. Not sure if that would have an effect, but my instinct is that it does.

I ran into the same issue. If I increase the number of posts it processes it will do some, although eventually I reach a point where it's the total number of posts to process and then nothing happens. I'm not sure if I'm doing something wrong or if it's a different add-on causing an issue.
 
I ran into the same issue. If I increase the number of posts it processes it will do some, although eventually I reach a point where it's the total number of posts to process and then nothing happens. I'm not sure if I'm doing something wrong or if it's a different add-on causing an issue.

I have the same issue. I noticed that the URLs that it keeps displaying in the list is the Amazon.com domain. It can't add an affiliate id for those since I didn't add one for Amazon.com (I use Skimlinks for US). I only entered an affiliate ID for DE, UK, FR, IT.

It shouldn't need to parse amazon.com/**** if no affiliate ID has been added for Amazon.com. Would that be possible to fix @AndyB ?
 
Top Bottom