Sourcefabric Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

Template library

Publications

Newscoop content is organized in a hierarchical structure which conforms to the tradition of newspapers and magazines: publications, issues, sections and articles. Each publication is made up of issues, each issue is in turn made up of sections, which are comprised of articles.

In this chapter we'll look at how publication settings can be set in the admin interface and then accessed by

$gimme->publication

and its variants.

You can set a range of configuration parameters when creating or editing a publication in the Newscoop administration interface. This chapter will explain only those parameters related to the $gimme->publication object through the template language.

Each publication has an attributes menu (accessible in the administration interface under Content->Publication and then by clicking on the wrench-and-screwdriver icon for Configure).

There are three sections in the publication attributes menu for each publication:

  • General attributes and Comments on the left side of the menu
  • Subscription defaults on the right side of the menu

General Attributes

The fields in the general attributes section present in $gimme->publication are listed below:

Name of the publication (e.g. "The Journal")

{{ $gimme->publication->name }}

Default Site Alias is the name of the web server on which your publication will be hosted (e.g. www.example.com). Newscoop enables multiple publications to be hosted on the same web server, provided that a unique alias has been set up for each publication by your system administrator. If you try to access the alias URL before this setting is made, you will see an error message indicating that the alias was not yet assigned to a publication.

{{ $gimme->publication->site }}

Default language

$gimme->publication->default_language returns information related to the publication's default language. Here are a few examples:

{{ $gimme->publication->default_language->name }} is the language name
{{ $gimme->publication->default_language->number }} is language identifier in the Newscoop database (integer value)
{{ $gimme->publication->default_language->english_name }} is the language name in English
{{ $gimme->publication->default_language->code }} is the language's international code
{{ $gimme->publication->default_language->defined }} is a boolean value (true/false) - true if the language was set in the current environment; false otherwise

A full reference to all properties of the template objects is given at the end of this book. The examples covered here might not cover all possibilities.

Comments

The fields in the Comments section are accessible through $gimme->publication as follows:

Public allowed to comment? Check this box if non-subscribers will be allowed to make comments on articles

{{ if $gimme->publication->public_comments }}YES{{ /if }}

Public comments moderated? If you check this box, non-subscriber comments will be hidden from readers until they have been reviewed by a staff member

{{ if $gimme->publication->moderated_comments }}MODERATED{{ /if }}

Use CAPTCHA to prevent spam? The reader must type in random letters or numbers shown before they can post a comment

{{ if $gimme->publication->captcha_enabled }}CAPTCHA{{ /if }}

You can see some of these examples in action in the advanced section of this Cookbook.

Subscription Defaults

The rest of the fields are related to subscriptions, which you can adjust later if you wish. First, you have to select a time unit for your subscriptions; which could be days, months, weeks or years.

Configure Subscription default view in the administration interface 

You can set two types of subscriptions: paid and trial. Paid subscriptions have the following properties:

  • Currency: the subscription currency. Even if a subscription request is sent and the currency setting is changed before payment, the information about the subscriber's payment due is correctly recorded
  • Time unit cost per one section:
    • for one language: the price for access to a particular section in a single language
    • for all languages: the price for access to a section in all available languages
  • Default time period: the usual duration of the paid subscription. This value is used when a reader subscribes through the website. The period for a particular subscription can be modified from the administration interface

Here is some sample code for subscriptions:

<h3>Subscriptions</h3>
<ul>
    <li>Trial subscription: {{ $gimme->publication->subscription_trial_time }} {{ $gimme->publication->subscription_time_unit }}</li>
    <li>Paid subscription: {{ $gimme->publication->subscription_paid_time }} {{ $gimme->publication->subscription_time_unit }}</li>
</ul>
<h4>Subscription costs:</h4>
<ul>
    <li>{{ $gimme->publication->subscription_currency }} {{ $gimme->publication->subscription_unit_cost }} (access one language)</li>
    <li>{{ $gimme->publication->subscription_currency }} {{ $gimme->publication->subscription_unit_cost_all_lang }} (access all languages)</li>
</ul>

Controlling access based on subscriptions is described in the chapter "Subscription".

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.