Home > Admin Area > WebJournal Admin Guide |
This guides shows how you can set up a new journal managed by the WebJournal module of Invenio. You should first read the WebJournal Editor Guide to get an overview of the main concepts of this module
To add a journal, go to the WebJournal admin interface and click "Add new journal". Provide the name of your journal, and edit the configuration of the journal. Click "Save".
Note that by
default your Apache user should not be able to save the
configuration since it should not have rights to write
to /opt/invenio/etc/webjournal/
. To save the settings
you might want to manually save your configuration
to /opt/invenio/etc/webjournal/yourJournalName/yourJournalName-config.xml
or give write permission to /opt/invenio/etc/webjournal/
Usually adding a journal also requires to set up a dedicated submission, give some access using WebAccess, and can optionally lead to the creation of WebSearch collections (you can, but your don't have to, map your journal categories to WebSearch collections. You can also simply create a generic collection for all articles in all categories of your journal, or don't create collections at all). See the section dedicated to articles submission.
You can either configure the journal from the admin web interface or directly by editing the configuration file (see above note).
The configuration consists in an XML file with the following nodes:
categoryName, query
. The journal categories are not necessary mapped to Invenio collections (but they can be, for consistency)1
if your release are not usually grouped.all
" (recommended). If only future unreleased issues must be hidden to readers, type "future
". If unreleased issues must always be accessible to everyone (even if displayed empty), use "none
". Hidden issues are only visible to users who can access action "cfgwebjournal
").CFG_SITE/submit/direct
URLs).01
)allow
' or 'deny
' (default): if we should allow or not (default) access to images and files attached to an article even if this article is still part of a restricted collection: this allows to workaround the time required for an article to appear in a public collection after an issue has been released. Access is still forbidden if the article does not belong to a released issue, but at least default authorizations of the record do not apply.* Means repeatable
A journal typically contains the following sections, each generated using a different template (as defined in your journal configuration):
http://yourSite/journal/yourJournalName/
or for a specific issue and/or category at http://yourSite/journal/yourJournalName/year/number/category
yourJournalName
is not provided, the user is automatically redirected to the latest issue of your journal. If there are several journals available, he is offered a list of journals to choose from. When category is missing, the first category defined for your journal is used. When /year/number/
are missing, the latest issue is chosen.http://yourSite/journal/yourJournalName/year/number/category
/recIDhttp://yourSite/journal/
search?name=yourJournalName
http://yourSite/journal/
contact?name=yourJournalName
http://yourSite/journal/
contact?name=yourJournalName
The WebJournal module relies on the BibFormat module to generate its output. You should then already be familiar with its concepts before reading further. In a few words, you edit the templates of a journal using HTML, and use special tags for the dynamic parts (navigation menu, article title, content, etc) of the layout.
The main differences between the use of BibFormat for journals compared to BibFormat for the formatting of bibliographic records are:
tags
<html>
, <header>
, <body>
,
etc./opt/invenio/etc/bibformat/format_templates/webjournal/
.bfo
parameter passed to their format(bfo,
...)
function to access the articles metadata: format
elements are not only used in the context of a single
record/article, but can be used to format several records/articles
at the same time. A notable exception is in the case of template
used for the article
page.As said above, WebJournal format elements are not used only to
format a single article/record: they are used as a generic way to
provide dynamic content to your journal, such as the main navigation
menu containing the categories defined for your journal, or a
dynamically updated weather forecast section. As a consequence you
should not use the bfo
object of
the format_element(bfo, ...)
function to access the
articles metadata, as it does not correspond to a record (see
exceptions further below). You can however use it to access knowledge
bases and user information.
In order to access the context of the page, you should use
the parse_url_string(bfo.user_uri['uri'])
function, which
returns a dictionary with the keys and values:
journal_name
: the name of the journal as shown in
the URLs, and generally used as parameter to other functions,
as string
category
: the currently displayed category
as string
(Default: first category)issue
: the issue number in the form
"08/2007" as string
(Default: current
issue)issue_number
and issue_year
: same
as issue
, but split by component,
as integer
recid
: the displayed article ID
as integer
(Default: -1
)verbose
: verbosity,
as integer
(Default: 0
)ln
: the language that should be used to display the
page, as string
(Default: preferred language
or CFG_SITE_LANG
)archive_year
: the year selected on the
archive/search page, if any,
as integer
(Default: None
)archive_search
: the pattern used on the
archive/search page, as string
(Default:
empty string
)from invenio.webjournal.webjournal_utils import parse_url_string def format_element(bfo): args = parse_url_string(bfo.user_info['uri']) journal_name = args['journal_name'] category = args['category'] ln = args['ln'] ...
These values remain empty if they do not make sense in the context. For example, the recid value will be empty when displaying an index page: we are not displaying a specific article.
Note the difference between bfo.lang
and the "ln
" value returned
by parse_url_string(..)
: the former represents the
user-chosen language on your Invenio installation, while the
latter is the more appropriate language to display the journal, based
on the languages defined in your journal configuration
file. Propagate bfo.lang
through links, but display your
article/interface using the value returned
by parse_url_string(..)
.
The webjournal_utils.py
file contains several
functions that should help you work with the WebJournal module. Please
refer to this file for the list of available functions.
The HTML "alert" (or newsletter) is sent based on the homepage ("Index" format template) of the journal of a specific issue. In order to maximize the chances for the newsletter to display correctly in the recipients mail clients, the linked CSS files are embedded into the source of the email. Because of the very varying level of support for HTML in mail clients (including web-based ones) you should check that the markup of your pages will be adequate for your targeted readers, and simply the markup if necessary.
You can include some specific markup in your "index" format
template to define areas that should not be sent as part of the
newsletter. Use <!--START_NOT_FOR_ALERT-->
to mark
the beginning of an area that should not be included in the
newsletter, and <!--END_NOT_FOR_ALERT-->
to mark the
end of such area.
Journal articles are nothing more than regular records having some specific MARC fields. Hence they should be entered into the system like any other record: provide a submission to your journal editors, or input MARCXML using BibUpload. Have a look at the metadata requirements of a WebJournal record.
Since articles are just regular records, you should ensure that your readers do not have access to these records before the issue they belong to is released. Indeed, even though the articles can be hidden from the journal interface (depending on the value of the configuration variable hide_unreleased_issues), they are still accessible from the standard Invenio interface (the CDS Invenio search/browse interface is independent from the WebJournal Module, as the WebJournal interface is independent from the CDS Invenio search/browse interface)
In order to deal with unreleased articles, you can prepare a submission that can change some field of a record to flag it as "draft" or "offline" when necessary. These draft records should go to a restricted "Drafts" collection that only editors can see. Just before the issue is ready to be released, the editor can remove the "Draft" flag from each article.
A suggested setting is to map each category of your journal to both
a public and a restricted WebSearch collections. For example, your
"sport" category may have a public "Sport" collection, and a
restricted "Restricted Sport" collection. Your submission would for
example flag/unflag the "Draft" by changing the collection
field 980__a
based on the parameter of the
submission: 980__a:myJournalSportDraft
<->
980__a:myJournalSport
.
Draft
One of the drawbacks of this solution is that each article has to be
manually "approved" just before releasing the issue. A
workaround is to set your journal configuration
variable remove_keyword to value "DRAFT
":
that tells WebJournal to remove all occurrences of this keyword from
the articles when a new issue is released. You then no longer have to
take care of manually remove the "draft" flag from all these
articles.
Note that this technique applies only to all
articles of the released issue, but that the following tags
are not affected by this
removal: 100
, 245
, 246
,
520
, 590
and 700
. You should
therefore carefully choose your keyword so that it does not interfere
with other values of your record.
By tweaking the URL, you can access the desired journal issue. Even if the unreleased issue is hidden to users, editors should be allowed to access it (See Issue Control System section).
Since submission is performed using WebSubmit, you can apply the standard procedures to restrict submissions of records.
You can restrict access to the issue control system by using the
"cfgwebjournal
" WebAccess action. This action takes the
journal name as parameter in order to restrict access to selected
journal(s) only. A second parameter "with_editor_rights
"
must be set to "yes" in order for the authorized roles to edit apply
changes using the interface (including sending alerts, releasing
issues, etc.)
Note that this action also lets your editors change your journal
configuration file (unless the file is protected on disk, which is
recommended).
WebJournal makes heavy use of caches in order to optimize the serving
speed. Journal editors can regenerate the journal cache, but it does
not apply to old issues, or cache that has been generated by some
widgets. To clean the cache, remove the files
in /opt/invenio/var/cache/webjournal/
yourjournalissue_year
, followed by
the category
so that it is easy to remove the caches for
a specific issue/section. Examples:
$ rm /opt/invenio/var/cache/webjournal/AtlantisTimes/07_2009_* $ rm /opt/invenio/var/cache/webjournal/AtlantisTimes/07_2009_index_News*
You might want to remove some other specific files created by some widgets, for example:
$ rm /opt/invenio/var/cache/webjournal/AtlantisTimes/weather.html
Issues are usually managed by the journal editors, using the web interface. You might have to help your editors if they released an issue by mistake, or created. Have a look at the WebJournal Table Structure hacking guide to find out how you can easily update entries in the WebJournal tables.