home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2012 January / maximum-cd-2012-01.iso / DiscContents / digsby_setup.exe / lib / plugins / facebook / res / comment_post_link.py.xml < prev    next >
Encoding:
Text File  |  2011-02-08  |  1.0 KB  |  19 lines

  1. <?PY
  2. DISLIKE = _("Dislike! (via http://digsby.com/fb)")
  3. ?>
  4. <?py
  5. from common import pref
  6. num_comments = ('comments' in post and 'count' in post.comments and post.comments.count != '0' and post.comments.count) or 0;
  7. can_comment = 'comments' in post and 'can_post' in post.comments and post.comments.can_post;
  8. if pref('facebook.dislike_enabled', type=bool, default=True):
  9.     num_dislikes = (post.post_id in feed.comments and len([c for c in feed.comments[post.post_id] if c.text == #{{repr(DISLIKE)}}])) or 0;
  10. else:
  11.     num_dislikes = 0;
  12. num_non_dislike_comments = max(num_comments - num_dislikes, 0);
  13. ?>
  14. <?py if num_non_dislike_comments > 50: ?>
  15.     <div class="comment_post_link" style="clear:left"><a href="${post.permalink}" class="link">${_('See all %d comments') % num_non_dislike_comments}</a></div>
  16. <?py elif 'comment_count' in _context and comment_count == -1: ?>
  17.     <div class="comment_post_link" style="clear:left"><a href="${post.permalink}" class="link">${{_('See all comments')}}</a></div>
  18. <?py #endif ?>
  19.