PhpBibliography Logo

PhpBibliography - web based bibliography system

by Lorenzo Bettini

PhpBibliography allows you to publish your bibliography online (and to edit it via web).
It is implemented in Php and uses MySql.

This is free software, open source, released under GPL.

Download and Install

You can download PhpBibliography from here:
http://sourceforge.net/projects/phpbibliography

You need a web server with php support and a MySql server.  In particular, phpbibliography was developed under Linux, using Apache 2 web server (I guess it should work also on other systems).

These are the main additions in the new releases.

You can also find details about new features on my blog, in this area: http://tronprog.blogspot.com/search/label/phpbibliography.

Upgrade from version 0.3 to 0.4

First you need to upgrade the database table structure by using the file update-0.3-0.4.sql you find in the distribution archive:
mysql -u <your user> -p <bibliography database> < update-0.3-0.4.sql
Of course, you need to use the same database name you had used when you performed the original installation.

Then, copy all the files (you can skip the subdirectories) of the html directory to the desired directory in your web server (replacing all the previous files), but please, DO NOT REPLACE the existing config.php, otherwise you will lose your previous configurations. Since version 0.3 the config.php is not distributed: the file config_example.php is distributed and it must be copied into config.php during a brand new installation. This way, you can safely copy all the files in the html directory into your server directory without risking to override your previous config.php.

Upgrade from version 0.2 to 0.3

The database structure did not change between these two versions.

Copy all the files (you can skip the subdirectories) of the html directory to the desired directory in your web server (replacing all the previous files). Since version 0.3 the config.php is not distributed: the file config_example.php is distributed and it must be copied into config.php during a brand new installation. This way, you can safely copy all the files in the html directory into your server directory without risking to override your previous config.php.

Notice that a global variable has been added in version 0.3, $cssurl, containing the CSS file that will be used by all the pages generated by phpbibliography. CSS is one of the novelties of version 0.3.

Upgrade from version 0.1 to 0.2

If you're already using version 0.1 and you want to upgrade to version 0.2, first you need to upgrade the database table structure by using the file update-0.1-0.2.sql you find in the distribution archive:
mysql -u <your user> -p <bibliography database> < update-0.1-0.2.sql
Of course, you need to use the same database name you had used when you installed the version 0.1.

Then, copy all the files (you can skip the subdirectories) of the html directory to the desired directory in your web server (replacing all the previous files), but please, DO NOT REPLACE the existing config.php, otherwise you will lose your previous configurations. Since version 0.3 the config.php is not distributed: the file config_example.php is distributed and it must be copied into config.php during a brand new installation. This way, you can safely copy all the files in the html directory into your server directory without risking to override your previous config.php.

Brand new install

These instructions assume you already have a working web server/php/MySql system:
  1. Create a database called bibliography (this is the default but you can choose the name you want, provided you update config.php accordingly, see below; for instance some providers already set up some databases for you, with specific names: you should choose one of these and then update config.php accordingly, see below)
  2. (Optional) assign user and password to the created database
  3. upload the file bibliography.sql you find in the zip file (this will create the table structures); in order to do this you can either use the following mysql command, where <your user> should be replaced with the user you assigned to the database (default: root) and <bibliography database> is the name of the database you created (default: bibliography):
    mysql -u <your user> -p <bibliography database> < bibliography.sql
    Alternatively you can use your favorite mysql management system, e.g., phpMyAdmin.
    Note: phpbibliography relies on InnoDB tables for the database, but it should work even with standard MySql table types (I haven't tested this) but you lose referential integrity.
  4. Copy (or even better, move) the file config_example.php into config.php and edit the config.php file in the html directory according to your configuration: copy all the contents (including the subdirectories) of the html directory to the desired directory in your web server (make sure that the subdirectory files is writable from the web server user - you can make it writable and accessible from anyone. This directory will store the papers you upload via phpbibliography)
If everything was setup correctly you should be able to access to your bibliography site with a browser.

Customizing the format of a paper (also on the fly)

Since version 0.4, you can pass, in the URL, some variables that allows you to customize the way a paper is shown on the screen. These parameters can also be specified as global variables in the config file. Of course, the value passed in the URL has the precedence over the one specified in the config file. Here we list these parameters (in the URL they must be passed without the $, using the GET passing method syntax) and their default values:

Adding and modifying users and papers

(Since version 0.3 an online help is available when editing/adding papers; please refer to that help for further details).

The first time you access your online bibliography it will, of course, contain no entries.

You can access the administration page of phpbibliography by accessing the file admin.php (i.e., if your phpib site is http://mysite/phpbibliography/ you should access the administration page as http://mysite/phpbibliography/admin.php). You'll be asked a username and a password. Phpbibliography comes with a predefined admin user, password admin. Use it to login the first time and then go in the users section and change the password.

IMPORTANT: the authentication relies on sessions, and typically sessions are implemented through cookies (although php can handle them even without them, if configured accordingly). So, you might need to enable cookies in your browser; however the system will perform a check about cookies.

You can create further users if you want; if you set the "admin" check box when creating/editing a user, that user will have administration privileges (e.g., he'll be able to change other users besides himself).

Next you can start adding your authors, categories of the papers, and then the papers themselves. This can be done by accessing the main menu of admin.php. Since version 0.3, you can also add new authors and new categories on the fly when editing/adding a paper.

When inserting a paper you can also upload two files for your paper (they will be uploaded in the files subdirectory, see above); alternatively, instead of uploading a file you can insert a direct link (URL) to the paper if the paper is already available on-line somewhere else.

BibTex Management

Since version 0.2, when displaying a paper information, the system will generate a link to a bibtex page, where the bibtex of that paper will be shown. Such page can either be generated automatically by the system, or can simply show the bibtex field of the paper, if this is set.  When inserting a paper you can specifiy the type of the paper (according to the bibtex syntax, i.e., INPROCEEDINGS, ARTICLE, etc.), and you can manually insert the bibtex. If you leave the bibtex field empty, then, when displaying the list of papers, the system will automatically generate the corresponding bibtex.

Since version 0.2, you can add a new paper also by using a bibtex entry (see the menu in the admin page). This will interpret the bibtex entry and create a paper entry; once the paper is created, you'll have the chance to modify it (and add missing parts, such as the abstract and upload files for the paper). When inserting a paper through a bibtex, the system will use the authors specified in the bibtex entry; in particular, it will search for the authors in the already existing author table (it will also infer the name of the author if this is not fully specified in the bibtex entry, e.g., if the author in the bibtex is L. Bettini, and the author table contains the author Lorenzo Bettini, then it will use this author); if it does not find a matching author, it will automatically add it to the table of authors. When inserting a paper this way, you can also decide whether to set the paper bibtex field to the bibtex that was used to insert the paper.

Since version 0.4, papers can also be modified through a bibtex; this relies on the new paper field, introduced in version 0.4, bibtex key. Thus, the system will modify the paper that has the same bibtex key of the bibtex that is used for modification. If you update from a previous version, or simply don't feel like manually set the bibtex key for each entry, you can use the functionality "Generate Missing BibTex Keys" from the administration menu; this will generate and assign unique bibtex keys to papers who have not set it. Papers where bibtex key is already set will not be touched.

Classification of papers

You can classify a paper according several criteria, and since version 0.4 these criteria can be dynamic. Each criterion is called classification. By default the system already contains the classification called Categories (also for backward compatibility). Since version 0.4 you can add further classifications (e.g., keywords). Moreover, bibtex fields can be associated to specific classifications. (Please refer to the online help).

A classification can be specified as "multiple" if more than one category belonging to such classification can be assigned to a paper (the classification "categories" has this attribute, since it is compatible with existing categories). Otherwise, only one category belonging to such classification can be assigned to a paper.

For each classification, the system will generate a selection field in the paper editing form. (Please refer to the online help).

Viewing and showing papers

The initial default page of the bibliography site will list all the papers in the database, but it also provides a menu to view the papers, in order to show them in a specific order, or in order to filter them.

Since version 0.3, the main page provides also means to search papers according to specific values for each fields of papers.

Tips:

If you want to include your own papers (i.e., only those where you're one of the author) in your own web site (even different from that where you installed the bibliography system) you can filter the papers by showing only those that  belong to you.  Then you can copy the URL of your browser, that will something of the shape http://<yourbibliographysite>/index.php?groupby=0&author=21, and use it as a link in your web site.  Furthermore, if you use php in your web site as well, you can simply embed it in a page of your web site, for instance with a line similar to <?php include("http://<yourbibliographysite>/index.php?groupby=0&author=21");?> (of course the most important part is the identifier of the author whose papers your want to show).  This is how I do to show my papers (taken from another bibiliography web site) into my webpage: http://www.lorenzobettini.it/papers; the research papers are taken from a phpbibliography site, the technical papers are taken from another phpbibliography site.

Similarly, you can show papers that are obtained as the result of a paper search (using the button in the main page, since version 0.3) by copying the URL that appears when you performed the search (it is quite a long url since it contains the search criteria).

Since version 0.4, you can pass some parameters on the url, in order to customize the formatting of the paper on the fly.

For instance, reusing the above example, if you use this url:
http://<yourbibliographysite>/index.php?groupby=0&author=21&printfilenames=0&linktodetails=0
You also specify that only the extensions of the files of the papers will be shown, and no link to details of the papers will be generated.

If you use this url:
http://<yourbibliographysite>/index.php?groupby=0&author=21&paperorder=title
You also specify that the papers will be sorted according to their title.

Troubleshooting

Please feel free to email me for any problem and comments/suggestions. (Find my email address at my home page http://www.lorenzobettini.it). You can also use the sourceforge mechanisms to communicate bugs, feature requests, patches.

SourceForge.net Logo