Skip to content

Commit

Permalink
minor bugfix in the disqus and google-analytics play tags
Browse files Browse the repository at this point in the history
  • Loading branch information
fdrouet committed Apr 27, 2011
1 parent 28eb87e commit d348b27
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
19 changes: 10 additions & 9 deletions app/views/tags/disqus/comments.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
%{ ~~~~~~~~~~~~~~~~~~~~~
*{ ~~~~~~~~~~~~~~~~~~~~~
# Parameters
- identifier : the Thread identifier to use in the current forum
~~~~~~~~~~~~~~~~~~~~~ }%
~~~~~~~~~~~~~~~~~~~~~ }*
#{if play.configuration['plui.disqus.shortname']}
<!-- Disqus forum thread - START -->
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '${play.configuration['plui.disqus.shortname']}';
// The following are highly recommended additional parameters. Remove the slashes in front to use.
// var disqus_identifier = 'unique_dynamic_id_1234';
// var disqus_url = 'http://example.com/permalink-to-page.html';
#{if _identifier}
var disqus_identifier = '${_identifier}';
#{/if}
#{if play.mode.name() == 'DEV'}
var disqus_developer = 1;
#{/if}
#{if _identifier}var disqus_identifier = '${_identifier}';#{/if}

#{if play.mode.name() == 'DEV'}var disqus_developer = 1;#{/if}
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
#{/if}
<!-- Disqus forum thread - START -->
#{/if}
#{else}<!-- no Disqus forum thread integration -->#{/else}
11 changes: 6 additions & 5 deletions app/views/tags/google-analytics/js.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
%{ ~~~~~~~~~~~~~~~~~~~~~
# Parameters
*{ ~~~~~~~~~~~~~~~~~~~~~
# Parameters
- <nothing>
~~~~~~~~~~~~~~~~~~~~~ }%
#{if play.mode.name() == 'DEV' && plui.googleanalytics.indev == false}
~~~~~~~~~~~~~~~~~~~~~ }*
#{if play.mode.name() == 'DEV' && play.configuration['plui.googleanalytics.indev'] == false}
<!-- No Google Analytics tracker (DEV Mode) -->
#{/if}
#{elseif play.configuration['plui.googleanalytics.account']}
<!-- Google Analytics tracker -->
<!-- Google Analytics tracker - START -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '${play.configuration['plui.googleanalytics.account']}']);
Expand All @@ -17,6 +17,7 @@
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- Google Analytics tracker - END -->
#{/elseif}
#{else}
<!-- No Google Analytics tracker (no account specified) -->
Expand Down

0 comments on commit d348b27

Please sign in to comment.