Commit b37e0442586bc8366682a0ed2372ad9605d809fb

  • avatar
  • Esa-Matti Suuronen <esa-matti @suur…en.org> (Committer)
  • Tue Apr 05 13:57:08 EEST 2011
  • avatar
  • Esa-Matti Suuronen <esa-matti @suur…en.org> (Author)
  • Tue Apr 05 13:57:08 EEST 2011
add discuss commenting
instanssi_theme/static/css/lfc.css
(16 / 1)
  
636636 height: 22px ;
637637}
638638.search-form input[type=text]{
639 width: 80px;
639 width: 70px;
640640}
641641.search-form form {
642642 display: inline;
773773.screenname {
774774 background-image: url("/media/instanssi_theme/img/twitter.png");
775775 background-repeat: no-repeat;
776}
777
778
779#disqus_thread {
780 margin-left: 1em;
781}
782
783
784
785/* hide lfc comments */
786a[name="comments"],
787div.comment,
788div.blog-by-line a
789{
790 display: none;
776791}
instanssi_theme/templates/discus/comments.html
(22 / 0)
  
1{% if active %}
2
3<div id="disqus_thread"></div>
4<script type="text/javascript">
5 /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
6 var disqus_developer = {{ disqus_developer }};
7 var disqus_shortname = '{{ disqus_shortname }}'; // required: replace example with your forum shortname
8 // The following are highly recommended additional parameters. Remove the slashes in front to use.
9 var disqus_identifier = '{{ disqus_identifier }}';
10 var disqus_url = '{{ disqus_url }}';
11
12 /* * * DON'T EDIT BELOW THIS LINE * * */
13 (function() {
14 var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
15 dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
16 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
17 })();
18</script>
19<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
20<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
21
22{% endif %}
instanssi_theme/templates/lfc/base.html
(5 / 0)
  
184184 {% include "comments/comments.html" %}
185185 {% endblock %}
186186 </div>
187
188 {% render_discus_comments %}
189
190
191
187192 </div>
188193
189194 {% if SlotRight %}
instanssi_theme/templatetags/instanssi_tags.py
(19 / 0)
  
66from django.core.cache import cache
77from django.http import Http404
88
9
910# lfc imports
1011import lfc.utils
1112from lfc.utils import get_portal
1213
1314register = template.Library()
15
16
17@register.inclusion_tag('discus/comments.html', takes_context=True)
18def render_discus_comments(context):
19
20 lfc_context = context.get("lfc_context")
21 req = context.get("request")
22
23 if req.path in settings.DISCUS_DISABLED:
24 return { 'active': False }
25
26 return {
27 'active': True,
28 'disqus_shortname': settings.DISCUS_SHORTNAME,
29 'disqus_identifier': "%s_page_%s" % (settings.DISCUS_SHORTNAME, lfc_context.id),
30 'disqus_url': "%s%s" % (settings.DISCUS_BASE_URL, lfc_context.get_absolute_url()),
31 'disqus_developer': int(settings.DEBUG),
32 }
1433
1534@register.inclusion_tag('lfc/tags/tabs.html', takes_context=True)
1635def second_level_tabs(context):