News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Amazon Search

Started by hchute, December 05, 2008, 03:58:24 PM

Previous topic - Next topic

hchute

Link to Mod

This mod provides an Amazon Search button into your posting template. It converts any selected string of text into a link to Amazon that displays the Amazon search results for that string.

Amazon allows and encourages these links that draw traffic to its site. The mod provides a simple way for your forum members to provide a direct link into Amazon for books, CDs, DVDs, tools, electronics, or any type of product that is mentioned in your forum posts.

If you are in Amazon's affiliate program, your affiliate code can be automatically embedded in the link, so that you get credit for any resulting purchases.

Screenshots:

Posting button:


Posting page (close-up):


Posting page:


How it's used:

When creating or modifying a post, your forum members can select text in that post and click on the Amazon Search button. The selected text will become a clickable link in the post. When visitors to your forum click on that link, a new browser page will open with the Amazon search page results for that string.

The mod also provides an easy way for your forum moderators to modifying existing posts to convert text to Amazon links.

After running the automatic install, copy the included amazonsearch.gif to your Themes/Default/Images/BBC folder. And, if you are part of Amazon's affiliate program, edit Subs.php in your Sources folder and replace the string "affiliate-id" with your affiliate ID assigned by Amazon.

Changelog:

1.0 - 11/28/08
- initial release
KBoards - (2.5M posts) | SMF mods for Amazon affiliates: - Amazon Search - Amazon DVD  - Amazon MP3

hchute

#1
Welcome, SMF users!

This is my first official SMF mod, and I'm pleased that it has been successfully reviewed and released to the masses.

I'm a software developer by training and profession, and have two years of experience running SMF forums. Both of my current forums are gadget forums. One has about 100,000 posts and the newer one has about 30,000. 

This particular mod has been the most useful mod I've made in my forums. My forum members have really taken to using it. They like using it, and their use of it has driven up my affiliate sales.

It's a simple mod, to install and to use. Let me know if you have any questions or suggestions. And do let me know how well it works for you in your forums!

- Harvey

PS You may also be interested in other mods that build Amazon affiliate links. Here are the ones I've developed so far:


  • Amazon Search. Converts selected text to an affiliate link that searches Amazon's site for that text string.
  • Amazon DVD. Converts selected text to an affiliate link that searches Amazon's DVD store for that text string. The posting bbcode button is an image of a musical note. 
  • Amazon MP3. Converts selected text to an affiliate link that searches Amazon's MP3 download store for that text string. The posting bbcode button is an image of a musical note. 
KBoards - (2.5M posts) | SMF mods for Amazon affiliates: - Amazon Search - Amazon DVD  - Amazon MP3

hchute

To see this mod in action, you can view it at either of my gadget sites: http://www.kindleboards.com and http://www.zunerama.com.

Here's a screenshot of the Amazon Search bbcode button, and showing the bbcode that it adds to a post:



KBoards - (2.5M posts) | SMF mods for Amazon affiliates: - Amazon Search - Amazon DVD  - Amazon MP3

jinxnme

I installed this package and cannot get my affiliate id to show up in the URL.
Quoteedit Subs.php in your Sources folder and replace the string "affiliate-id" with your affiliate ID assigned by Amazon.
I did this, but it doesn't seem to be working. Any suggestions?

hchute

#4
^ Yes, if you've replaced the "affiliate-ID" string with your assigned Affiliate ID, it is being passed to Amazon through &tag parameter.

That is occurring even if Amazon doesn't display the "&tag=" code in the URL displayed in the address bar.

You can verify that with a test purchase. Make a post about an item, and use the Amazon Search button to make the text clickable. Then preview the post, and click on the link. A new browser window will open with an Amazon search results page. As a test, purchase any item. 

The next morning, you'll see that item in your Amazon affiliate "Orders" report. (You can then cancel that test order if you wish.)

A little more info: What is happening is, Amazon stores your tag as part of the user's session, then redirects to the page without your tag in the URL. You'll get credit for everything purchased in that session.

KBoards - (2.5M posts) | SMF mods for Amazon affiliates: - Amazon Search - Amazon DVD  - Amazon MP3

sheryltoo

I'm having a terrible time finding the "affliate ID" I need to replace.
Would you be able to copy some of the surrounding codes so perhaps I'll be able to find it?
Thanks.
Sheryl

hchute

Sure - here's the code in Subs.php (assuming you're using SMF 1.*):

