Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

CityDesk East my Amazon Affiliate Codes

I start with this code from Amazon:

<iframe src="" width="120" height="240" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>

Which creates a white box with a picture of the book, some information and a Buy from Amazon graphic.

I paste it into CityDesk in HTML mode and switch to normal mode and it turns into a YELLOW box. I switch back to HTML mode and the code now looks like this:

<iframe marginwidth="0" marginheight="0" src=";o=1&amp;p=8&amp;l=as1&amp;asins=1590593898&amp;fc1=000000&amp;lc1=0000ff&amp;bc1=&amp;lt1=_blank&amp;IS2=1&amp;bg1=ffffff&lt;SPAN id=fogstart&gt;&lt;/SPAN&gt;&lt;SPAN id=fogend&gt;&lt;/SPAN&gt;&amp;f=ifr" frameborder="0" width="120" scrolling="no" height="240"></iframe>

My Kludge is to create an HTML page with this code, load it in IE and select all -> copy -> paste it into my CityDesk document in normal view.
Tuesday, November 9, 2004

Put it in a variable... Microsoft's DHTML editor and IFRAME's coupled with our code to work around all its bugs is apparently eating your iframe code.

Michael H. Pryor
Fog Creek Software
Tuesday, November 9, 2004

I like my kludge better. :-)

East should be "Eats" but I think you know that.
Tuesday, November 9, 2004

> East should be "Eats" but ...

Must be my dyslexia or alzheimer's is starting to settle in ... I "saw" it as "Eats", interesting but completely OT sorry.

Wednesday, November 10, 2004

I think the Fog Creek guys changed it to mess with us. This way we aren't so adamant about our bug reports. They'll have us doubting ourselves so much that every bug report they get will sound like this:

"The other day, uh, I think maybe I ... and then it (could or could not have) done this... I think. Maybe it's my fault, I don't know but can you please help me?"

Instead of the usual:

"Your product sux."
Wednesday, November 10, 2004

Anyone else here tired of workarounds instead of bug fixes?

David Burch
Wednesday, November 10, 2004

Suggestion: You can put the code into a variable AND make use of referencing the amazon book code (ASIN) through one of the CityDesk fields.

E.g. a variable called AmazonLink:

<iframe src="{$.headline$}&fc1=000000&lc1=0000ff&bc1=&lt1=_blank&IS2=1&bg1=ffffff&f=ifr" width="120" height="240" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>

and putting the ASIN of the book you want to promote in the (in this example) headline field. Article field reference in a variable. It will read the ASIN number from the field and put it into the variable appropriately. Might be better than copying+pasting different HTML code for each book. You could also surround the variable code with a if/endif in case some articles are not supposed to show books at all (=empty field).


Patrick Thomas

Patrick Thomas
Wednesday, November 10, 2004

Copy + Paste is WYSIWYG, and conceptually easier than variables. You can see directly what item you're promoting rather than having to go back and translate the ASIN into a book when you want to see what's what.
Wednesday, November 10, 2004

Would WYSIWYG sandwiched by two variables wordk The image is WYSIWYG, the bookends are the HTML that come before and after.

George Illes
Friday, November 12, 2004

Would WYSIWYG sandwiched by two variables *work?*

George Illes
Friday, November 12, 2004

I believe in going with the simplest possible route, and I think mine is it. You might even be able to copy it straight from the page.

The only problem is you can't switch to HTML mode, but that's fine because this is in a field that can't switch to HTML mode.

If I was concerned with HTML mode, I'd simply get rid of the iFrame and host the image myself, making the HTML easy.

<a href="">
<img src="image.jpg"><br>
Book Title
Friday, November 12, 2004

*  Recent Topics

*  Fog Creek Home