0
我用wp列(java脚本)标记云,但它不wrking。它包含像tagcloud.swf和swfobject.js文件。我已经加入公用文件夹在该文件中,并添加html.erb文件中的观点,但它不是生成代码,并显示在页面上的任何东西 代码wp列标签与红宝石在路轨上混淆
<%= javascript_include_tag 'swfobject.js' %>
<style type="text/css">
body { background-color: #eee; padding: 20px; }
</style>
<%标签=( 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>
是的,他们是:JS文件夹中的js和公共文件夹朋友中的tagcloud – 2010-04-22 08:37:26