array(
'tag' => 'amazonsearch',
'type' => 'unparsed_content',
'content' => '<a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26x%3D13%26ref%255F%3Dnb%255Fss%255Fgw%26y%3D14%26field-keywords%3D$1%26url%3Dsearch-alias%253Daps&tag=affiliate-id-20&linkCode=ur2&camp=1789&creative=390957" target="_BLANK">$1</a>',
),


Look for the string "affiliate-id-20" towards the end; and replace that with your affiliate code. Your affiliate code should also end with "-20". So, if your affiliate code is "sheryl-20", for example, the above code would be modified to:


array(
'tag' => 'amazonsearch',
'type' => 'unparsed_content',
'content' => '<a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26x%3D13%26ref%255F%3Dnb%255Fss%255Fgw%26y%3D14%26field-keywords%3D$1%26url%3Dsearch-alias%253Daps&tag=sheryl-20&linkCode=ur2&camp=1789&creative=390957" target="_BLANK">$1</a>',
),
KBoards - (2.5M posts) | SMF mods for Amazon affiliates: - Amazon Search - Amazon DVD  - Amazon MP3

sheryltoo

#7
Thank you so much. That made it much easier. I found it.
I was thinking of adding your other two search mods but if someone were to use the plain Amazon search and type in a DVD title or MP3, would it search for one of those items?

I'm editing this reply to add one more question.
Is there a way to add the BBC to a quick reply box since many of my members use the quick reply.
Sheryl

hchute

Yes, the Amazon Search bbcode will search all of amazon, including the MP3 downloads and the DVDs, for the search string.

The other mods (Amazon MP3 and Amazon DVD) are more targeted - they specifically search within Amazon's music and DVDs areas, respectively.

Good question about the quick-reply - - I'll have to research that.
KBoards - (2.5M posts) | SMF mods for Amazon affiliates: - Amazon Search - Amazon DVD  - Amazon MP3

sheryltoo

Ok thanks.
Please let me know what you find out.
Sheryl

weisus

Hchute,

I just wanted to thank you for adding this information. I have just added my own SMF to my site and this helps immensely. Again thank you for sharing, without the help of great users such as yourself-some of this can be overwhelming for us Newbs.

Thank you-Weisus

hchute

Quote from: sheryltoo on January 19, 2009, 06:07:59 PM
Ok thanks.
Please let me know what you find out.
Sheryl

The Quick-Reply box doesn't display bbcode buttons, like bold, italics, and the Amazon Search button.

A workaround - you can press 'Preview' from the Quick-Reply window, and the bbcode buttons will appear.
KBoards - (2.5M posts) | SMF mods for Amazon affiliates: - Amazon Search - Amazon DVD  - Amazon MP3

sheryltoo

I'm using the enhanced quick reply mod and it does include BB codes that's why I was hoping I could add the Amazon button to the rest of the BBCs.
Sheryl

hchute

Ah, I see. Thanks, Sheryl. I haven't used that mod, but I'll add that to my 'to-do' list to see if I can help make it available in enhanced quick-reply.
KBoards - (2.5M posts) | SMF mods for Amazon affiliates: - Amazon Search - Amazon DVD  - Amazon MP3

sheryltoo

Thank you. That would be great.
Sheryl

PerryM

Upgraded to RC1 and [Apply Mod] is missing from my Packages page - can't load it.

Thanks,
Perry

hchute

Thanks for alerting me to this - I didn't realize I need to change my mod package for 2.0 RC1. I'll get on that and post in here when I have an update ready. Won't be long.
KBoards - (2.5M posts) | SMF mods for Amazon affiliates: - Amazon Search - Amazon DVD  - Amazon MP3

hchute

Update: I've updated the mod for compatibility with SMF 2.0 RC1 (and SMF 1.1.8 as well).

Existing users of the mod won't have to make any changes. Others, should uninstall the mod (if it exists), download the updated mod package and install.
KBoards - (2.5M posts) | SMF mods for Amazon affiliates: - Amazon Search - Amazon DVD  - Amazon MP3

KirkhamsEbooks

Nice mod

I noticed when I edited the -20 was already in the sub.php. I assume this means I only need to add the other part of my amazon affiliate id?

Rick

hchute

Thanks!

Yes, that is correct. The '-20' suffix is already there for you.
KBoards - (2.5M posts) | SMF mods for Amazon affiliates: - Amazon Search - Amazon DVD  - Amazon MP3

Advertisement: