shares.php 4.5 KB

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