开发者

wp columns tag clouding with ruby on rails

开发者 https://www.devze.com 2022-12-27 23:23 出处:网络
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 t

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.addVariabl开发者_如何学编程e("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>


Please confirm that swfobject.js must be in public/javascripts folder and tagcloud.swf must be in the public folder.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号