Skip to content
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

Add Disqus or Isso comments box on a permalink page #181

Closed
NerosTie opened this issue Mar 30, 2015 · 30 comments
Closed

Add Disqus or Isso comments box on a permalink page #181

NerosTie opened this issue Mar 30, 2015 · 30 comments
Labels
feature plugin bells and whistles
Milestone

Comments

@NerosTie
Copy link

It could be very great to have a comments box on permalink pages.
Major improvment: you can chat! Instead of chatting via multiple "shaarli river" instances.

I'm trying to add this in shaarli for isso:

<script data-isso="//sub.mydomain.tld/"
    src="//sub.mydomain.tld/js/embed.min.js"></script>
<div><section id="isso-thread"></section></div>

But I have no idea how "pages" work in shaarli.
Can you help me please?

http://posativ.org/isso/

(I think issue #175 must be fixed to work well, because Isso needs the title)

@nodiscc
Copy link
Member

nodiscc commented Mar 30, 2015

Hi, this is similar to previously requested "comment systems". It was decided that Shaarli could include external comments systems through plugins: have a look at the pull request #164. It's not merged yet, but it provides a way to add custom elements to Shaarli's template.

Basically, using this branch, you can:

  • add <script data-isso="//sub.mydomain.tld/" src="//sub.mydomain.tld/js/embed.min.js"></script> to tpl/plugins/isso/isso.includes.html and it will be included in the page <head>
  • add <div><section id="isso-thread"></section></div> to tpl/plugins/isso/isso.linklist.html and it will be included for each link, in the link info bar.

I guess you need to specify different ids, else your isso comments thread will be the same for all displayed links. For example you could use somtehing like id="isso-thread-$permalink" and have each div render a different comments thread, I don't how isso handles that.

Anyway this is a very good use case for the planned plugin system, I can make changes to the pull request if you need more features/want to do things differently. Your ideas are welcome.

@nodiscc nodiscc added plugin bells and whistles feature labels Mar 30, 2015
@NerosTie
Copy link
Author

Thanks! I will wait the merge of #164 and I will try again.

@nodiscc
Copy link
Member

nodiscc commented Apr 2, 2015

@NerosTie I've read the isso doc and this should be doable, check https://github.com/nodiscc/Shaarli/blob/new-plugin-system/tpl/plugins/TODO.md. You would have to first click a permalink to see comments on this article. The linklist would only show a 0 comments, 15 comments ... counter for each shaarlink (no full comments threads in the linklist, only in permalink view)

@nodiscc nodiscc added this to the 1.0 milestone Apr 14, 2015
@nodiscc nodiscc modified the milestones: future, 1.0 May 11, 2015
@nodiscc nodiscc mentioned this issue May 11, 2015
ArthurHoaro pushed a commit to ArthurHoaro/Shaarli that referenced this issue Jul 12, 2015
nodiscc added a commit that referenced this issue Jul 12, 2015
@nodiscc nodiscc removed their assignment Jul 26, 2015
@NerosTie
Copy link
Author

NerosTie commented Jun 2, 2016

I'm writing a plugin with Isso but I don't find how to activate it only on a permalink page.

I have this line: if($data['_PAGE_'] == Router::$PAGE_LINKLIST){

But it will activate the plugin on the homepage and this is not the expected behavior.

Thanks!

@ArthurHoaro
Copy link
Member

We tried, but couldn't make it work because we weren't able to have a separate thread for different shaare. It looked like we could only have a thread based on the URL index.php/?.

ArthurHoaro@5670545
(it's probably outdated because of search refactoring, but you want to enable it if you have 1 link in $data)

@NerosTie
Copy link
Author

NerosTie commented Jun 2, 2016

It seems to be more complicated than expected... (it was not that hard for Ghost).

Also, there is Hashover: https://github.com/jacobwb/hashover
In action: https://hal-9000.fr/?exgXpg

It could be an alternative.

@virtualtam
Copy link
Member

Thanks @NerosTie for sharing :)

@ArthurHoaro looks like we're good to add a Hashover plugin ^^

@ArthurHoaro
Copy link
Member

Yup, this looks good enough. @NerosTie, do you want to work on it?

@NerosTie
Copy link
Author

NerosTie commented Jun 5, 2016

@ArthurHoaro I can try, but I think I will have the same issue with the homepage.

@ArthurHoaro
Copy link
Member

Ok, I'll look into it.

@ArthurHoaro
Copy link
Member

Actually, I don't think we should make a Hashover plugin. Its code is rather low quality, and its configuration can't be externalized easily. But most importantly, home made encryption functions and storing clear passwords in the configuration file and cookies (!) make me worried about security.

@kalvn
Copy link

kalvn commented Jun 6, 2016

I made a quick Disqus plugin: https://github.com/kalvn/shaarli-plugin-disqus
Don't forget to set your Disqus shortname in the plugin administration page.

The tricky part was to ensure we are on the permalink page but it should work properly.
Let me know if you think it might be useful to add it as a default plugin and want to move it to the Shaarli repo.

@ArthurHoaro
Copy link
Member

Other opinions are welcome, but I'd rather have a solution which doesn't rely on a commercial 3rd party in the main repo. Add it to the wiki though.

@kalvn
Copy link

kalvn commented Jun 6, 2016

I fully agree. I'll see what is doable with Isso.

@mro
Copy link

mro commented Jun 6, 2016

Maybe https://github.com/jacobwb/hashover-next is worth a look.

@NerosTie
Copy link
Author

I have something for Isso but I need help:

https://github.com/NerosTie/isso/

It works, you can comment, but Isso can't find the title and the link is the same everywhere because permalinks begin with ?

@ArthurHoaro
Copy link
Member

That's what I said #181 (comment)

@NerosTie
Copy link
Author

Exact, I forgot about this....

So, there is no possible solution?

@ArthurHoaro
Copy link
Member

Except if we missed something, I'm afraid it can't work until they fix their data-isso-id tag, or add any way to specify the thread we're in.

@NerosTie
Copy link
Author

NerosTie commented Jun 10, 2016

There is a PR here: blatinier/isso@f1325cc

Maybe it helps

EDIT: nope.

@ArthurHoaro
Copy link
Member

ArthurHoaro commented Jun 13, 2016

Maybe https://github.com/jacobwb/hashover-next is worth a look.

It looks way better! I'll try to end up with something.
Although, it's a lot of LOC, I think we should have a separate repo for this.

EDIT: or maybe Shaarli can act as a client... I'll see.

@kalvn
Copy link

kalvn commented Jun 13, 2016

Yes I think it would be better to keep things separated and only add this as a plugin for the client part.

@NerosTie
Copy link
Author

Isso 0.10.5 has been released and there is this:

clients can now use data-title to get the HTML title for a new page

isso-comments/isso#252
https://github.com/posativ/isso/releases/tag/0.10.5

Maybe it would help for the plugin in Shaarli?

@ArthurHoaro
Copy link
Member

It's working! o/

@NerosTie
Copy link
Author

NerosTie commented Oct 3, 2016

Yeah! It's a good news! 🎉

@NerosTie
Copy link
Author

So, it works? Can I close this issue? (I can't test it right now, unfortunately)

@ArthurHoaro
Copy link
Member

Yup. I don't use it, but give us your feedback if you have the time to test it.

@poVoq
Copy link

poVoq commented Jan 30, 2018

Has there ever been any additional work on integrating Hashover-next or a similar php based comment application? Isso is cool, but needs Python which isn't available on many shared-hosts that Shaarli runs on.

@ArthurHoaro
Copy link
Member

Not that I'm aware of. Feel free to provide PR or open another issue regarding a Hashover-next plugin though.

@poVoq
Copy link

poVoq commented Feb 1, 2018

Made a alpha version of a plugin that integrates Hashover-Next:
https://github.com/poVoq/shaarli-plugin-hashover-comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature plugin bells and whistles
Projects
None yet
Development

No branches or pull requests

7 participants