Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
[buildout]
develop = .
parts = scripts test
parts = scripts instance test
versions = versions
extends =
http://dist.plone.org/release/4.0.1/versions.cfg
http://good-py.appspot.com/release/dexterity/1.0b1?plone=4.0.1
http://good-py.appspot.com/release/plone.app.theming/1.0b9
http://good-py.appspot.com/release/dexterity/1.2?plone=4.1.4

[versions]

[scripts]
recipe = zc.recipe.egg
eggs =
collective.facebookcomments
zest.releaser
ZopeSkel
PasteScript
PasteDeploy
Paste
zopeskel.dexterity

[instance]
recipe = plone.recipe.zope2instance
user = admin:password
http-address = 8080

eggs =
Plone
collective.facebookcomments

zcml =

[test]
recipe = zc.recipe.testrunner
defaults = ['--tests-pattern', '^f?tests$', '-v']
Expand Down
2 changes: 1 addition & 1 deletion collective/facebookcomments/facebook_comments.pt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-comments" tal:attributes="data-href here/absolute_url" data-num-posts="2" data-width="500"></div>
<div class="fb-comments" tal:attributes="data-href view/url" data-num-posts="2" data-width="725"></div>
</tal:block>
9 changes: 8 additions & 1 deletion collective/facebookcomments/viewlets.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ def update(self):
pass

def available(self):
return self.context.portal_type in self.settings.portal_types
return self.settings.portal_types and self.context.portal_type in self.settings.portal_types

def url(self):
url1 = self.context.absolute_url()
if not url1.endswith('/view'):
url1 += '/view'
url1 = url1.replace('image_', 'leadImage_')
return url1

render = ViewPageTemplateFile("facebook_comments.pt")

Expand Down
2 changes: 1 addition & 1 deletion collective/facebookcomments/vocabularies.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
__docformat__ = "epytext"

from Acquisition import aq_inner
from zope.app.component.hooks import getSite
from zope.site.hooks import getSite
from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
from Products.CMFCore.utils import getToolByName

Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
[z3c.autoinclude.plugin]
target = plone
""",
setup_requires=["PasteScript"],
paster_plugins = ["ZopeSkel"],

)