sebsauvage / Shaarli

The personal, minimalist, super-fast, no-database delicious clone.
http://sebsauvage.net/wiki/doku.php?id=php:shaarli
Other
676 stars 390 forks source link

Pingback support #75

Open Leomaradan opened 11 years ago

Leomaradan commented 11 years ago

Shaarli don't have a comment system. sometime, it's difficult to respond to a shared link. For exemple, Seb share a link about PHP optimization (http://www.sebsauvage.net/links/?VEc_LQ). I want to respond because, IMHO, the article contains errors. I have 2 solutions :

1: Share the permalink of Seb's Shaarli in my own Shaarli with my comment. But if Seb don't read my Shaarli, he can't read my comment 2: Send an email to Seb. And now Seb receive hundreds of emails

I propose to add pingback mecanism: When adding a link, my Shaarli will check if the page has pingback support.

The popular use is by adding a <link> in the head of the page (<link rel="pingback" href="http://urlofmyblog.com/xmlrpc.php" />). This syntax is used by WordPress, for the exemple

If pingback is supported by the page, Shaarli sent a message to the url indicated by the link balise.

In the other side, if a visitor share a link from my Shaarli, my server receive the notification. All the pingback are collapsed in a section of the Shaarli's post (for exemple : http://leomaradan.com/imgshare/photos/8971722e0d8519fc5bff352859ba334e.png)

Leomaradan commented 11 years ago

I just added the first step for this functionality in my fork : Now Shaarli can send a ping to page with pingback enabled.

The first step is creating the xml-rpc parser into shaarli to accept ping from other sources

https://github.com/Leomaradan/Shaarli/commit/1e24fc686e3a1e53cbb6417638e47d594ea2ffc0

nodiscc commented 9 years ago

@Leomaradan the shaarli/Shaarli community fork has a plugin system (currently in development) in the new-plugin-system branch. You could add a Pingback plugin by sending a Pull Request with your implementation on this branch.

Read here for reasons of the fork. Look in the tpl/plugins/ directory for example plugin code. We're not willing to work on this but patches welcome.