News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

Earn From Amazon Links

Started by karlbenson, August 19, 2007, 10:25:48 PM

Previous topic - Next topic

karlbenson

It might not be the best at matching at the moment.

Thats why the script i was working on is far superior. But it is unknown when that will be ready,

ChaosEnergy

After applying a fix found in another forum, many error messages disappeared, but I still get:

2: parse_url(http://) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL
File: /forum/Sources/Subs.php

any idea?
Chaos Empire ®

foobs

Keep getting errors like this in the error log

8: Use of undefined constant Amazon - assumed 'Amazon'
File: /home/www/forums/default/Admin.template.php (eval?)
Line: 485

8: Use of undefined constant Amazon - assumed 'Amazon'
File: /home/www/forums/Themes/safmc102/BoardIndex.template.php (eval?)
Line: 485

8: Use of undefined constant Amazon - assumed 'Amazon'
File: /home/www/forums/Themes/default/Packages.template.php (eval?)
Line: 485

Any help?

Eclipse16V

Great Mod.

Run it on SMF 2.0 Beta 3.1 Public ? ? ?

Thx
I worked with:
SMF 2 in German

Shop:
SID Giessen

karlbenson


Kalina

#25
Hi, I am using this on an SMF 1.1.5 board, it's filling up my error log.

Quote8: Undefined index: host
File: /home2/mydomain/public_html/Sources/Subs.php
Line: 2391

This is the line it's referencing in Sources/Subs.php
    if (preg_match('/(.*)amazon.(com|co.uk|de|fr|co.jp|ca)+/i', $parsed['host'])) {

Any ideas how to fix this?

Kalina

Can anyone help with the above issues? I am getting errors all day long because of this mod, it works fine but the errors do concern me.

karlbenson

Kalina.
I need to re-write the mod. There isn't a simple fix for the error.

I might have a look later.

Kalina


Kalina

I was provided with a fix over at phpfreaks by effigy.

In Sources/Subs.php I replaced this line:

                        if (preg_match('/(.*)amazon.(com|co.uk|de|fr|co.jp|ca)+/i', $parsed['host'])) {

With this line:
                        if (array_key_exists('host', $parsed) && preg_match('/amazon.(?:com|co.(?:uk|jp)|de|fr|ca)/i', $parsed['host'])) {

The error/notice had been happening when a thread was viewed which contained links that were not amazon links, this fixes that.

kreativekarma

Any idea when this mod will be updated for the new beta 3.1? My people were asking today! :)

karlbenson

Not at the moment, I'm just too busy.
To me it also appears that Amazon changed their link format since I last used them.

Maybe you could help me.
I need examples of amazon links WITH your affiliate ids already contained within them. (not ones generated by the mod, but from amazon).

kreativekarma

#32
Here is one of the codes I snagged from them...

<iframe src="http://rcm.amazon.com/e/cm?t=thekreativeko-20&o=1&p=7&l=ez&f=ifr&f=ifr" width="468" height="40" scrolling="no" marginwidth="0" marginheight="0" border="0" frameborder="0" style="border:none;"></iframe>

<iframe src="http://rcm.amazon.com/e/cm?t=thekreativeko-20&o=1&p=7&l=ez&f=ifr&f=ifr" width="468" height="40" scrolling="no" marginwidth="0" marginheight="0" border="0" frameborder="0" style="border:none;"></iframe>

karlbenson

My mod doesn't support that type of amazon.

It finds text links to amazon pages within existing posts and then inserts your amazon affiliate id into that link.

kreativekarma

Yeah, that sucks. Amazon is kinda shifty when it comes to counting your affiliate things anyway! Or so I have read on other websites! ;)

karlbenson

WDM2005 has now taken over development of this mod.
The link for which is http://custom.simplemachines.org/mods/index.php?mod=1303

Advertisement: