shares.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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
  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. 'shaarli' => array(
  25. 'url' => '~URL~?post=~LINK~&amp;title=~TITLE~&amp;source=FreshRSS',
  26. 'transform' => array('rawurlencode'),
  27. 'help' => 'http://sebsauvage.net/wiki/doku.php?id=php:shaarli',
  28. 'form' => 'advanced',
  29. 'method' => 'GET',
  30. ),
  31. 'blogotext' => array(
  32. 'url' => '~URL~/admin/links.php?url=~LINK~',
  33. 'transform' => array(),
  34. 'help' => 'http://lehollandaisvolant.net/blogotext/fr/',
  35. 'form' => 'advanced',
  36. 'method' => 'GET',
  37. ),
  38. 'wallabag' => array(
  39. 'url' => '~URL~?action=add&amp;url=~LINK~',
  40. 'transform' => array(
  41. 'link' => array('base64_encode'),
  42. 'title' => array(),
  43. ),
  44. 'help' => 'http://www.wallabag.org/',
  45. 'form' => 'advanced',
  46. 'method' => 'GET',
  47. ),
  48. 'wallabagv2' => array(
  49. 'url' => '~URL~/bookmarklet?url=~LINK~',
  50. 'transform' => array(
  51. 'link' => array('rawurlencode'),
  52. 'title' => array(),
  53. ),
  54. 'help' => 'http://www.wallabag.org/',
  55. 'form' => 'advanced',
  56. 'method' => 'GET',
  57. ),
  58. 'diaspora' => array(
  59. 'url' => '~URL~/bookmarklet?url=~LINK~&amp;title=~TITLE~',
  60. 'transform' => array('rawurlencode'),
  61. 'help' => 'https://diasporafoundation.org/',
  62. 'form' => 'advanced',
  63. 'method' => 'GET',
  64. ),
  65. 'movim' => array(
  66. 'url' => '~URL~/?share/~LINK~',
  67. 'transform' => array('urlencode'),
  68. 'help' => 'https://github.com/edhelas/movim',
  69. 'form' => 'advanced',
  70. 'method' => 'GET',
  71. ),
  72. 'twitter' => array(
  73. 'url' => 'https://twitter.com/share?url=~LINK~&amp;text=~TITLE~',
  74. 'transform' => array('rawurlencode'),
  75. 'form' => 'simple',
  76. 'method' => 'GET',
  77. ),
  78. 'facebook' => array(
  79. 'url' => 'https://www.facebook.com/sharer.php?u=~LINK~&amp;t=~TITLE~',
  80. 'transform' => array('rawurlencode'),
  81. 'form' => 'simple',
  82. 'method' => 'GET',
  83. ),
  84. 'email' => array(
  85. 'url' => 'mailto:?subject=~TITLE~&amp;body=~LINK~',
  86. 'transform' => array('rawurlencode'),
  87. 'form' => 'simple',
  88. 'method' => 'GET',
  89. ),
  90. 'print' => array(
  91. 'url' => '#',
  92. 'transform' => array(),
  93. 'form' => 'simple',
  94. 'method' => 'GET',
  95. ),
  96. 'jdh' => array(
  97. 'url' => 'https://www.journalduhacker.net/stories/new?url=~LINK~&title=~TITLE~',
  98. 'transform' => array('rawurlencode'),
  99. 'form' => 'simple',
  100. 'method' => 'GET',
  101. ),
  102. 'Known' => array(
  103. 'url' => '~URL~/share?share_url=~LINK~&share_title=~TITLE~',
  104. 'transform' => array('rawurlencode'),
  105. 'help' => 'https://withknown.com/',
  106. 'form' => 'advanced',
  107. 'method' => 'GET',
  108. ),
  109. 'gnusocial' => array(
  110. 'url' => '~URL~/notice/new?content=~TITLE~%20~LINK~',
  111. 'transform' => array('urlencode'),
  112. 'help' => 'https://gnu.io/social/',
  113. 'form' => 'advanced',
  114. 'method' => 'GET',
  115. ),
  116. 'mastodon' => array(
  117. 'url' => '~URL~/share?title=~TITLE~&url=~LINK~',
  118. 'transform' => array('rawurlencode'),
  119. 'form' => 'advanced',
  120. 'method' => 'GET',
  121. ),
  122. 'pocket' => array(
  123. 'url' => 'https://getpocket.com/save?url=~LINK~&amp;title=~TITLE~',
  124. 'transform' => array('rawurlencode'),
  125. 'form' => 'simple',
  126. 'method' => 'GET',
  127. ),
  128. 'linkedin' => array(
  129. 'url' => 'https://www.linkedin.com/shareArticle?url=~LINK~&amp;title=~TITLE~&amp;source=FreshRSS',
  130. 'transform' => array('rawurlencode'),
  131. 'form' => 'simple',
  132. 'method' => 'GET',
  133. ),
  134. 'pinboard' => array(
  135. 'url' => 'https://pinboard.in/add?next=same&amp;url=~LINK~&amp;title=~TITLE~',
  136. 'transform' => array('urlencode'),
  137. 'help' => 'https://pinboard.in/api/',
  138. 'form' => 'simple',
  139. 'method' => 'GET',
  140. ),
  141. 'lemmy' => array(
  142. 'url' => '~URL~/create_post?url=~LINK~&name=~TITLE~',
  143. 'transform' => array('rawurlencode'),
  144. 'form' => 'advanced',
  145. 'method' => 'GET',
  146. ),
  147. );