{"id":738,"date":"2012-08-31T13:01:06","date_gmt":"2012-08-31T13:01:06","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=738"},"modified":"2012-08-31T13:01:06","modified_gmt":"2012-08-31T13:01:06","slug":"copying-banner-code-clipboard","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/copying-banner-code-clipboard\/","title":{"rendered":"Copying banner code without scaring people"},"content":{"rendered":"<p>I created a affiliate banner program for a client this week, and sent the final page over for review. Everything went well, except, my client asked &quot;What is all that junk in the boxes? Our customers won&#39;t know what to do with that.&quot;.<\/p>\n<p>I respectfully thought to myself, &quot;If they don&#39;t know what the code is, they probably won&#39;t know what to do with it.&quot; But then again, sometimes the details can scare people off. If a non-webmaster sees a very large piece of code that they need to insert into one of their pages, they might get a little nervous, thinking it&#39;s more complex than it really is.<\/p>\n<p>So, I decided to dumb it down a bit, by hiding the textarea which contained the code, and leveraging <a href=\"https:\/\/github.com\/mojombo\/clippy\" target=\"_blank\">clippy<\/a>. So, now the user initially sees the following:<\/p>\n<p><a href=\"http:\/\/www.sitekickr.com\/blog\/wp-content\/uploads\/2012\/08\/clippy.png\"><img loading=\"lazy\" alt=\"\" class=\"alignnone size-full wp-image-739\" height=\"25\" src=\"http:\/\/www.sitekickr.com\/blog\/wp-content\/uploads\/2012\/08\/clippy.png\" title=\"clippy\" width=\"103\" \/><\/a><\/p>\n<p>The process is unbelievably simple, just drop your HTML inside the &lt;param&gt; and &lt;embed&gt; tags. Don&#39;t forget to change double quotes to single quotes so you don&#39;t freak out your browser&#39;s HTML parser.<\/p>\n<p>Then, offer a &quot;See Code&quot; link for webmasters, which reveals the textarea.<\/p>\n<p><code>&lt;a class=&quot;see-code&quot;&gt;See code&lt;\/a&gt; | <\/p>\n<p>\t&nbsp;&nbsp; &lt;object classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot; width=&quot;110&quot; height=&quot;14&quot;&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;param name=&quot;movie&quot; value=&quot;clippy.swf&quot;\/&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;param name=&quot;quality&quot; value=&quot;high&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;param name=&quot;scale&quot; value=&quot;noscale&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;param NAME=&quot;FlashVars&quot; value=&quot;text=MY (single quote) CODE HERE&quot;&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;param name=&quot;bgcolor&quot; value=&quot;#ffffff&quot;&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; &lt;embed src=&quot;clippy.swf&quot; width=&quot;110&quot; height=&quot;14&quot;<br \/>\n\t&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; quality=&quot;high&quot; allowScriptAccess=&quot;always&quot; type=&quot;application\/x-shockwave-flash&quot;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; pluginspage=&quot;http:\/\/www.macromedia.com\/go\/getflashplayer&quot; FlashVars=&quot;text=MY (single quote) CODE HERE&quot; bgcolor=&quot;#ffffff&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &lt;\/object&gt;<\/p>\n<p>\t&lt;br \/&gt;<br \/>\n\t&lt;textarea style=&quot;display: none;&quot; onclick=&quot;this.select();&quot;&gt;MY CODE HERE&lt;\/textarea&gt;<\/p>\n<p>\t<\/code><\/p>\n<p>Just be sure to upload clippy.swf to your server somewhere, then drop in a little jQuery to reveal the textarea.<\/p>\n<p><code>&lt;script type=&quot;text\/javascript&quot;&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp; $(&#39;.see-code&#39;).click(function() { $(this).next().next().next().slideToggle(); });<br \/>\n\t&lt;\/script&gt;<br \/>\n\t<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I created a affiliate banner program for a client this week, and sent the final page over for review. Everything went well, except, my client&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[14,5],"tags":[82],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/738"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=738"}],"version-history":[{"count":1,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/738\/revisions"}],"predecessor-version":[{"id":740,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/738\/revisions\/740"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}