shares.php 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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. 'archiveIS' => [
  38. 'url' => 'https://archive.is/submit/?url=~LINK~',
  39. 'transform' => [],
  40. 'help' => 'https://archive.is/',
  41. 'form' => 'simple',
  42. 'method' => 'GET',
  43. ],
  44. 'archivePH' => [
  45. 'url' => 'https://archive.ph/submit/?url=~LINK~',
  46. 'transform' => [],
  47. 'help' => 'https://archive.ph/',
  48. 'form' => 'simple',
  49. 'method' => 'GET',
  50. ],
  51. 'buffer' => [
  52. 'url' => 'https://publish.buffer.com/compose?url=~LINK~&text=~TITLE~',
  53. 'transform' => ['rawurlencode'],
  54. 'help' => 'https://support.buffer.com/hc/en-us/articles/360035587394-Scheduling-posts',
  55. 'form' => 'simple',
  56. 'method' => 'GET',
  57. ],
  58. 'clipboard' => [
  59. 'HTMLtag' => 'button',
  60. 'url' => '~LINK~',
  61. 'transform' => [],
  62. 'form' => 'simple',
  63. 'method' => 'GET',
  64. ],
  65. 'diaspora' => [
  66. 'url' => '~URL~/bookmarklet?url=~LINK~&amp;title=~TITLE~',
  67. 'transform' => ['rawurlencode'],
  68. 'help' => 'https://diasporafoundation.org/',
  69. 'form' => 'advanced',
  70. 'method' => 'GET',
  71. ],
  72. 'email' => [
  73. 'url' => 'mailto:?subject=~TITLE~&amp;body=~LINK~',
  74. 'transform' => ['rawurlencode'],
  75. 'form' => 'simple',
  76. 'method' => 'GET',
  77. ],
  78. 'email-webmail-firefox-fix' => [ // see https://github.com/FreshRSS/FreshRSS/issues/2666
  79. 'url' => 'mailto:?subject=~TITLE~&amp;body=~LINK~',
  80. 'transform' => ['rawurlencode'],
  81. 'form' => 'simple',
  82. 'method' => 'GET',
  83. ],
  84. 'facebook' => [
  85. 'url' => 'https://www.facebook.com/sharer.php?u=~LINK~&amp;t=~TITLE~',
  86. 'transform' => ['rawurlencode'],
  87. 'form' => 'simple',
  88. 'method' => 'GET',
  89. ],
  90. 'gnusocial' => [
  91. 'url' => '~URL~/notice/new?content=~TITLE~%20~LINK~',
  92. 'transform' => ['urlencode'],
  93. 'help' => 'https://gnu.io/social/',
  94. 'form' => 'advanced',
  95. 'method' => 'GET',
  96. ],
  97. 'jdh' => [
  98. 'url' => 'https://www.journalduhacker.net/stories/new?url=~LINK~&title=~TITLE~',
  99. 'transform' => ['rawurlencode'],
  100. 'form' => 'simple',
  101. 'method' => 'GET',
  102. ],
  103. 'Known' => [
  104. 'url' => '~URL~/share?share_url=~LINK~&share_title=~TITLE~',
  105. 'transform' => ['rawurlencode'],
  106. 'help' => 'https://withknown.com/',
  107. 'form' => 'advanced',
  108. 'method' => 'GET',
  109. ],
  110. 'lemmy' => [
  111. 'url' => '~URL~/create_post?url=~LINK~&title=~TITLE~',
  112. 'transform' => ['rawurlencode'],
  113. 'help' => 'https://join-lemmy.org/',
  114. 'form' => 'advanced',
  115. 'method' => 'GET',
  116. ],
  117. 'linkding' => [
  118. 'url' => '~URL~/bookmarks/new?url=~LINK~&title=~TITLE~&auto_close',
  119. 'transform' => ['rawurlencode'],
  120. 'help' => 'https://github.com/sissbruecker/linkding/blob/master/docs/how-to.md',
  121. 'form' => 'advanced',
  122. 'method' => 'GET',
  123. ],
  124. 'linkedin' => [
  125. 'url' => 'https://www.linkedin.com/shareArticle?url=~LINK~&amp;title=~TITLE~&amp;source=FreshRSS',
  126. 'transform' => ['rawurlencode'],
  127. 'form' => 'simple',
  128. 'method' => 'GET',
  129. ],
  130. 'mastodon' => [
  131. 'url' => '~URL~/share?title=~TITLE~&url=~LINK~',
  132. 'transform' => ['rawurlencode'],
  133. 'help' => 'https://joinmastodon.org/',
  134. 'form' => 'advanced',
  135. 'method' => 'GET',
  136. ],
  137. 'movim' => [
  138. 'url' => '~URL~/?share/~LINK~',
  139. 'transform' => ['urlencode'],
  140. 'help' => 'https://movim.eu/',
  141. 'form' => 'advanced',
  142. 'method' => 'GET',
  143. ],
  144. 'omnivore' => [
  145. 'url' => '~URL~/api/save?url=~LINK~',
  146. 'transform' => ['urlencode'],
  147. 'help' => 'https://omnivore.app/',
  148. 'form' => 'advanced',
  149. 'method' => 'GET',
  150. ],
  151. 'pinboard' => [
  152. 'url' => 'https://pinboard.in/add?next=same&amp;url=~LINK~&amp;title=~TITLE~',
  153. 'transform' => ['urlencode'],
  154. 'help' => 'https://pinboard.in/api/',
  155. 'form' => 'simple',
  156. 'method' => 'GET',
  157. ],
  158. 'pinterest' => [
  159. 'url' => 'https://pinterest.com/pin/create/button/?url=~LINK~',
  160. 'transform' => ['rawurlencode'],
  161. 'help' => 'https://pinterest.com/',
  162. 'form' => 'simple',
  163. 'method' => 'GET',
  164. ],
  165. 'pocket' => [
  166. 'url' => 'https://getpocket.com/save?url=~LINK~&amp;title=~TITLE~',
  167. 'transform' => ['rawurlencode'],
  168. 'form' => 'simple',
  169. 'method' => 'GET',
  170. ],
  171. 'print' => [
  172. 'HTMLtag' => 'button',
  173. 'url' => '#',
  174. 'transform' => [],
  175. 'form' => 'simple',
  176. 'method' => 'GET',
  177. ],
  178. 'raindrop' => [
  179. 'url' => 'https://app.raindrop.io/add?link=~LINK~&title=~TITLE~',
  180. 'transform' => ['rawurlencode'],
  181. 'form' => 'simple',
  182. 'method' => 'GET',
  183. ],
  184. 'reddit' => [
  185. 'url' => 'https://www.reddit.com/submit?url=~LINK~',
  186. 'transform' => ['rawurlencode'],
  187. 'help' => 'https://www.reddit.com/wiki/submitting?v=c2ae883a-04b9-11e4-a68c-12313b01a1fc',
  188. 'form' => 'simple',
  189. 'method' => 'GET',
  190. ],
  191. 'shaarli' => [
  192. 'url' => '~URL~?post=~LINK~&amp;title=~TITLE~&amp;source=FreshRSS',
  193. 'transform' => ['rawurlencode'],
  194. 'help' => 'http://sebsauvage.net/wiki/doku.php?id=php:shaarli',
  195. 'form' => 'advanced',
  196. 'method' => 'GET',
  197. ],
  198. 'twitter' => [
  199. 'url' => 'https://twitter.com/share?url=~LINK~&amp;text=~TITLE~',
  200. 'transform' => ['rawurlencode'],
  201. 'form' => 'simple',
  202. 'method' => 'GET',
  203. ],
  204. 'wallabag' => [
  205. 'url' => '~URL~?action=add&amp;url=~LINK~',
  206. 'transform' => ['rawurlencode'],
  207. 'help' => 'http://www.wallabag.org/',
  208. 'form' => 'advanced',
  209. 'method' => 'GET',
  210. ],
  211. 'wallabagv2' => [
  212. 'url' => '~URL~/bookmarklet?url=~LINK~',
  213. 'transform' => ['rawurlencode'],
  214. 'help' => 'http://www.wallabag.org/',
  215. 'form' => 'advanced',
  216. 'method' => 'GET',
  217. ],
  218. 'web-sharing-api' => [
  219. 'HTMLtag' => 'button',
  220. 'url' => '~LINK~',
  221. 'transform' => [],
  222. 'form' => 'simple',
  223. 'method' => 'GET',
  224. ],
  225. 'whatsapp' => [
  226. 'url' => 'https://wa.me/?text=~TITLE~ | ~LINK~',
  227. 'transform' => ['rawurlencode'],
  228. 'help' => 'https://faq.whatsapp.com/iphone/how-to-link-to-whatsapp-from-a-different-app/?lang=en',
  229. 'form' => 'simple',
  230. 'method' => 'GET',
  231. ],
  232. 'xing' => [
  233. 'url' => 'https://www.xing.com/spi/shares/new?url=~LINK~',
  234. 'transform' => ['rawurlencode'],
  235. 'help' => 'https://dev.xing.com/plugins/share_button/docs',
  236. 'form' => 'simple',
  237. 'method' => 'GET',
  238. ],
  239. ];