shares.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <?php
  2. /*
  3. * This is a configuration file. You shouldn’t modify it unless you know what
  4. * you are doing. If you want to add a share type, this is where you need to do
  5. * it.
  6. *
  7. * For each share there is different configuration options. Here is the description
  8. * of those options:
  9. * - url is a mandatory option. It is a string representing the share URL. It
  10. * supports 4 different placeholders for custom data. The ~URL~ placeholder
  11. * represents the URL of the system used to share, it is configured by the
  12. * user. The ~LINK~ placeholder represents the link of the shared article.
  13. * The ~TITLE~ placeholder represents the title of the shared article. The
  14. * ~ID~ placeholder represents the id of the shared article (only useful
  15. * for internal use)
  16. * - transform is an array of transformation to apply on links and titles
  17. * - help is a URL to a help page (mandatory for form = 'advanced')
  18. * - form is the type of form to display during configuration. It’s either
  19. * 'simple' or 'advanced'. 'simple' is used when only the name is configurable,
  20. * 'advanced' is used when the name and the location are configurable.
  21. * - method is the HTTP method (POST or GET) used to share a link.
  22. */
  23. return array(
  24. 'blogotext' => array(
  25. 'url' => '~URL~/admin/links.php?url=~LINK~',
  26. 'transform' => array(),
  27. 'help' => 'http://lehollandaisvolant.net/blogotext/fr/',
  28. 'form' => 'advanced',
  29. 'method' => 'GET',
  30. ),
  31. 'clipboard' => array(
  32. 'url' => '~LINK~',
  33. 'transform' => array(),
  34. 'form' => 'simple',
  35. 'method' => 'GET',
  36. ),
  37. 'diaspora' => array(
  38. 'url' => '~URL~/bookmarklet?url=~LINK~&amp;title=~TITLE~',
  39. 'transform' => array('rawurlencode'),
  40. 'help' => 'https://diasporafoundation.org/',
  41. 'form' => 'advanced',
  42. 'method' => 'GET',
  43. ),
  44. 'email' => array(
  45. 'url' => 'mailto:?subject=~TITLE~&amp;body=~LINK~',
  46. 'transform' => array('rawurlencode'),
  47. 'form' => 'simple',
  48. 'method' => 'GET',
  49. ),
  50. 'facebook' => array(
  51. 'url' => 'https://www.facebook.com/sharer.php?u=~LINK~&amp;t=~TITLE~',
  52. 'transform' => array('rawurlencode'),
  53. 'form' => 'simple',
  54. 'method' => 'GET',
  55. ),
  56. 'gnusocial' => array(
  57. 'url' => '~URL~/notice/new?content=~TITLE~%20~LINK~',
  58. 'transform' => array('urlencode'),
  59. 'help' => 'https://gnu.io/social/',
  60. 'form' => 'advanced',
  61. 'method' => 'GET',
  62. ),
  63. 'jdh' => array(
  64. 'url' => 'https://www.journalduhacker.net/stories/new?url=~LINK~&title=~TITLE~',
  65. 'transform' => array('rawurlencode'),
  66. 'form' => 'simple',
  67. 'method' => 'GET',
  68. ),
  69. 'Known' => array(
  70. 'url' => '~URL~/share?share_url=~LINK~&share_title=~TITLE~',
  71. 'transform' => array('rawurlencode'),
  72. 'help' => 'https://withknown.com/',
  73. 'form' => 'advanced',
  74. 'method' => 'GET',
  75. ),
  76. 'lemmy' => array(
  77. 'url' => '~URL~/create_post?url=~LINK~&name=~TITLE~',
  78. 'transform' => array('rawurlencode'),
  79. 'help' => 'https://join-lemmy.org/',
  80. 'form' => 'advanced',
  81. 'method' => 'GET',
  82. ),
  83. 'linkedin' => array(
  84. 'url' => 'https://www.linkedin.com/shareArticle?url=~LINK~&amp;title=~TITLE~&amp;source=FreshRSS',
  85. 'transform' => array('rawurlencode'),
  86. 'form' => 'simple',
  87. 'method' => 'GET',
  88. ),
  89. 'mastodon' => array(
  90. 'url' => '~URL~/share?title=~TITLE~&url=~LINK~',
  91. 'transform' => array('rawurlencode'),
  92. 'help' => 'https://joinmastodon.org/',
  93. 'form' => 'advanced',
  94. 'method' => 'GET',
  95. ),
  96. 'movim' => array(
  97. 'url' => '~URL~/?share/~LINK~',
  98. 'transform' => array('urlencode'),
  99. 'help' => 'https://movim.eu/',
  100. 'form' => 'advanced',
  101. 'method' => 'GET',
  102. ),
  103. 'pinboard' => array(
  104. 'url' => 'https://pinboard.in/add?next=same&amp;url=~LINK~&amp;title=~TITLE~',
  105. 'transform' => array('urlencode'),
  106. 'help' => 'https://pinboard.in/api/',
  107. 'form' => 'simple',
  108. 'method' => 'GET',
  109. ),
  110. 'pocket' => array(
  111. 'url' => 'https://getpocket.com/save?url=~LINK~&amp;title=~TITLE~',
  112. 'transform' => array('rawurlencode'),
  113. 'form' => 'simple',
  114. 'method' => 'GET',
  115. ),
  116. 'print' => array(
  117. 'url' => '#',
  118. 'transform' => array(),
  119. 'form' => 'simple',
  120. 'method' => 'GET',
  121. ),
  122. 'raindrop' => array(
  123. 'url' => 'https://app.raindrop.io/add?link=~LINK~&title=~TITLE~',
  124. 'transform' => array('rawurlencode'),
  125. 'form' => 'simple',
  126. 'method' => 'GET',
  127. ),
  128. 'shaarli' => array(
  129. 'url' => '~URL~?post=~LINK~&amp;title=~TITLE~&amp;source=FreshRSS',
  130. 'transform' => array('rawurlencode'),
  131. 'help' => 'http://sebsauvage.net/wiki/doku.php?id=php:shaarli',
  132. 'form' => 'advanced',
  133. 'method' => 'GET',
  134. ),
  135. 'twitter' => array(
  136. 'url' => 'https://twitter.com/share?url=~LINK~&amp;text=~TITLE~',
  137. 'transform' => array('rawurlencode'),
  138. 'form' => 'simple',
  139. 'method' => 'GET',
  140. ),
  141. 'wallabag' => array(
  142. 'url' => '~URL~?action=add&amp;url=~LINK~',
  143. 'transform' => array('rawurlencode'),
  144. 'help' => 'http://www.wallabag.org/',
  145. 'form' => 'advanced',
  146. 'method' => 'GET',
  147. ),
  148. 'wallabagv2' => array(
  149. 'url' => '~URL~/bookmarklet?url=~LINK~',
  150. 'transform' => array('rawurlencode'),
  151. 'help' => 'http://www.wallabag.org/',
  152. 'form' => 'advanced',
  153. 'method' => 'GET',
  154. ),
  155. );