shares.php 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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. 'bluesky' => [
  52. 'url' => 'https://bsky.app/intent/compose?text=~LINK~',
  53. 'transform' => ['urlencode'],
  54. 'form' => 'simple',
  55. 'method' => 'GET',
  56. ],
  57. 'buffer' => [
  58. 'url' => 'https://publish.buffer.com/compose?url=~LINK~&amp;text=~TITLE~',
  59. 'transform' => ['rawurlencode'],
  60. 'help' => 'https://support.buffer.com/hc/en-us/articles/360035587394-Scheduling-posts',
  61. 'form' => 'simple',
  62. 'method' => 'GET',
  63. ],
  64. 'clipboard' => [
  65. 'HTMLtag' => 'button',
  66. 'url' => '~LINK~',
  67. 'transform' => [],
  68. 'form' => 'simple',
  69. 'method' => 'GET',
  70. ],
  71. 'diaspora' => [
  72. 'url' => '~URL~/bookmarklet?url=~LINK~&amp;title=~TITLE~',
  73. 'transform' => ['rawurlencode'],
  74. 'help' => 'https://diasporafoundation.org/',
  75. 'form' => 'advanced',
  76. 'method' => 'GET',
  77. ],
  78. 'email' => [
  79. 'url' => 'mailto:?subject=~TITLE~&amp;body=~LINK~',
  80. 'transform' => ['rawurlencode'],
  81. 'form' => 'simple',
  82. 'method' => 'GET',
  83. ],
  84. 'email-webmail-firefox-fix' => [ // see https://github.com/FreshRSS/FreshRSS/issues/2666
  85. 'url' => 'mailto:?subject=~TITLE~&amp;body=~LINK~',
  86. 'transform' => ['rawurlencode'],
  87. 'form' => 'simple',
  88. 'method' => 'GET',
  89. ],
  90. 'facebook' => [
  91. 'url' => 'https://www.facebook.com/sharer.php?u=~LINK~&amp;t=~TITLE~',
  92. 'transform' => ['rawurlencode'],
  93. 'form' => 'simple',
  94. 'method' => 'GET',
  95. ],
  96. 'gnusocial' => [
  97. 'url' => '~URL~/notice/new?content=~TITLE~%20~LINK~',
  98. 'transform' => ['urlencode'],
  99. 'help' => 'https://gnusocial.rocks/',
  100. 'form' => 'advanced',
  101. 'method' => 'GET',
  102. ],
  103. 'jdh' => [
  104. 'url' => 'https://www.journalduhacker.net/stories/new?url=~LINK~&amp;title=~TITLE~',
  105. 'transform' => ['rawurlencode'],
  106. 'form' => 'simple',
  107. 'method' => 'GET',
  108. ],
  109. 'Known' => [
  110. 'url' => '~URL~/share?share_url=~LINK~&amp;share_title=~TITLE~',
  111. 'transform' => ['rawurlencode'],
  112. 'help' => 'https://withknown.com/',
  113. 'form' => 'advanced',
  114. 'method' => 'GET',
  115. ],
  116. 'lemmy' => [
  117. 'url' => '~URL~/create_post?url=~LINK~&amp;title=~TITLE~',
  118. 'transform' => ['rawurlencode'],
  119. 'help' => 'https://join-lemmy.org/',
  120. 'form' => 'advanced',
  121. 'method' => 'GET',
  122. ],
  123. 'linkding' => [
  124. 'url' => '~URL~/bookmarks/new?url=~LINK~&amp;title=~TITLE~&amp;auto_close',
  125. 'transform' => ['rawurlencode'],
  126. 'help' => 'https://linkding.link/how-to/',
  127. 'form' => 'advanced',
  128. 'method' => 'GET',
  129. ],
  130. 'linkedin' => [
  131. 'url' => 'https://www.linkedin.com/shareArticle?url=~LINK~&amp;title=~TITLE~&amp;source=FreshRSS',
  132. 'transform' => ['rawurlencode'],
  133. 'form' => 'simple',
  134. 'method' => 'GET',
  135. ],
  136. 'mastodon' => [
  137. 'url' => '~URL~/share?title=~TITLE~&amp;url=~LINK~',
  138. 'transform' => ['rawurlencode'],
  139. 'help' => 'https://joinmastodon.org/',
  140. 'form' => 'advanced',
  141. 'method' => 'GET',
  142. ],
  143. 'movim' => [
  144. 'url' => '~URL~/?share/~LINK~',
  145. 'transform' => ['urlencode'],
  146. 'help' => 'https://movim.eu/',
  147. 'form' => 'advanced',
  148. 'method' => 'GET',
  149. ],
  150. 'omnivore' => [
  151. 'url' => '~URL~/api/save?url=~LINK~',
  152. 'transform' => ['urlencode'],
  153. 'help' => 'https://github.com/omnivore-app/omnivore',
  154. 'form' => 'advanced',
  155. 'method' => 'GET',
  156. ],
  157. 'pinboard' => [
  158. 'url' => 'https://pinboard.in/add?next=same&amp;url=~LINK~&amp;title=~TITLE~',
  159. 'transform' => ['urlencode'],
  160. 'help' => 'https://pinboard.in/api/',
  161. 'form' => 'simple',
  162. 'method' => 'GET',
  163. ],
  164. 'pinterest' => [
  165. 'url' => 'https://pinterest.com/pin/create/button/?url=~LINK~',
  166. 'transform' => ['rawurlencode'],
  167. 'help' => 'https://pinterest.com/',
  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~&amp;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. 'telegram' => [
  199. 'url' => 'https://t.me/share/url?url=~LINK~&amp;text=~TITLE~',
  200. 'transform' => ['rawurlencode'],
  201. 'form' => 'simple',
  202. 'method' => 'GET',
  203. ],
  204. 'twitter' => [
  205. 'url' => 'https://twitter.com/share?url=~LINK~&amp;text=~TITLE~',
  206. 'transform' => ['rawurlencode'],
  207. 'form' => 'simple',
  208. 'method' => 'GET',
  209. ],
  210. 'wallabag' => [
  211. 'url' => '~URL~?action=add&amp;url=~LINK~',
  212. 'transform' => ['rawurlencode'],
  213. 'help' => 'http://www.wallabag.org/',
  214. 'form' => 'advanced',
  215. 'method' => 'GET',
  216. ],
  217. 'wallabagv2' => [
  218. 'url' => '~URL~/bookmarklet?url=~LINK~',
  219. 'transform' => ['rawurlencode'],
  220. 'help' => 'http://www.wallabag.org/',
  221. 'form' => 'advanced',
  222. 'method' => 'GET',
  223. ],
  224. 'web-sharing-api' => [
  225. 'HTMLtag' => 'button',
  226. 'url' => '~LINK~',
  227. 'transform' => [],
  228. 'form' => 'simple',
  229. 'method' => 'GET',
  230. ],
  231. 'whatsapp' => [
  232. 'url' => 'https://wa.me/?text=~TITLE~%20|%20~LINK~',
  233. 'transform' => ['rawurlencode'],
  234. 'help' => 'https://faq.whatsapp.com/iphone/how-to-link-to-whatsapp-from-a-different-app/?lang=en',
  235. 'form' => 'simple',
  236. 'method' => 'GET',
  237. ],
  238. 'xing' => [
  239. 'url' => 'https://www.xing.com/spi/shares/new?url=~LINK~',
  240. 'transform' => ['rawurlencode'],
  241. 'help' => 'https://dev.xing.com/plugins/share_button/docs',
  242. 'form' => 'simple',
  243. 'method' => 'GET',
  244. ],
  245. ];