wp columns tag clouding with ruby on rails

Posted by Arpit Vaishnav on Stack Overflow See other posts from Stack Overflow or by Arpit Vaishnav
Published on 2010-04-22T08:22:01Z Indexed on 2010/04/22 8:23 UTC
Read the original article Hit count: 305

Filed under:

i am wrking on tag clouds with wp columns ( java script) but it s not wrking .It contains files like tagcloud.swf and swfobject.js . I have added this file in public folder and added html.erb file in the view but its not generating the code and showing any thing on the page the code is

<%= javascript_include_tag 'swfobject.js' %>
<style type="text/css">
  body { background-color: #eee; padding: 20px; }
</style>

<% tags = (current_user.all_tags) %> <% all_tags = tags.flatten.uniq%>

<script type="text/javascript">
    var so = new SWFObject("/tagcloud.swf", "tagcloud", "600", "400", "7", "#ffffff");
    // uncomment next line to enable transparency
    //so.addParam("wmode", "transparent");
    so.addVariable("tcolor", "0x333333");
    so.addVariable("mode", "tags");
    so.addVariable("distr", "true");
    so.addVariable("tspeed", "100");
    so.addVariable("tagcloud", "<tags>

        <% for t in all_tags %>
          <a href='#' style='22' color='0xff0000' hicolor='0x00cc00'><%=t.to_s%></a>
         <%#= link_to t.to_s ,tag_index_path(t) %>
        <% end %></tags>");
    so.write("flashcontent");
</script></body>

© Stack Overflow or respective owner

Related posts about ruby-on-rails