shares.php 4.5 KB

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