Skip to content

Commit

Permalink
thanks John Tantalo
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Golub committed Mar 2, 2011
1 parent 96b802b commit 1346bf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blog.py
Expand Up @@ -340,7 +340,8 @@ def render(self, entry, show_comments=False):


def javascript_files(self): def javascript_files(self):
if self.show_comments: if self.show_comments:
return ["http://connect.facebook.net/en_US/all.js#xfbml=1"] return ["http://connect.facebook.net/en_US/all.js#appId=" +
self.handler.application.settings["fb_app_id"] + "&xfbml=1"]
return None return None




Expand Down
1 change: 1 addition & 0 deletions templates/modules/entry.html
Expand Up @@ -21,6 +21,7 @@ <h1><a href="/{{ entry.slug }}">{{ escape(entry.title) }}</a></h1>
{% end %} {% end %}
<div class="comments" id="comments"> <div class="comments" id="comments">
{% if show_comments %} {% if show_comments %}
<div id="fb-root"></div>
<fb:comments href="{{ 'http://' + request.host + '/' + entry.slug }}"></fb:comments> <fb:comments href="{{ 'http://' + request.host + '/' + entry.slug }}"></fb:comments>
{% else %} {% else %}
<a href="/{{ entry.slug }}#comments">{{ _("Comments") }}</a> <a href="/{{ entry.slug }}#comments">{{ _("Comments") }}</a>
Expand Down

0 comments on commit 1346bf9

Please sign in to comment.