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

Comments

Projects
None yet
7 participants
@NerosTie

NerosTie commented Mar 30, 2015

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

This comment has been minimized.

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.

@NerosTie

This comment has been minimized.

NerosTie commented Mar 30, 2015

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

@nodiscc

This comment has been minimized.

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 referenced this issue May 11, 2015

Closed

Plugin system #14

ArthurHoaro added 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

This comment has been minimized.

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

This comment has been minimized.

Member

ArthurHoaro commented Jun 2, 2016

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

This comment has been minimized.

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

This comment has been minimized.

Member

virtualtam commented Jun 2, 2016

Thanks @NerosTie for sharing :)

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

@ArthurHoaro

This comment has been minimized.

Member

ArthurHoaro commented Jun 3, 2016

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

@NerosTie

This comment has been minimized.

NerosTie commented Jun 5, 2016

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

@ArthurHoaro

This comment has been minimized.

Member

ArthurHoaro commented Jun 6, 2016

Ok, I'll look into it.

@ArthurHoaro

This comment has been minimized.

Member

ArthurHoaro commented Jun 6, 2016

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

This comment has been minimized.

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

This comment has been minimized.

Member

ArthurHoaro commented Jun 6, 2016

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

This comment has been minimized.

kalvn commented Jun 6, 2016

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

@mro

This comment has been minimized.

mro commented Jun 6, 2016

@NerosTie

This comment has been minimized.

NerosTie commented Jun 10, 2016

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

This comment has been minimized.

Member

ArthurHoaro commented Jun 10, 2016

That's what I said #181 (comment)

@NerosTie

This comment has been minimized.

NerosTie commented Jun 10, 2016

Exact, I forgot about this....

So, there is no possible solution?

@ArthurHoaro

This comment has been minimized.

Member

ArthurHoaro commented Jun 10, 2016

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

This comment has been minimized.

NerosTie commented Jun 10, 2016

There is a PR here: blatinier/isso@f1325cc

Maybe it helps

EDIT: nope.

@ArthurHoaro

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

NerosTie commented Sep 21, 2016

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

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

Maybe it would help for the plugin in Shaarli?

@ArthurHoaro

This comment has been minimized.

Member

ArthurHoaro commented Oct 3, 2016

It's working! o/

@NerosTie

This comment has been minimized.

NerosTie commented Oct 3, 2016

Yeah! It's a good news! 🎉

@NerosTie

This comment has been minimized.

NerosTie commented Nov 21, 2016

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

@ArthurHoaro

This comment has been minimized.

Member

ArthurHoaro commented Nov 21, 2016

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

@poVoq

This comment has been minimized.

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

This comment has been minimized.

Member

ArthurHoaro commented Jan 30, 2018

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

@poVoq

This comment has been minimized.

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