-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Isso comments plugin #651
Isso comments plugin #651
Conversation
Hey @ArthurHoaro , looks cool. Just to make sure I understand (I have not tested it yet): if (count($data['links']) == 1) { The comments box is only displayed when there is only one link visible (access by permalink, or search with a single result)? Or does it litter the linklist with 30 comment boxes? The first solution is preferable. Simple code, great work |
Thanks! Yes, it is displayed only when 1 link is displayed. However, I didn't think of search results. It probably shouldn't be displayed in this case. |
To avoid ISSO to be displayed on search result, you could use the same condition I used for my disqus plugin: checking that there is only 1 result and that the query string parameter if(count($data['links']) === 1 && !isset($_GET['page']) && !empty($disqusShortname)){ Just ignore the last part of the condition, here. Additionally, if you really want to be sure you're on the expected page, you can also check that the current link's ID is actually present in the URL: if(isset($_GET[$link['shorturl']])){ It's a bit extreme as it should always be true but just in case. |
Updated!
|
a2203e4
to
f688432
Compare
@@ -0,0 +1,3 @@ | |||
#isso-thread > h4 { | |||
text-align: center; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline
* Plugin Isso. | ||
*/ | ||
|
||
$issoUrl = $conf->get('plugins.ISSO_SERVER'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
access to $conf
could be made directly from the Linklist render hook, which would help keeping test code clean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll use #659. The errors were assigned at PageBuilder initialization, which prevent from using your solution.
Use Isso client to let visitors comments on permalinks
f688432
to
bf26e7e
Compare
Updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Use Isso client to let visitors comments on permalinks
Note: also affect private links because links can previously commented links can be set to private and the other way around.
Note bis: It's not beautifully integrated for now.
ping #181