You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
3.7 KiB

  1. <?php
  2. // Copyright: Richard Karnesky <mailto:karnesky@gmail.com>
  3. // This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
  4. // Please see the GNU General Public License for more details.
  5. if( !defined( 'MEDIAWIKI' ) )
  6. {
  7. echo( "This is an extension to the MediaWiki package and cannot be run standalone.\n" );
  8. die( -1 );
  9. }
  10. $wgExtensionCredits['parserhook'][] = array(
  11. 'path' => __FILE__,
  12. 'name' => 'Refbase',
  13. 'author' => array( 'Richard Karnesky', 'Thibault Marin' ),
  14. 'url' => 'https://www.mediawiki.org/wiki/Extension:Refbase',
  15. 'descriptionmsg' => 'refbase-desc',
  16. 'version' => '1.0',
  17. 'license-name' => '' // Short name of the license, links LICENSE or COPYING file if existing - string, added in 1.23.0
  18. );
  19. /**
  20. * Extension class
  21. */
  22. $wgAutoloadClasses['RefbaseHooks'] =
  23. dirname( __FILE__ ) . '/Refbase.Hooks.php';
  24. $wgAutoloadClasses['RefbaseRenderer'] =
  25. dirname( __FILE__ ) . '/include/Refbase.Renderer.php';
  26. $wgAutoloadClasses['RefbaseRendererCitationTemplate'] =
  27. dirname( __FILE__ ) . '/include/Refbase.Renderer.CitationTemplate.php';
  28. $wgAutoloadClasses['RefbaseRendererLink'] =
  29. dirname( __FILE__ ) . '/include/Refbase.Renderer.Link.php';
  30. $wgAutoloadClasses['RefbaseRendererCite'] =
  31. dirname( __FILE__ ) . '/include/Refbase.Renderer.Cite.php';
  32. $wgAutoloadClasses['RefbaseConnector'] =
  33. dirname( __FILE__ ) . '/include/Refbase.Connector.php';
  34. $wgAutoloadClasses['RefbaseCitationCreator'] =
  35. dirname( __FILE__ ) . '/include/Refbase.CitationCreator.php';
  36. $wgAutoloadClasses['RefbaseCitationType'] =
  37. dirname( __FILE__ ) . '/include/Refbase.CitationCreator.php';
  38. $wgAutoloadClasses['RefbaseTools'] =
  39. dirname( __FILE__ ) . '/include/Refbase.Tools.php';
  40. /**
  41. * Register hooks
  42. */
  43. $wgHooks['ParserFirstCallInit'][] = 'RefbaseHooks::efRefbaseParserInit';
  44. /**
  45. * Internationalization
  46. */
  47. $wgMessagesDirs['Refbase'] = __DIR__ . '/i18n';
  48. $wgExtensionMessagesFiles['Refbase'] =
  49. dirname( __FILE__ ) . '/Refbase.i18n.php';
  50. /**
  51. * Parameters (modify in LocalSettings.php)
  52. */
  53. // refbase database host
  54. $wgRefbaseDbHost = "localhost";
  55. // Database name
  56. $wgRefbaseDbName = "literature";
  57. // User name for database
  58. $wgRefbaseDbUser = "litwww";
  59. // Database password
  60. $wgRefbaseDbPass = "%l1t3ratur3?";
  61. // Database charset
  62. $wgRefbaseDbCharset = "utf8";
  63. // Table with references
  64. $wgRefbaseDbRefTable = "refs";
  65. // Table with user data (cite key)
  66. $wgRefbaseDbUserDataTable = "user_data";
  67. // Extension to interface with database ('mysql' or 'PDO')
  68. $wgRefbaseDbAccessMethod = "mysql";
  69. // Host for refbase instance (used for url links). This may differ from the
  70. // database host if using https for instance (requires a trailing slash)
  71. $wgRefbaseURL = "http://".$_SERVER['HTTP_HOST']."/refbase/";
  72. // Default tag input: when using <refbase>XXX</refbase>, XXX can refer to the
  73. // serial number ('serial' type) or the citation key ('citekey' type)
  74. $wgRefbaseDefaultTagType = "serial";
  75. // Default output type: may use cite_journal, cite or link
  76. $wgRefbaseDefaultOutputType = 'cite_journal';
  77. // Default citation type: 'minimal' or 'rb-default' (only for 'link' and 'cite' modes)
  78. //$wgRefbaseDefaultCitationType = 'minimal';
  79. $wgRefbaseDefaultCitationType = 'rb-default';
  80. // Option to pass http authentication token when accessing the refbase web
  81. // interface (used for rb-* citation types). If empty, authentication is
  82. // disabled. If set to 'default', use the same token as the one used for the
  83. // mediawiki web site (if any). If this option is set to 'user:pass', then
  84. // 'user' and 'pass' will be used to form the token (the colon character ':' is
  85. // not allowed in the username).
  86. $wgRefbaseURLAuth = '';