shares.php 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4. * This is a configuration file. You shouldn’t modify it unless you know what
  5. * you are doing. If you want to add a share type, this is where you need to do
  6. * it.
  7. *
  8. * For each share there is different configuration options. Here is the description
  9. * of those options:
  10. * - 'deprecated' (optional) is a boolean. Default: 'false'.
  11. * 'true', if the sharing service is planned to remove in the future.
  12. * Add more information into the documentation center.
  13. * - 'HTMLtag' (optional). If it is 'button' then an HTML <button> is used,
  14. * else an <a href=""> is used. Add a click event in main.js additionally.
  15. * - 'url' is a mandatory option. It is a string representing the share URL. It
  16. * supports 4 different placeholders for custom data. The ~URL~ placeholder
  17. * represents the URL of the system used to share, it is configured by the
  18. * user. The ~LINK~ placeholder represents the link of the shared article.
  19. * The ~TITLE~ placeholder represents the title of the shared article. The
  20. * ~ID~ placeholder represents the id of the shared article (only useful
  21. * for internal use)
  22. * - 'transform' is an array of transformation to apply on links and titles
  23. * - 'help' is a URL to a help page (mandatory for form = 'advanced')
  24. * - 'form' is the type of form to display during configuration. It’s either
  25. * 'simple' or 'advanced'. 'simple' is used when only the name is configurable,
  26. * 'advanced' is used when the name and the location are configurable.
  27. * - 'method' is the HTTP method (POST or GET) used to share a link.
  28. */
  29. return [
  30. 'archiveORG' => [
  31. 'url' => 'https://web.archive.org/save/~LINK~',
  32. 'transform' => [],
  33. 'help' => 'https://web.archive.org',
  34. 'form' => 'simple',
  35. 'method' => 'GET',
  36. ],
  37. 'archivePH' => [
  38. 'url' => 'https://archive.ph/submit/?url=~LINK~',
  39. 'transform' => [],
  40. 'help' => 'https://archive.ph/',
  41. 'form' => 'simple',
  42. 'method' => 'GET',
  43. ],
  44. 'blogotext' => [
  45. 'deprecated' => true,
  46. 'url' => '~URL~/admin/links.php?url=~LINK~',
  47. 'transform' => [],
  48. 'help' => 'http://lehollandaisvolant.net/blogotext/fr/',
  49. 'form' => 'advanced',
  50. 'method' => 'GET',
  51. ],
  52. 'buffer' => [
  53. 'url' => 'https://publish.buffer.com/compose?url=~LINK~&text=~TITLE~',
  54. 'transform' => ['rawurlencode'],
  55. 'help' => 'https://support.buffer.com/hc/en-us/articles/360035587394-Scheduling-posts',
  56. 'form' => 'simple',
  57. 'method' => 'GET',
  58. ],
  59. 'clipboard' => [
  60. 'HTMLtag' => 'button',
  61. 'url' => '~LINK~',
  62. 'transform' => [],
  63. 'form' => 'simple',
  64. 'method' => 'GET',
  65. ],
  66. 'diaspora' => [
  67. 'url' => '~URL~/bookmarklet?url=~LINK~&amp;title=~TITLE~',
  68. 'transform' => ['rawurlencode'],
  69. 'help' => 'https://diasporafoundation.org/',
  70. 'form' => 'advanced',
  71. 'method' => 'GET',
  72. ],
  73. 'email' => [
  74. 'url' => 'mailto:?subject=~TITLE~&amp;body=~LINK~',
  75. 'transform' => ['rawurlencode'],
  76. 'form' => 'simple',
  77. 'method' => 'GET',
  78. ],
  79. 'email-webmail-firefox-fix' => [ // see https://github.com/FreshRSS/FreshRSS/issues/2666
  80. 'url' => 'mailto:?subject=~TITLE~&amp;body=~LINK~',
  81. 'transform' => ['rawurlencode'],
  82. 'form' => 'simple',
  83. 'method' => 'GET',
  84. ],
  85. 'facebook' => [
  86. 'url' => 'https://www.facebook.com/sharer.php?u=~LINK~&amp;t=~TITLE~',
  87. 'transform' => ['rawurlencode'],
  88. 'form' => 'simple',
  89. 'method' => 'GET',
  90. ],
  91. 'gnusocial' => [
  92. 'url' => '~URL~/notice/new?content=~TITLE~%20~LINK~',
  93. 'transform' => ['urlencode'],
  94. 'help' => 'https://gnu.io/social/',
  95. 'form' => 'advanced',
  96. 'method' => 'GET',
  97. ],
  98. 'jdh' => [
  99. 'url' => 'https://www.journalduhacker.net/stories/new?url=~LINK~&title=~TITLE~',
  100. 'transform' => ['rawurlencode'],
  101. 'form' => 'simple',
  102. 'method' => 'GET',
  103. ],
  104. 'Known' => [
  105. 'url' => '~URL~/share?share_url=~LINK~&share_title=~TITLE~',
  106. 'transform' => ['rawurlencode'],
  107. 'help' => 'https://withknown.com/',
  108. 'form' => 'advanced',
  109. 'method' => 'GET',
  110. ],
  111. 'lemmy' => [
  112. 'url' => '~URL~/create_post?url=~LINK~&title=~TITLE~',
  113. 'transform' => ['rawurlencode'],
  114. 'help' => 'https://join-lemmy.org/',
  115. 'form' => 'advanced',
  116. 'method' => 'GET',
  117. ],
  118. 'linkding' => [
  119. 'url' => '~URL~/bookmarks/new?url=~LINK~&title=~TITLE~&auto_close',
  120. 'transform' => ['rawurlencode'],
  121. 'help' => 'https://github.com/sissbruecker/linkding/blob/master/docs/how-to.md',
  122. 'form' => 'advanced',
  123. 'method' => 'GET',
  124. ],
  125. 'linkedin' => [
  126. 'url' => 'https://www.linkedin.com/shareArticle?url=~LINK~&amp;title=~TITLE~&amp;source=FreshRSS',
  127. 'transform' => ['rawurlencode'],
  128. 'form' => 'simple',
  129. 'method' => 'GET',
  130. ],
  131. 'mastodon' => [
  132. 'url' => '~URL~/share?title=~TITLE~&url=~LINK~',
  133. 'transform' => ['rawurlencode'],
  134. 'help' => 'https://joinmastodon.org/',
  135. 'form' => 'advanced',
  136. 'method' => 'GET',
  137. ],
  138. 'movim' => [
  139. 'url' => '~URL~/?share/~LINK~',
  140. 'transform' => ['urlencode'],
  141. 'help' => 'https://movim.eu/',
  142. 'form' => 'advanced',
  143. 'method' => 'GET',
  144. ],
  145. 'omnivore' => [
  146. 'url' => '~URL~/api/save?url=~LINK~',
  147. 'transform' => ['urlencode'],
  148. 'help' => 'https://omnivore.app/',
  149. 'form' => 'advanced',
  150. 'method' => 'GET',
  151. ],
  152. 'pinboard' => [
  153. 'url' => 'https://pinboard.in/add?next=same&amp;url=~LINK~&amp;title=~TITLE~',
  154. 'transform' => ['urlencode'],
  155. 'help' => 'https://pinboard.in/api/',
  156. 'form' => 'simple',
  157. 'method' => 'GET',
  158. ],
  159. 'pinterest' => [
  160. 'url' => 'https://pinterest.com/pin/create/button/?url=~LINK~',
  161. 'transform' => ['rawurlencode'],
  162. 'help' => 'https://pinterest.com/',
  163. 'form' => 'simple',
  164. 'method' => 'GET',
  165. ],
  166. 'pocket' => [
  167. 'url' => 'https://getpocket.com/save?url=~LINK~&amp;title=~TITLE~',
  168. 'transform' => ['rawurlencode'],
  169. 'form' => 'simple',
  170. 'method' => 'GET',
  171. ],
  172. 'print' => [
  173. 'HTMLtag' => 'button',
  174. 'url' => '#',
  175. 'transform' => [],
  176. 'form' => 'simple',
  177. 'method' => 'GET',
  178. ],
  179. 'raindrop' => [
  180. 'url' => 'https://app.raindrop.io/add?link=~LINK~&title=~TITLE~',
  181. 'transform' => ['rawurlencode'],
  182. 'form' => 'simple',
  183. 'method' => 'GET',
  184. ],
  185. 'reddit' => [
  186. 'url' => 'https://www.reddit.com/submit?url=~LINK~',
  187. 'transform' => ['rawurlencode'],
  188. 'help' => 'https://www.reddit.com/wiki/submitting?v=c2ae883a-04b9-11e4-a68c-12313b01a1fc',
  189. 'form' => 'simple',
  190. 'method' => 'GET',
  191. ],
  192. 'shaarli' => [
  193. 'url' => '~URL~?post=~LINK~&amp;title=~TITLE~&amp;source=FreshRSS',
  194. 'transform' => ['rawurlencode'],
  195. 'help' => 'http://sebsauvage.net/wiki/doku.php?id=php:shaarli',
  196. 'form' => 'advanced',
  197. 'method' => 'GET',
  198. ],
  199. 'twitter' => [
  200. 'url' => 'https://twitter.com/share?url=~LINK~&amp;text=~TITLE~',
  201. 'transform' => ['rawurlencode'],
  202. 'form' => 'simple',
  203. 'method' => 'GET',
  204. ],
  205. 'wallabag' => [
  206. 'url' => '~URL~?action=add&amp;url=~LINK~',
  207. 'transform' => ['rawurlencode'],
  208. 'help' => 'http://www.wallabag.org/',
  209. 'form' => 'advanced',
  210. 'method' => 'GET',
  211. ],
  212. 'wallabagv2' => [
  213. 'url' => '~URL~/bookmarklet?url=~LINK~',
  214. 'transform' => ['rawurlencode'],
  215. 'help' => 'http://www.wallabag.org/',
  216. 'form' => 'advanced',
  217. 'method' => 'GET',
  218. ],
  219. 'web-sharing-api' => [
  220. 'HTMLtag' => 'button',
  221. 'url' => '~LINK~',
  222. 'transform' => [],
  223. 'form' => 'simple',
  224. 'method' => 'GET',
  225. ],
  226. 'whatsapp' => [
  227. 'url' => 'https://wa.me/?text=~TITLE~ | ~LINK~',
  228. 'transform' => ['rawurlencode'],
  229. 'help' => 'https://faq.whatsapp.com/iphone/how-to-link-to-whatsapp-from-a-different-app/?lang=en',
  230. 'form' => 'simple',
  231. 'method' => 'GET',
  232. ],
  233. 'xing' => [
  234. 'url' => 'https://www.xing.com/spi/shares/new?url=~LINK~',
  235. 'transform' => ['rawurlencode'],
  236. 'help' => 'https://dev.xing.com/plugins/share_button/docs',
  237. 'form' => 'simple',
  238. 'method' => 'GET',
  239. ],
  240. ];