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.

833 lines
49 KiB

  1. <?php
  2. // Project: Web Reference Database (refbase) <https://www.refbase.net>
  3. // Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
  4. // original author(s).
  5. //
  6. // This code is distributed in the hope that it will be useful,
  7. // but WITHOUT ANY WARRANTY. Please see the GNU General Public
  8. // License for more details.
  9. //
  10. // File: ./initialize/ini.inc.php
  11. // Repository: $HeadURL: https://refbase.svn.sourceforge.net/svnroot/refbase/branches/bleeding-edge/initialize/ini.inc.php $
  12. // Author(s): Matthias Steffens <mailto:refbase@extracts.de>
  13. //
  14. // Created: 12-Jan-03, 17:58
  15. // Modified: $Date: 2008-12-05 01:05:20 +0100 (Fr, 05 Dez 2008) $
  16. // $Author: msteffens $
  17. // $Revision: 1352 $
  18. // This is the customization include file.
  19. // It contains variables that are common to all scripts and whose values can/should be customized.
  20. // I.e., you can adjust their values as needed but you must not change the variable names themselves!
  21. // --------------------------------------------------------------------
  22. $officialDatabaseName = "Your Literature Database"; // e.g. "IP� Literature Database"
  23. // Specify who'll be allowed to add a new user to the users table:
  24. // Note, that you should leave this variable as it is, if you're going to use the 'install.php'
  25. // script and the provided database structure file ('install.sql') for installation. This variable
  26. // is only provided for people who want to install the refbase database manually (i.e. without using
  27. // 'install.php' & 'install.sql'). If so, setting this value to "everyone" enables you to add the
  28. // admin as the very first user (don't forget to specify his email address below!). Then, change the
  29. // value of $addNewUsers to "admin". By that you prevent other users from messing with your users
  30. // table. (If the value is set to "everyone", any user will be able to add users to the users table!)
  31. $addNewUsers = "admin"; // possible values: "everyone", "admin"
  32. // The admin email address (by which a user is granted admin status after successful login!):
  33. // Note that you must NOT change this email address unless you've already logged in and created your
  34. // own admin user! See the INSTALL file for instructions on how to setup your own admin user.
  35. $adminLoginEmail = "user@refbase.net"; // e.g. "admin@ipoe.uni-kiel.de"
  36. // The feedback email address to which any support questions or suggestions should be sent:
  37. $feedbackEmail = "FEEDBACK_EMAIL_ADDRESS"; // e.g. "admin@ipoe.uni-kiel.de"
  38. // The full name of the institution hosting this literature database:
  39. $hostInstitutionName = "Institute for ..."; // e.g. "Institute for Polar Ecology"
  40. // The abbreviated name of the institution hosting this literature database:
  41. $hostInstitutionAbbrevName = "..."; // e.g. "IP�"
  42. // The URL of the institution hosting this literature database:
  43. $hostInstitutionURL = "INSTITUTION_WEB_ADDRESS"; // e.g. "http://www.uni-kiel.de/ipoe/"
  44. //uncomment to change the headlines temporalily
  45. include ('initialize/ini.dev.php');
  46. // The URL to any (custom) help resources for this literature database:
  47. // (specify an empty string if you don't want a help link: '$helpResourcesURL = "";')
  48. $helpResourcesURL = "https://www.refbase.net/"; // e.g. "https://www.refbase.net/"
  49. // Specify whether announcements should be sent to the email address given in '$mailingListEmail':
  50. // If $sendEmailAnnouncements = "yes", a short info will be mailed to the email address specified
  51. // in $mailingListEmail if a new record has been added to the database.
  52. $sendEmailAnnouncements = "no"; // possible values: "yes", "no"
  53. // The mailing list email address to which any announcements should be sent:
  54. $mailingListEmail = "ANNOUNCEMENT_EMAIL_ADDRESS"; // e.g. "ipoelit-announce@ipoe.uni-kiel.de"
  55. // The base URL for this literature database (i.e., the URL to the refbase root directory where
  56. // your refbase scripts are located):
  57. // It will be used within RSS feeds and when sending notification emails to database users.
  58. // The base URL is auto-generated by the code below. Enter a literal URL if this doesn't work for
  59. // you.
  60. $databaseBaseURL = preg_replace('#[^/]*$#e','','https://'.$_SERVER['HTTP_HOST'].scriptURL(),1); // e.g. "https://polaris.ipoe.uni-kiel.de/refs/"
  61. // The keywords/tags that describe or categorize the content of this literature database:
  62. // These keywords/tags should be single words delimited by a space character. They'll be
  63. // included on every HTML page (in the <head> section) as well as in the OpenSearch description
  64. // document. A good selection of keywords may help to increase search engine visibility.
  65. $databaseKeywords = " science academic literature scientific references publication search citation web bibliography database mysql php refbase"; // e.g. "academic literature refbase"
  66. //Overrride settings above
  67. // values for security not in resporitory
  68. // include('ini.dev.php');
  69. include('ini.live.php');
  70. // The character encoding that's used as content-type for HTML, RSS and email output:
  71. // IMPORTANT NOTES: - the encoding type specified here must match the default character set you've
  72. // chosen on install for your refbase MySQL database & tables!
  73. // - plus, the character encoding of this file ('ini.inc.php') MUST match the
  74. // encoding type specified in '$contentTypeCharset'! This means, if you're going to
  75. // use "UTF-8", you must re-save this file with encoding "Unicode (UTF-8, no BOM)".
  76. $contentTypeCharset = "ISO-8859-1"; // possible values: "ISO-8859-1", "UTF-8"
  77. // In case you're using a latin1-encoded database ('$contentTypeCharset=ISO-8859-1'), specify whether
  78. // exported data (Bibtex/Endnote/RIS or MODS/SRW/ODF XML) shall be converted to Unicode (UTF-8, no BOM).
  79. // Conversion of exported data to UTF-8 ('$convertExportDataToUTF8=yes') is required to correctly convert
  80. // refbase markup such as super- and subscript or greek letters. If you set this variable to "no", then
  81. // the relevant refbase markup will not get converted for a latin1 database(*) and output will be in
  82. // ISO-8859-1 encoding.
  83. // (*: as a notable exception, conversion of refbase markup such as super- and subscript or greek letters
  84. // will be done upon Bibtex export even if this variable is set to "no")
  85. $convertExportDataToUTF8 = "yes"; // possible values: "yes", "no"
  86. // The path to the default CSS stylesheet which will be used for all page views except print/mobile view:
  87. $defaultStyleSheet = "css/style.css"; // e.g. "css/style.css"
  88. // The path to the CSS stylesheet which will be used for print view:
  89. $printStyleSheet = "css/style_print.css"; // e.g. "css/style_print.css"
  90. // The path to the CSS stylesheet which will be used for mobile view (intended for mobile devices):
  91. $mobileStyleSheet = "css/style_mobile.css"; // e.g. "css/style_mobile.css"
  92. // The default interface language:
  93. $defaultLanguage = "en"; // possible values: "en", "de", "fr", "cn", or "ru"
  94. // The number of records that's returned by default:
  95. // Note that this setting also controls how many records will be returned by default for RSS, OpenSearch,
  96. // SRU and CLI queries.
  97. $defaultNumberOfRecords = 10;
  98. // The URL path to the main logo image that's displayed in the refbase header:
  99. // (note that all URL paths must be given relative to the root level of your refbase script directory)
  100. $logoImageURL = "img/logo.gif"; // e.g. "img/logo.png"
  101. // The width of the main logo image (in pixels):
  102. $logoImageWidth = "143"; // e.g. "94"
  103. // The height of the main logo image (in pixels):
  104. $logoImageHeight = "107"; // e.g. "94"
  105. // The URL path to a small logo image (which gets used in the OpenSearch description document):
  106. // (when possible, supply a 64x64 image of type ".jpeg" or ".png" with a square aspect ratio)
  107. $logoSmallImageURL = "img/logo_small.png"; // e.g. "img/logo_small.png"
  108. // The width of the small logo image (in pixels):
  109. $logoSmallImageWidth = "64"; // e.g. "64"
  110. // The height of the small logo image (in pixels):
  111. $logoSmallImageHeight = "64"; // e.g. "64"
  112. // The valid MIME type of the small logo image:
  113. $logoSmallImageType = "image/gif"; // e.g. "image/jpeg" or "image/png"
  114. // The URL path to a favicon image (which gets used in the OpenSearch description document):
  115. // (this must be a 16x16 image of type ".ico")
  116. $faviconImageURL = "img/favicon.ico"; // e.g. "img/favicon.ico"
  117. // Specify whether auto-completions (search suggestions) shall be provided
  118. // by default (via Ajax calls) for user input in text entry fields:
  119. $autoCompleteUserInput = "yes"; // possible values: "yes", "no"
  120. // Specify whether visual effects (such as a sliding effect) shall be used
  121. // when a user toggles the display of particular GUI sections (e.g. the
  122. // Search & Display Options above the search results list):
  123. $useVisualEffects = "yes"; // possible values: "yes", "no"
  124. // Defines the default user permissions when adding new users:
  125. // Possible values for each of the permission settings: "yes", "no"
  126. // Allow a newly created user to:
  127. $defaultUserPermissions = array("no", // add records to the database ('allow_add')
  128. "no", // edit records in the database ('allow_edit')
  129. "no", // delete records from the database ('allow_delete')
  130. "no", // download files which are associated with particular records ('allow_download')
  131. "no", // upload files to the database ('allow_upload')
  132. "yes", // view records in list view ('allow_list_view')
  133. "yes", // view any record details ('allow_details_view')
  134. "yes", // view records in print view ('allow_print_view')
  135. "no", // view records in browse view ('allow_browse_view')
  136. "yes", // build a reference list from selected records ('allow_cite')
  137. "no", // import records into the database ('allow_import')
  138. "no", // batch import records into the database ('allow_batch_import')
  139. "yes", // export records from the database ('allow_export')
  140. "yes", // batch export records from the database ('allow_batch_export')
  141. "yes", // use the 'user groups' feature ('allow_user_groups')
  142. "yes", // use the 'user queries' feature ('allow_user_queries')
  143. "yes", // generate dynamic RSS feeds from any query ('allow_rss_feeds')
  144. "yes", // execute custom SQL queries via 'sql_search.php' ('allow_sql_search')
  145. "yes", // change his/her personal data (like name, address or password) ('allow_modify_options')
  146. "no");
  147. // [note that the 'allow_edit_call_number' permission setting isn't honoured yet!]
  148. // When adding a new user, the following export formats will be made available to the new user by default:
  149. // The specified format names must have matching entries within the 'formats' MySQL table.
  150. $defaultUserExportFormats = array("BibTeX",
  151. "Endnote",
  152. "ISI",
  153. "RIS",
  154. "MODS XML",
  155. "ODF XML",
  156. "Word XML");
  157. // When adding a new user, the following citation formats will be made available to the new user by default:
  158. // The specified format names must have matching entries within the 'formats' MySQL table.
  159. $defaultUserCiteFormats = array("html",
  160. "RTF",
  161. "PDF",
  162. "LaTeX");
  163. // When adding a new user, the following citation styles will be made available to the new user by default:
  164. // The specified citation styles must have matching entries within the 'styles' MySQL table.
  165. $defaultUserStyles = array("APA",
  166. "AMA",
  167. "MLA",
  168. "Chicago",
  169. "Harvard 1",
  170. "Harvard 2",
  171. "Harvard 3",
  172. "Vancouver",
  173. "Deep Sea Res",
  174. "J Glaciol",
  175. "Mar Biol",
  176. "Text Citation");
  177. // When adding a new user, the following reference types will be made available to the new user by default:
  178. // The specified reference types must have matching entries within the 'types' MySQL table.
  179. $defaultUserTypes = array("Journal Article",
  180. "Abstract",
  181. "Book Chapter",
  182. "Book Whole",
  183. "Conference Article",
  184. "Conference Volume",
  185. "Journal",
  186. "Magazine Article",
  187. "Manual",
  188. "Manuscript",
  189. "Map",
  190. "Miscellaneous",
  191. "Newspaper Article",
  192. "Patent",
  193. "Report",
  194. "Software");
  195. // The default list of fields that will be searched by the "main fields" search option:
  196. // Specify a comma-separated list of fields from MySQL table 'refs'. The given fields
  197. // will be searched via an OR search if the user performs a search with "main fields"
  198. // selected from a search field drop-down menu; these fields will also be included as
  199. // separate entries in the "Quick Search" drop-down menu.
  200. $defaultMainFields = "author, serial, title, publication, keywords, abstract"; // e.g. "author, title, publication, keywords, abstract"
  201. // The list of fields that are available in the "main fields" selector of the user's
  202. // account options page:
  203. // The given field names must match column names in MySQL tables 'refs' and 'user_data'.
  204. // The given fields will be available to the user to add them to his/her preferred list
  205. // of "main fields". The fields selected by the user will be used instead of the default
  206. // list of "main fields" provided in '$defaultMainFields' (see above). The user's
  207. // default list of "main fields" can be specified in '$defaultUserOptions["main_fields"]'
  208. // (see below).
  209. $availableMainFields = array("author", "title", "year", "publication", "abbrev_journal",
  210. "editor", "series_title", "abbrev_series_title", "keywords",
  211. "abstract", "area", "notes", "call_number", "serial",
  212. "user_keys", "user_notes", "user_groups", "cite_key");
  213. // The list of fields that will be displayed by default in List view (i.e. the default
  214. // columnar output style):
  215. // (specify a comma-separated list of fields from MySQL table 'refs')
  216. //
  217. // - These "major" fields will be always included by default:
  218. $defaultFieldsListViewMajor = "author, title, year, publication, serial"; // e.g. "author, title, year, publication"
  219. // - These "minor" fields will only be included by default if there are no other fields
  220. // that are to be included:
  221. // (e.g., if one uses "Quick Search" to search the 'abstract' or 'keywords' fields,
  222. // those fields will be displayed instead of the "minor" fields listed here)
  223. $defaultFieldsListViewMinor = "volume, pages"; // e.g. "volume, pages"
  224. // The default list of fields that will be available in drop-down menus of the
  225. // results header:
  226. // (given field names must match column names in MySQL tables 'refs' and 'user_data';
  227. // you can change the order of fields to control the field order in the drop-down menus)
  228. //
  229. // - These fields will be visible for all users, no matter whether they are logged in or not:
  230. $defaultDropDownFieldsEveryone = array("author", "title", "year", "keywords", "abstract",
  231. "type", "publication", "abbrev_journal", "volume",
  232. "issue", "pages", "thesis", "publisher", "place",
  233. "editor", "series_title", "language", "area",
  234. "notes", "call_number", "serial");
  235. // - These fields will be only visible to logged in users:
  236. $defaultDropDownFieldsLogin = array("location", "marked", "copy", "selected", "user_keys",
  237. "user_notes", "user_file", "user_groups", "cite_key");
  238. // Defines the default user options when adding new users:
  239. $defaultUserOptions = array(
  240. // controls whether to include cite keys on export or not:
  241. "export_cite_keys" => "yes", // possible values: "yes", "no"
  242. // controls whether cite keys will be auto-generated on export:
  243. "autogenerate_cite_keys" => "yes", // possible values: "yes", "no"
  244. // controls whether auto-generated cite keys will overwrite record-specific contents from
  245. // the user-specific 'cite_key' field on export:
  246. "prefer_autogenerated_cite_keys" => "no", // possible values: "yes", "no"
  247. // controls whether the user's custom cite key format shall be used (instead of the default
  248. // cite key format provided in '$defaultCiteKeyFormat', see below):
  249. "use_custom_cite_key_format" => "no", // possible values: "yes", "no"
  250. // the user's custom cite key format:
  251. // see comments for '$fileNamingScheme' (below) for more info on supported placeholders
  252. "cite_key_format" => "<:firstAuthor:><:year:>", // e.g. "<:firstAuthor:><:year:>"
  253. // controls whether to add incrementing numbers to any duplicate cite keys:
  254. "uniquify_duplicate_cite_keys" => "yes", // possible values: "yes", "no"
  255. // controls how non-ASCII characters will be treated in cite keys:
  256. // (keep empty in order to use the site default given in '$handleNonASCIICharsInCiteKeysDefault')
  257. "nonascii_chars_in_cite_keys" => "", // possible values: "strip", "keep", "transliterate", ""
  258. // controls whether the user's custom text citation format shall be used (instead of the default
  259. // text citation format provided in '$defaultTextCitationFormat', see below):
  260. "use_custom_text_citation_format" => "no", // possible values: "yes", "no"
  261. // the user's custom text citation format:
  262. // see comments for '$fileNamingScheme' (below) for more info on supported placeholders
  263. "text_citation_format" => "<:authors[2| & | et al.]:>< :year:>< {:recordIdentifier:}>", // e.g. "<:authors[2| & | et al.]:>< :year:>< {:recordIdentifier:}>"
  264. // the user's preferred number of records that's returned by default:
  265. "records_per_page" => "5", // e.g. "5"
  266. // the user's preference for displaying auto-completions:
  267. "show_auto_completions" => "yes", // possible values: "yes", "no"
  268. // the user's preferred list of "main fields" (that will be used instead of the
  269. // default list of "main fields" provided in '$defaultMainFields', see above):
  270. "main_fields" => "author, title, publication, keywords, abstract"); // e.g. "author, title, publication, keywords, abstract"
  271. // The default cite key format used for auto-generation of cite keys:
  272. // see comments for '$fileNamingScheme' (below) for more info on supported placeholders
  273. $defaultCiteKeyFormat = "<:authors:><:year:>"; // e.g. "<:authors:><:year:>"
  274. // Default setting that controls how non-ASCII characters will be treated in auto-generated cite keys:
  275. // - "strip": removes any non-ASCII characters
  276. // - "keep": keeps any non-ASCII characters (note that bibutils may strip any non-ASCII chars from cite
  277. // keys when exporting to Endnote, RIS or BibTeX, depending on the bibutils version you're using)
  278. // - "transliterate": attempts to transliterate most of the non-ASCII characters and strips all non-ASCII
  279. // chars that can't be converted into ASCII equivalents (this is the recommended option)
  280. $handleNonASCIICharsInCiteKeysDefault = "transliterate"; // possible values: "strip", "keep", "transliterate"
  281. // The name of the default citation style:
  282. // This name must correspond to an entry within the 'styles' MySQL table.
  283. // It will be used for citation output within 'show.php', 'opensearch.php' and the 'generateRSS()' function.
  284. $defaultCiteStyle = "APA";
  285. // The size of the PDF page (used when outputting citations as PDF):
  286. $pdfPageSize = "a4"; // possible values: "a4", "letter"
  287. // The default text citation format:
  288. // see comments for '$fileNamingScheme' (below) for more info on supported placeholders
  289. $defaultTextCitationFormat = "<:authors[2| & | et al.]:>< {:recordIdentifier:}>< :year:>"; // e.g. "<:authors[2| & | et al.]:>< :year:>< {:recordIdentifier:}>"
  290. // The name of the default export format:
  291. // This name must correspond to an entry within the 'formats' MySQL table (of 'format_type' = "export").
  292. // It will be used when 'show.php' was called with 'submit=Export' but no 'exportFormat' parameter was specified.
  293. $defaultExportFormat = "RIS";
  294. // Specify whether export of data should be allowed via the refbase GUI for anyone who isn't logged in:
  295. // Note that this setting overrides the permission settings 'allow_export' and 'allow_batch_export' for
  296. // anonymous users ('userID=0') w.r.t. the *web* interface. E.g., with '$allowAnonymousGUIExport' set to
  297. // "no" and export permissions for 'userID=0' set to "yes", you can allow anonymous access to refbase
  298. // via its export APIs while disallowing export by anonymous users via the web interface.
  299. $allowAnonymousGUIExport = "no"; // possible values: "yes", "no"
  300. // The name of the default feed format:
  301. // This specifies whether RSS XML or Atom XML will be offered as default feed format
  302. // (e.g. in auto-discovery links of the HTML head).
  303. $defaultFeedFormat = "RSS XML"; // possible values: "RSS XML", "Atom XML"
  304. // Specify who'll be allowed to see files associated with any records:
  305. // Set this variable to "everyone" if you want _any_ visitor of your database (whether he's logged
  306. // in or not) to be able to see links to any associated files. If you choose "login" instead, a
  307. // user must be logged in to view any files. Finally, use "user-specific" if you want to set this
  308. // permission individually for each user. Note that, setting this variable to either "everyone" or
  309. // "login" will override the user-specific permission setting for file downloads ("allow_download"
  310. // permission).
  311. $fileVisibility = "user-specific"; // possible values: "everyone", "login", "user-specific"
  312. // Specify a condition where files will be always made visible [optional]:
  313. // This variable can be used to specify a condition where the above rule of file visibility can be
  314. // by-passed (thus allowing download access to some particular files while all other files are
  315. // protected by the above rule). Files will be shown regardless of the above rule if the specified
  316. // condition is met. First param must be a valid field name from table 'refs', second param the
  317. // conditional expression (specified as /perl-style regular expression/ -> see note at the end of
  318. // this file). The given example will *always* show links to files where the 'thesis' field of the
  319. // corresponding record is not empty. If you do not wish to make any exception to the above rule,
  320. // just specify an empty array, like: '$fileVisibilityException = array();'. Use the "/.../i"
  321. // modifier to invoke case insensitive matching.
  322. $fileVisibilityException = array("thesis", "/.+/"); // e.g. 'array("thesis", "/.+/")'
  323. // Define what will be searched by "library_search.php":
  324. // refbase offers a "Library Search" feature that provides a separate search page for searching an
  325. // institution's library. All searches performed thru this search form will be restricted to
  326. // records that match the specified condition. First param must be a valid field name from table
  327. // 'refs', second param the conditional expression (specified as MySQL extended regular expression
  328. // -> see note at the end of this file). Of course, you could also use this feature to restrict
  329. // searches thru "library_search.php" by _any_ other condition. E.g., with "location" as the first
  330. // parameter and your own login email address as the second parameter, any "library" search would
  331. // be restricted to your personal literature data set. If you don't want to make any use of
  332. // "library_search.php", specify an empty array, like: '$librarySearchPattern = array();'
  333. $librarySearchPattern = array("location", "library"); // e.g. 'array("location", "IP� Library")'
  334. // Define the directory path that's used to save session data and to write any temporary files.
  335. // Usually, you can leave this variable as is. However, if you're on a hosted service, your
  336. // Internet Service Provider may have given you a specific session/temp DIR path which you may need
  337. // to specify here.
  338. $sessionTempDir = session_save_path(); // e.g. session_save_path(), or "/var/www/web12345/phptmp"
  339. //echo 'tempdir: '.$sessionTempDir.'<br>';
  340. // The base DIR path to your default file directory:
  341. // I.e., the local path to the root directory where any PDF files etc. are stored. This must be a
  342. // valid path specification to a local directory that's accessible (read+write) by the server. As an
  343. // example, if you're using the Apache web server on a unix machine and if your default file
  344. // directory (named "files") is located on the root level of your refbase script directory (named
  345. // "refs") the path spec could be something like: "/usr/local/httpd/htdocs/refs/files/"
  346. // (IMPORTANT: if given, the base dir MUST end with a slash!)
  347. $filesBaseDir = getcwd()."/files/"; // e.g. "/usr/local/httpd/htdocs/refs/files/"
  348. //echo "dir: ".$filesBaseDir.'<br>';
  349. // The URL to the default file directory that you've specified in $filesBaseDir:
  350. // Any string within the 'file' field of the 'refs' table that doesn't start with "https://" or
  351. // "ftp://" will get prefixed with this URL. If your files directory is within your refbase root
  352. // directory, specify a *relative* path (e.g.: "files/" if the directory is on the same level as the
  353. // refbase php scripts and it's named "files"). Alternatively, if your files directory is somewhere
  354. // else within your server's DocumentRoot, you must specify an *absolute* path (e.g.: "/files/" if
  355. // the directory is on the uppermost level of your DocumentRoot and it's named "files"). If,
  356. // instead, you want to use *complete* path specifications within the 'file' field (e.g. because
  357. // your files are located within multiple directories), simply don't specify any URL here, i.e.,
  358. // keep it empty: '$filesBaseURL = "";'
  359. // (IMPORTANT: if given, the base URL MUST end with a slash!)
  360. $filesBaseURL = "files/"; // e.g. "files/"
  361. // Specify if files should be moved into sub-directories:
  362. // - "never": files will always be copied to the root files dir (i.e. don't use any sub-directories)
  363. // - "always": auto-generate new sub-directories if required (according to the naming scheme
  364. // given in '$dirNamingScheme', see below)
  365. // - "existing": only copy files into sub-directories if the sub-directory already exists
  366. $moveFilesIntoSubDirectories = "never"; // possible values: "never", "always", "existing"
  367. // Specify the naming scheme for auto-generated sub-directories:
  368. // (see comments for '$fileNamingScheme' for more info on supported placeholders)
  369. // Notes: - use slashes ('/' or '\') to separate between multiple sub-directories
  370. // - you're allowed to use any characters between (or within) placeholders except the delimiters
  371. // '<', '>' and ':'
  372. // - handling of any non-ASCII chars will be controlled by '$handleNonASCIIChars' and unwanted
  373. // characters can be excluded with the help of '$allowedDirNameCharacters' (see below)
  374. $dirNamingScheme = "<:firstAuthor:>/<:year:>"; // e.g. "<:firstAuthor:>/<:year:>"
  375. // Specify whether refbase shall rename uploaded files:
  376. // (note that if '$renameUploadedFiles' is set to "no", uploaded files will be blocked if they
  377. // contain any other characters than specified in '$allowedFileNameCharacters', see below)
  378. $renameUploadedFiles = "yes"; // possible values: "yes", "no"
  379. // Specify how to rename uploaded files:
  380. // Supported placeholders:
  381. // <:serial:>, <:authors:>, <:firstAuthor:>, <:secondAuthor:>, <:title:>, <:year:>, <:publication:>,
  382. // <:abbrevJournal:>, <:volume:>, <:issue:>, <:pages:>, <:startPage:>, <:endPage:>, <:keywords:>,
  383. // <:issn:>, <:isbn:>, <:issn_isbn:>, <:area:>, <:notes:>, <:userKeys:>, <:citeKey:>, <:doi:>,
  384. // <:recordIdentifier:>, <:randomNumber:>
  385. // Notes: - some of these placeholders offer options (e.g. how many words/items shall be extracted
  386. // from the given field), please see the refbase online documentation for more info about
  387. // placeholders and their syntax: <https://placeholders.refbase.net/>
  388. // - existing file extensions will be kept untouched by this naming scheme
  389. // - you're allowed to use any characters between (or within) placeholders except the delimiters
  390. // '<', '>' and ':'
  391. // - handling of any non-ASCII chars will be controlled by '$handleNonASCIIChars' and unwanted
  392. // characters can be excluded with the help of '$allowedFileNameCharacters' (see below)
  393. // - it is strongly recommended to always include the '<:serial:>' placeholder in order to ensure
  394. // truly unique file names, otherwise you'll risk files already on the server getting overwritten
  395. // by newly uploaded files (that got assigned the same name)
  396. $fileNamingScheme = "<:serial:>_<:authors:><:year:>"; // e.g. "<:serial:>_<:authors:><:year:>"
  397. // Specify how non-ASCII characters shall be treated in file/directory names:
  398. // - "strip": removes any non-ASCII characters
  399. // - "keep": keeps any non-ASCII characters (which, depending on your file system, may cause problems!)
  400. // - "transliterate": attempts to transliterate most of the non-ASCII characters and strips all non-ASCII
  401. // chars that can't be converted into ASCII equivalents (this is the recommended option)
  402. $handleNonASCIIChars = "transliterate"; // possible values: "strip", "keep", "transliterate"
  403. // Specify all characters that will be allowed in file names:
  404. // In addition to the character conversion invoked by '$handleNonASCIIChars' (see above), this variable
  405. // allows you to further restrict generation of file names to a particular set of characters.
  406. // If '$renameUploadedFiles' is set to "no", uploaded files will be blocked if they contain any other
  407. // characters than specified here. If '$renameUploadedFiles' is set to "yes", any characters which
  408. // are not listed below will be removed from the generated file name.
  409. // (given expression must be specified as contents of a perl-style regular expression character class -> see
  410. // note at the end of this file; you can simply specify an empty string if you don't want any further character
  411. // conversion: '$allowedFileNameCharacters = "";')
  412. $allowedFileNameCharacters = "a-zA-Z0-9+_.-"; // e.g. "a-zA-Z0-9+_.-"
  413. // Specify all characters that will be allowed in directory names:
  414. // (same notes apply as for '$allowedFileNameCharacters')
  415. $allowedDirNameCharacters = "a-zA-Z0-9+_-"; // e.g. "a-zA-Z0-9+_-"
  416. // Choose whether case transformations shall be applied to the file/directory names:
  417. // - "no": don't perform any case tranformations (i.e, keep the file/directory names as is)
  418. // - "lower": transform all characters to lower case
  419. // - "upper": transform all characters to upper case
  420. // (note that case transformations will be always performed regardless of any other file/directory
  421. // related settings)
  422. // File names:
  423. $changeCaseInFileNames = "no"; // possible values: "no", "lower", "upper"
  424. // DIR names:
  425. $changeCaseInDirNames = "lower"; // possible values: "no", "lower", "upper"
  426. // Default options for placeholders used by the file/directory name, cite key and
  427. // link auto-generation features:
  428. // Notes: - please see the refbase online documentation for more info about placeholders and
  429. // their syntax: <https://placeholders.refbase.net/>
  430. //
  431. // Default options for '<:authors:>':
  432. // syntax: "[USE_MAX_NUMBER_OF_AUTHORS|AUTHOR_CONNECTOR|ET_AL_IDENTIFIER]"
  433. $extractDetailsAuthorsDefault = "[2|+|_etal]"; // e.g. "[2|+|_etal]"
  434. // Default options for '<:title:>':
  435. // syntax: "[NUMBER_OF_WORDS_FROM_TITLE_FIELD]"
  436. $extractDetailsTitleDefault = "[1]"; // e.g. "[1]"
  437. // Default options for '<:year:>':
  438. // syntax: "[DIGIT_FORMAT]"
  439. $extractDetailsYearDefault = "[4]"; // possible values: "[2]", "[4]"
  440. // Default options for '<:publication:>':
  441. // syntax: "[NUMBER_OF_WORDS_FROM_PUBLICATION_FIELD]"
  442. $extractDetailsPublicationDefault = "[3]"; // e.g. "[3]"
  443. // Default options for '<:abbrevJournal:>':
  444. // syntax: "[NUMBER_OF_WORDS_FROM_ABBREVJOURNAL_FIELD]"
  445. $extractDetailsAbbrevJournalDefault = "[3]"; // e.g. "[3]"
  446. // Default options for '<:keywords:>':
  447. // syntax: "[NUMBER_OF_ITEMS_FROM_KEYWORDS_FIELD]"
  448. $extractDetailsKeywordsDefault = "[1]"; // e.g. "[1]"
  449. // Default options for '<:area:>':
  450. // syntax: "[NUMBER_OF_ITEMS_FROM_AREA_FIELD]"
  451. $extractDetailsAreaDefault = "[1]"; // e.g. "[1]"
  452. // Default options for '<:notes:>':
  453. // syntax: "[NUMBER_OF_WORDS_FROM_NOTES_FIELD]"
  454. $extractDetailsNotesDefault = "[1]"; // e.g. "[1]"
  455. // Default options for '<:userKeys:>':
  456. // syntax: "[NUMBER_OF_ITEMS_FROM_USERKEYS_FIELD]"
  457. $extractDetailsUserKeysDefault = "[1]"; // e.g. "[1]"
  458. // Default options for '<:randomNumber:>':
  459. // syntax: "[MINIMUM_NUMBER|MAXIMUM_NUMBER]"
  460. // specify an empty string (or "[|]") to use the maximum possible range: '$extractDetailsRandomNumberDefault = "";'
  461. $extractDetailsRandomNumberDefault = "[0|99999]"; // e.g. "[0|99999]"
  462. // The default view that is displayed for found results:
  463. // - "List" will produce the columnar output style (List view)
  464. // - "Cite" returns found records as citations (Citation view)
  465. // - "Display" displays full record details (Details view)
  466. // - "Browse" displays unique field values (Browse view)
  467. $defaultView = "List"; // possible values: "List", "Cite", "Display", "Browse"
  468. // Specify whether additional info is made available in Citation view by clicking a triangle
  469. // widget underneath each citation, and which fields shall be included:
  470. // (given field names must match column names in MySQL tables 'refs' and 'user_data';
  471. // you can change the order of fields to control the display order; to completely disable
  472. // this feature, specify an empty array, like: '$additionalFieldsCitationView = array();')
  473. $additionalFieldsCitationView = array("abstract", "keywords", "area", "user_keys",
  474. "user_groups", "user_notes", "cite_key");
  475. // Specify whether additional fields shall be displayed in Details view by default:
  476. // In Details view, these "additional fields" will get displayed between the 'abstract'
  477. // and 'call_number' fields; they constitute fields that are usually less important
  478. // (such as publisher or series info)
  479. $showAdditionalFieldsDetailsViewDefault = "yes"; // possible values: "yes", "no"
  480. // Specify whether user-specific fields shall be displayed in Details view by default:
  481. // In Details view, user-specific (i.e. personal/private) fields will get displayed for
  482. // logged-in users below all other fields with a light yellow background; they constitute
  483. // fields that are individual for each user and cannot be viewed by other users
  484. $showUserSpecificFieldsDetailsViewDefault = "yes"; // possible values: "yes", "no"
  485. // Specify whether the results header & footer should be displayed open or closed by default,
  486. // or whether they should be entirely hidden from the interface:
  487. // (display defaults are specified for each of the supported view types individually;
  488. // see comments for '$defaultView' for more info on the different view types)
  489. // Possible view types: "List", "Cite", "Display", "Browse"
  490. // Possible display values: "open", "closed", "hidden"
  491. //
  492. // - Results header:
  493. // "view type" => "display value"
  494. $displayResultsHeaderDefault = array("List" => "open",
  495. "Cite" => "closed",
  496. "Display" => "closed",
  497. "Browse" => "hidden");
  498. // - Results footer:
  499. // (note that the cite, group & export functionality doesn't yet work in Browse view)
  500. // "view type" => "display value"
  501. $displayResultsFooterDefault = array("List" => "open",
  502. "Cite" => "closed",
  503. "Display" => "closed",
  504. "Browse" => "hidden");
  505. // Specify which links shall be displayed (if available and if the Links column is visible):
  506. // (note that for List and Citation view, only one link will be printed for links of type
  507. // url/doi/isbn/xref; order of preference: doi, url, isbn, xref)
  508. // Possible array items: "details", "edit", "file", "url", "doi", "isbn", "xref"
  509. //
  510. // - List view:
  511. $showLinkTypesInListView = array("details", "edit", "file", "url", "doi", "isbn", "xref");
  512. // - Citation view:
  513. $showLinkTypesInCitationView = array("details", "edit", "file", "url", "doi", "isbn", "xref");
  514. // Specify the views where clickable search links shall be created for items in certain fields:
  515. // (note that for Citation view, search links are currently only provided within the "more info"
  516. // section underneath each citation, see also variable '$additionalFieldsCitationView'; to
  517. // completely disable this feature for all views, specify an empty array like:
  518. // '$showFieldItemLinks = array();')
  519. $showFieldItemLinks = array("List", "Cite", "Display"); // possible array items: "List", "Cite", "Display"
  520. // Specify the list of fields whose items should be made into clickable search links:
  521. // (note that this feature isn't available for all fields from MySQL tables 'refs' and
  522. // 'user_data', nor does it make sense for all fields)
  523. // Possible fields: "author", "title", "type", "year", "publication", "abbrev_journal",
  524. // "keywords", "thesis", "area", "expedition", "notes", "serial", "marked",
  525. // "selected", "user_keys", "user_notes", "user_groups", "cite_key"
  526. $linkedFields = array("author", "year", "publication", "abbrev_journal", "keywords", "area",
  527. "user_keys", "user_notes", "user_groups");
  528. // Specify the maximum number of links to found results pages that are displayed per page:
  529. $maximumBrowseLinks = "10";
  530. // Define 'accesskey' values which allow for keyboard navigation of the refbase interface:
  531. // An access key is a single character; for maximum compatibility, use only the lowercase
  532. // ASCII letters "a" through "z". Alternatively, you might want to use digits for access
  533. // keys in order to avoid conflicts with built-in keyboard shortcuts in browsers and other
  534. // software. To disable a particular accesskey, specify an empty value (""); to completely
  535. // disable all access keys, specify an empty array, like: '$accessKeys = array();'
  536. $accessKeys = array(
  537. // page header:
  538. "home" => "0", // "Home" link (e.g. "0")
  539. "show_all" => "1", // "Show All" link (e.g. "1")
  540. "search" => "", // "Simple Search" link (e.g. "s")
  541. "adv_search" => "", // "Advanced Search" link
  542. "add" => "", // "Add Record" link (e.g. "a")
  543. "import" => "", // "Import" link (e.g. "i")
  544. "sql_query" => "", // "your query" link (e.g. "q")
  545. "save_query" => "", // "save" link (e.g. "v")
  546. "dups" => "", // "dups" link (e.g. "u")
  547. "history" => "", // "history" link (e.g. "y")
  548. "my_refs" => "7", // "My Refs" link (e.g. "7")
  549. "my_opt" => "8", // "Options" link (e.g. "8")
  550. "login" => "9", // "Login/Logout" link (e.g. "9")
  551. "qck_search" => "f", // text entry field of the "Quick Search" form (e.g. "f")
  552. // results header:
  553. "header" => ",", // "Search & Display Options" link that toggles visibility of the results header (e.g. ",")
  554. "refine" => "", // text entry field of the "Search within Results" form
  555. "max_rows" => "r", // "records per page" text entry field of the "Display Options" form (e.g. "r")
  556. // browse links:
  557. "next" => "2", // "next results page" link (e.g. "2" or "n")
  558. "previous" => "", // "previous results page" link (e.g. "p")
  559. "list" => "3", // "List View" link (e.g. "3")
  560. "cite" => "4", // "Citations" link (e.g. "4")
  561. "details" => "5", // "Details" link (e.g. "5")
  562. "print" => "6", // "Web/Print View" link (e.g. "6")
  563. // results footer:
  564. "footer" => ".", // "Cite, Group & Export Options" link that toggles visibility of the results footer (e.g. ".")
  565. "biblio" => "", // "Cite" button of the "Save Citations" form (e.g. "c")
  566. "export" => "", // "Export" button of the "Export Records" form (e.g. "e")
  567. // page footer:
  568. "sql_search" => "", // "SQL Search" link
  569. "cql_search" => "", // "CQL Search" link
  570. "lib_search" => "", // "Library Search" link
  571. "show_rec" => "", // "Show Record" link (e.g. "w")
  572. "extract" => "", // "Extract Citations" link (e.g. "x")
  573. // search pages:
  574. "search_opt" => ",", // "Search/Display Options" link that toggles visibility of the search/display options (e.g. ",")
  575. "search_help" => ".", // "Help/Examples" link that toggles visibility of the inline help/examples (e.g. ".")
  576. );
  577. // Specify the base URL to an OpenURL resolver:
  578. // Notes: - more info about the OpenURL standard (including pointers to further documentation)
  579. // is available at <https://en.wikipedia.org/wiki/OpenURL>
  580. // - specify an empty string if you don't want any auto-generation of OpenURL links:
  581. // '$openURLResolver = "";'
  582. $openURLResolver = "https://www.crossref.org/openurl";
  583. // Examples for OpenURL resolvers:
  584. // - Generic OpenURL resolver provided by CrossRef: "https://www.crossref.org/openurl"
  585. // (note that the CrossRef.org resolver requires you to register for a free account,
  586. // see the comments for '$crossRefReqDat' below)
  587. //
  588. // - 1Cate, the OpenURL link-server from ISI/Openly: "https://isi.1cate.com/?sid=ISI:WoS"
  589. //
  590. // - WorldCat OpenURL resolver which redirects to "the best" resolver for the client IP address:
  591. // "https://worldcatlibraries.org/registry/gateway"
  592. // Specify your CrossRef account credentials:
  593. // Notes: - the CrossRef.org OpenURL resolver requires users to have an account and to supply their login
  594. // credentials in the 'pid' parameter of the OpenURL request; for more info please see:
  595. // <https://www.crossref.org/openurl>
  596. // - to request a (free) account, complete the form at: <https://www.crossref.org/requestaccount/>
  597. // - after you've created & verified your account, enter your login credentials (e.g.
  598. // "name@someplace.com" or "username:password") here
  599. $crossRefReqDat = "info@refbase.net"; // e.g. "info@refbase.net"
  600. // Define the format for an ISBN lookup URL:
  601. // Notes: - obviously, the ISBN link will only get auto-generated if an ISBN number is present
  602. // - specify an empty string if you don't want any auto-generation of ISBN links: '$isbnURLFormat = "";'
  603. $isbnURLFormat = "https://isbn.nu/<:isbn:>";
  604. // e.g. isbn.nu ISBN resolver: "https://isbn.nu/<:isbn:>"
  605. // If your institution has access to particular databases of the "Cambridge Scientific Abstracts"
  606. // (CSA) Internet Database Service (https://www.csa1.co.uk/csa/index.html), you can specify the
  607. // direct URL to the database(s) below. Why that? The 'import.php' script offers an import form
  608. // that enables a user to import records from the CSA Internet Database Service. The URL you specify
  609. // here will appear as link within the explanatory text of 'import.php' pointing your users
  610. // directly to the CSA databases you have access to.
  611. // e.g. "https://www.csa1.co.uk/htbin/dbrng.cgi?username=...&amp;access=...&amp;cat=aquatic&amp;quick=1"
  612. $importCSArecordsURL = "https://www.csa1.co.uk/csa/index.html";
  613. // The search & replace actions defined in file 'includes/transtab_refbase_html.inc.php' will be
  614. // applied to the 'title', 'address', 'keywords' and 'abstract' fields (the list of fields can be
  615. // modified below, see '$searchReplaceActionsArray'). This feature is meant to provide richer text
  616. // capabilities (like displaying italics or super-/subscript) from the plain text data delivered by
  617. // the MySQL database. It works by means of "human readable markup" that's used within the plain
  618. // text fields of the database to define rich text characters. E.g., if you enclose a particular
  619. // word by substrings (like '_in-situ_') this word will be output in italics. Similarly, '**word**'
  620. // will print the word in boldface, 'CO[sub:2]' will cause the number in 'CO2' to be set as
  621. // subscript while '[delta]' will produce a greek delta letter. Feel free to customize this markup
  622. // scheme to your needs (the left column of the array in 'transtab_refbase_html.inc.php' represents
  623. // regular expression patterns matching the human readable markup that's used in your database while
  624. // the right column represents the equivalent HTML encoding). If you do not wish to perform any
  625. // search and replace actions, just specify an empty array, like: '$transtab_refbase_html =
  626. // array();'.
  627. include 'includes/transtab_refbase_html.inc.php'; // include refbase markup -> HTML search & replace patterns
  628. // Defines search & replace 'actions' that will be applied to all those refbase fields that are listed in the corresponding 'fields' element
  629. // upon WEB DISPLAY. Search & replace patterns must be specified as perl-style regular expression (including the leading & trailing slashes)
  630. // and may include mode modifiers (such as '/.../i' to perform a case insensitive match) -> see note at the end of this file.
  631. // If you don't want to perform any search and replace actions, specify an empty array, like: '$searchReplaceActionsArray = array();')
  632. // "/Search Pattern/" => "Replace Pattern"
  633. $searchReplaceActionsArray = array(
  634. array(
  635. 'fields' => array("title", "publication", "abbrev_journal", "address", "keywords", "abstract", "orig_title", "series_title", "abbrev_series_title", "notes"),
  636. 'actions' => $transtab_refbase_html // perform search & replace actions that provide for human readable markup (as defined in 'includes/transtab_refbase_html.inc.php')
  637. )
  638. // ,
  639. // array(
  640. // 'fields' => array("address", "abstract"),
  641. // 'actions' => array(
  642. // "/((?:ht|f)tp:\/\/[^ \"<>\r\n]+?)(?=&gt;|&quot;|[ \"<>\r\n]|$)/" => "<a target='_new' href='\\1'>\\1</a>", // generate clickable links from any web addresses
  643. // "/([0-9a-zA-Z._-]+)@([0-9a-zA-Z._-]+)\\.([a-zA-Z]{2,3})/" => "<a href='mailto:\\1@\\2.\\3'>\\1@\\2.\\3</a>" // generate clickable links from any email addresses
  644. // )
  645. // )
  646. );
  647. // --------------------------------------------------------------------
  648. // Note regarding the use of regular expressions:
  649. // Certain variables within this file expect you to enter search patterns as either "MySQL
  650. // extended" or "perl-style" regular expression. While regular expressions provide a powerful
  651. // syntax for searching they may be somewhat difficult to write and daunting if you're new to the
  652. // concept. If you require help coming up with a correct regular expression that matches your
  653. // needs, you may want to visit <https://grep.extracts.de/> for pointers to language-specific
  654. // documentation, tutorials, books and regex-aware applications. Alternatively, you're welcome to
  655. // post a message to the refbase help forum: <https://sourceforge.net/forum/forum.php?forum_id=218758>
  656. ?>