[typo] MeasureMap integration

Denis Lamotte dlamotte at bamboo.lu
Tue Nov 8 09:14:55 EST 2005


You need to adapt your theme. i do it with MT. so i adapt the code .
I've not tested it but your free to try

inside the default.rhtml layout
<script type="text/javascript" 
src="http://tracker.measuremap.com/a/[Your ID Here]"></script>
<%unless @article.nil %>
<%= render :partial => 'shared/measuremap' %>
<% end -%>

inside shared/_measuremap.rhml
(you can place it in your loval views folder in your theme with typo svn 
  version 725+)

<script type="text/javascript"><!--
if(!mmposts){var mmposts=[];}mmposts[mmposts.length]="<%= @article.id %>";
//--></script>
<!-- mmp mmid:<%= @article.id %> mmdate:<%= 
@article.created_at.strftime('%Y%m%d%H%M%S') %> mmurl:<%= 
@article.permalink %> mmtitle:<%=h(@article.title)%> -->
<% @articles.comments.each do |comment| %>
<script type="text/javascript"><!--
if(!mmcomments){var mmcomments=[];}mmcomments[mmcomments.length]="<%= 
comment.id%>";
//--></script>
<!-- mmc mmid:<%= comment.id %> mmdate:<%= 
comment.created_at.strftime('%Y%m%d%H%M%S') %> mmauthor:<%= 
h(comment.author)%> -->
<% end -%>


Nathaniel Talbott wrote:
> I just got a shiny new MeasureMap invitation in my email inbox... hope
> you did, too :-). Anyhow, I'd like to get it integrated in to my Typo
> blog, and was wondering if anyone had already done the dirty work of
> figuring out exactly where to inject things.
> 
> Thanks,
> 
> 
> --
> Nathaniel Talbott
> 
> <:((><
> 
> _______________________________________________
> Typo-list mailing list
> Typo-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/typo-list
> 
> 



More information about the Typo-list mailing list