View Full Version : Adding Amazon Associates Product's HTML Code to New Article?
Dave234
01-12-2013, 05:50 PM
Hello, everybody. I haven't been on here for a while.
I have a question about Amazon Associates and where to put the HTML code they provide me (for just an image of the product which links directly to that Amazon product page, with my Amazon Associates ID already filled in)?
I was hoping I could just copy and paste it into the new article, where I want the image to appear. But that is just showing the code......
Here is the code:
<a href="http://www.amazon.com/gp/product/B007RNWUC4/ref=as_li_ss_il?ie=UTF8&tag=aftershock04-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B007RNWUC4"><img border="0" src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&Format=_SL160_&ASIN=B007RNWUC4&MarketPlace=US&ID=AsinImage&WS=1&tag=aftershock04-20&ServiceVersion=20070822" ></a><img src="http://www.assoc-amazon.com/e/ir?t=aftershock04-20&l=as2&o=1&a=B007RNWUC4" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
--------------- Added 1358029806 at 1358029806 ---------------
Please, somebody help.
You would need to allow HTML in your article. In the adminCP, vbulletin CMS > Permissions, there's a column for "can use html content" for each usergroup. (Note that you normally wouldn't want to allow everyone to use html).
When your usergroup has that permission, there should be an HTML section under Display Settings when you edit your article.
Another way you can sometimes do something like that is to make a bbcode for it, but to do that there needs to be some part (like a product number or something) that you can make in to a parameter, and I couldn't figure out by looking at the link you posted whether or not there's any part like that.
Dave234
01-15-2013, 02:12 AM
Isn't allowing html a major security risk?
Isn't allowing html a major security risk?
Yeah, for normal users. But in the forums you can only enable or disable it for an entire forum, while in the CMS I think you can do it by usergroup. So assuming you're an admin and you trust the other admins, it should be OK.
Dave234
01-15-2013, 11:27 AM
So if I enable html in the "Create Article" section of the Main Pages, it should not be risky at all?
I would be the only one to enter this information, but everyone would be able to read it.
Is it not risky at all because no one else has the ability to edit the articles (only read them)?
--------------- Added 1358252935 at 1358252935 ---------------
If all of this is the case, would people still be able to add comments to an article? Or would their ability to add comments be a security risk? (Or is adding comments to articles a completely separate thing?)
I have to be honest, I don't know for sure. Looking at the settings (as I mentioned in post #2) it looks like you can allow html only for editing the article, and only for certain user groups, which I don't believe would be a security issue. But I haven't tested it so I can't tell you for sure. You could enable it for Admins then test with a regular user and see what you're allowed to do. (It's not like your site is going to get hacked or anything - the security issue is more for your users)
Someone else might know of some other solution to your question. Are you sure amazon.com doesn't have some kind of code you can embed that just takes a product number and replaces it with the entire description?
Dave234
01-19-2013, 10:21 PM
I have changed the permissions just as you said, but it did not work. When I paste this into the new article: <iframe src="http://rcm.amazon.com/e/cm?lt1=_blan...ins=B007RNWUC4" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
It converts all the code into a little box that says:
404 Error File Not Found
The page you are looking for might have been removed,
had its name changed, or is temporarily unavailable.
It does this no matter what I copy and paste from amazon. I would love to just be able to copy and paste the code and be able to see the image link. In the HTML portion of the edit post screen I am sure to have the "HTML On - Convert Linebreaks" box checked, but it still does not work.
I really, really want to just be able to copy and paste this code, because I have a LOT of items to enter..................
Can you also tell me why not even the text link is working, when I copy and paste it into a new article? I would love to just be able to copy and paste the below text next to the other item, like as the title of the item, but it is just showing the below code (even though HTML is enabled for administrators.....I am the only administrator on my site):
<a href="http://www.amazon.com/gp/product/B00...002BSC54I">The Legend of Zelda: Skyward Sword with Music CD</a><img src="http://www.assoc-amazon.com/e/ir?t=a...1&a=B002BSC54I" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
If you're seeing "File not Found" and/or links that don't work, then the "allow html" is working and the problem is in your html. If I copy the url you pasted above into my browser, it doesn't work, so the problem might be there. But I notice that the urls have "..." in them, which sometimes happens when you put a url in a post, so maybe it's just the post and not your actual url. Have you tried taking the contents of the href or src of the tags and putting them in your browser address line and seeing if they work? If they don't, that's the problem.
Dave234
01-19-2013, 11:30 PM
If I take the URL from the below link, it works:
<iframe src="http://rcm.amazon.com/e/cm?lt1=_blan...ins=B002BSC54I" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
However it doesn't work when I copy/paste the above into a new article......
It doesn't work for me. And I don't see any reason your html wouldn't work. Does this work for you:
<iframe src="https://vborg.vbsupport.ru/showthread.php?p=2398049#post2398049"
style="width:1200px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0">
</iframe>
BTW, the code you posted in the first post works fine for me (after I removed all the bbcode from it) - does that work for you?
Dave234
01-19-2013, 11:46 PM
Ha ha ha Yeah, that works! What does that mean? Does it mean that the issue is with amazon?
I don't know. I would have thought it meant there's a problem with the url (since everything else is the same), but you said it works. Since it doesn't work for me, maybe it does have something to do with amazon - maybe they only return it if the referer is right, or something like that.
Maybe someone else will have an idea.
Dave234
01-19-2013, 11:52 PM
It's weird because when I pasted all of what I had put above, onto the vbulletin.com website, it all worked. It had the hyperlinks and it goes directly to the correct amazon page.
However, here, where it does not seem to allow hyperlinks, the actual textual link does not work for me, either.
Here is the link to what I had put on the vbulletin.com website:
https://www.vbulletin.com/forum/showthread.php/415296-Adding-Amazon-Associates-Product-s-HTML-Code-to-New-Article
I really, really appreciate your help on this.
--------------- Added 1358643382 at 1358643382 ---------------
When I click on the link I posted above:
http://rcm.amazon.com/e/cm?lt1=_blan...ins=B002BSC54I
The URL that appears is this:
http://rcm.amazon.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=aftershock04-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B002BSC54I
Oh...did you copy what you posted from there and paste it here? That's probably why it's not working for me. When I copy it from there, it works. So what I pasted in my article is this:
<iframe src="http://rcm.amazon.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=aftershock04-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B007RNWUC4" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
and that seems to work.
Dave234
01-19-2013, 11:57 PM
I see what's going on....it takes the same URL, but at least when it is pasted on the page, it replaces much of the contents with "..." (to save space, I guess)
--------------- Added 1358643651 at 1358643651 ---------------
Yeah, that works for me! But how can I copy/paste what Amazon provides me into my website so that it actually works? I copy/paste it directly from Amazon to my website but it never works....
Oh, I see. Hmm...I'm not sure. Maybe try changing the editor mode? Press the little A/A button in the upper left corner and try it again.
Edit: if that doesn't work, then I really don't know, but someone else might. It might be a good time to update the thread at vbulletin.com, or start a new one about the cut/paste problem.
Dave234
01-20-2013, 01:59 AM
Dude. That did it!!! Thanks!!!!!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.