DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: MOC Articles

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Jan-Erik Revsbech
Changed:2004-05-12T11:12:10
Author:Jan-Erik Revsbech
Email:jer@moccompany.com
Info 3:
Info 4:

EXT: MOC Articles

Extension Key: moc_artices

Copyright 2000-2002, Jan-Erik Revsbech, <jer@moccompany.com>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: MOC Articles 1

Introduction 1

What does it do? 1

Screenshots 2

Users manual 4

Creation of Targetgroups 4

Creation of Categories 5

Creation of articles 5

Adminstration 7

Configuration 7

Simple configuration 8

Advanced configuration 8

Advanced configuration with a menu 10

Constants 10

Specifying storage folder 11

TS Reference 11

Stylesheets 12

Tutorial 12

Known problems 12

To-Do list 12

Changelog 12

Introduction

What does it do?

This extension requires Typo 3.6 or above and also Templa Voila!

  • NEW: The extension is indexed! By default the display of articels is indexed (cached), whereas list of articles, types, targetgroups and categories are not. The extension can be configured to allow these list to be cached as well.
  • The extension is very comprehensive article administraion extension. It handles articles of different types: Articles, Documents (attached files etc.), Manual and Links. Displaying an article depends on its type. Every articles will have two dimesnsion that they can be sorted on: Targetgroup and Category (Subjects). Targetgroups and categories can be inserted at will in appropriate tables. Each article can have several targetgroups and several categories.
  • Each articles has the posibility to have files attached and a collection of external links. Besides, individual articles can be related to one another.
  • Support for three levels of access: Public, Semi public and private. Public articles are visible for all users, Semi public is visible for all users that are logged in via the frontend, and the private articles are only visible by fe users member of a configurable list of fe groups. We use the the private articles as a sort of internal knowledgebase, directly available on our intranet, and integrated into out publically available knowledgebase.
  • The application is built with fe editing in mind, but this is built on a modified version of the julle_feedit extension and the FCK HTML Editor, and is hence turned of by default. Turn in on (via a constant) at own risk! When my changes are integrated into the julle_feedit extension, the FE editing feature will be documented and turned on by default.
  • Each article has a flag telling it whehter this article should count as a news items. The extension contains a small plugin that can list the latest articles with the newsflag set. (possibly only for a special targetgroup or category). The extension will work togeter with another extension moc_newsmail, for sending out newsmail with the latest articles. This extenion is not developed yet, but is high on the wish list for some of out customers (meaning it has high priority for us:)

Screenshots

img-1

In the screenshot above, ther plugin is inserted in two version. The one marked 1 is the main plugin, the article browser, it allows you to browse and search for articles. In this case, the plugin show the different categories and how many articles are in each category.

The instance of the plugin marked 2, is the Newest articles plugin, here configured to show only one article. This plugin can be configured to show a given number of articles sorted by the newest first (the default is the latest 5), and can possibly be limited to show only newest articles in a given category, for a given targetgroup, or even only to show articles of a certain type. All articles can be marked (and is by default) as newsitem and will then be listed by this plugin. However one can also configure the plugin to disregard this flag, and treat all articles as newsitem.

The article browser

Here is a shot of the article browser configured to show articles grouped by category. In this example there is four categories which has articles.

img-2

Clicking on one will list al the articles in the category.

img-3

The plan is to make these lists with TemplaVoila, but currently, is is done statically, and can only be configured by stylesheets. Cliking on an articles will display it like this:

img-4

I'm sorry the template design is in danish (and so is the article), but it basically show an articles, with a singe attachment (a pdf file). The articles has a relation to another article called K01 standardkontrakted er godkendt of offentliggjort . And has a single link to MOC Company.

There is much more to the plugin, as this is just one set configuration parameteres (and by the way the default set). The plugin can limit seaches to a given targetgroup, thus allowing on site to have many sub-knowledgebases based on which part of the site it is located, but still retain a global knowledgebase that can be searched.

The plugin has another mode of operation, namely the menu mode. This is created in order to have the article browser integrated into a navigation menu. The screenshot below show how this can be configured (although it requires a bit more configuration).

img-5

Notice that the menu now has an entrypoint called Knowledgebase and the sublevels is the targetgroups, which again has the categories as subgroups. This can enhance the navigation and provide some overview.

The newest articles plugin

The extension is bunled with another plugin, namely the newest articles extension. This small extension allow one to list a certain number (configurable of course) of the newest articles.

img-6

The above list the 5 newest articles. The display is configured by Templa Voila. The plugin can be limited to only list articles from a given category or from a given targetgroup.

- This section will have a link in the EM, so therefore it's very important that it conveys this message.

- Target group: Mostly Developers and administrators, but should be a non-technical and visual presentation.

- This section is required and in some cases it basically tells it all.

Users manual

The extension is faily simple to use once configured (see administration section). Ones needs to define categories and target groups. Usually only a small number of target groups will be created, and a larger amount of categories. However, the two dimension are in principle independent of one another (as a mathematician, I am tempted to call them perpendicular to one another...). Then several categories has to be created, and finally we have to create som aritcles.

Targetgroups, categories links and articles, has to be created the same systemfolder, and the location of this depends on the configuration (see Administration section). It can either be in its special folder, the Storage page, of the page in which the plugin is inserted. The last is not recommended. If nothing is specified, the default Storage page is used, and if this is not defined, the current page (where the plugin is installed) is used. A special page can be specified by setting the startingpoint on the inserted plugin (of setting the storagePID TS parameter).

Refer to your local administrator in order to find out where the extension searches for records.

The examples in this manual is taken as a Law company, and the categories and targegroups will reflect this. The website will have three different parts (subsites) in their website, and each part will define a targetgroup. Each part will have its own knowledgebase, represented by a single instance of the the plugin Article Browser. There will also be a single page with a fourth instance of the plugin Article browser, representing a full knowledgebase, browsing in all articles, indeferent of targetgroups (but still dependent on access). The law firm is 100%fictive.

This is the way the extension is intended to be used, but It could be much simpler, with only a single targetgroup, this effectively eliminating one dimension. This configuration is described in the Administration section, and is not really important for createion of articles.

Targetgroups and categories is not often created of modified, and is this only take briefly. The important section deals with creation of articles, as this is the type of records that is usually inserted.

All articles, categories, targetgroups and links must reside in the same folder! (Thanks to rene for stressing this).

Creation of Targetgroups

The first step will be to insert target groups. In this example, I will create three different target groups called Enterprise , Small buisness and Family law representing three different areas of services the law firm deliveres (all titles is fictious). The records are in this example inserted into the Default storage page of the site, as this is the usual case.

img-7

Creation of Categories

Creation of categories is straight forward, just click create new record in the list module in the correct sysfolder and chose category. Then enter a title for the category. In this example we chose to create the category Precence, which should hold all articles that tells about cases that makes precence. As there is also defined targegroups and hence an article can be about a conviction making precendence in family law.

img-8 For this example, we have also creates some categories, that are only relvant for a certain targetgroups, for instance Divorces, which only really makes sence for the targetgroups family law, and ontoher called company fusion, which only has relevance for the targetgroups Enterprise and Small buisness. This does not matter as the plugin is made such that for a given target group, only categories which contain aritcles will appear in the list. Thus if there is no articles with targetgroup Familly law and category Company fusion (Which would be a very weird article:), then the category Company Fusion will not be listed in the plugin inserted in the Family law part of the site, but would be listed in the general knowledge base and the two other parts of the site.

Creation of articles

Creation of articles is also very simple, but there is quite a lot of fields associated with an article record. The first thing to choose is the access type of the article.

Type, Access, category, targetgroup and newsitem.

The first thing to choose is which type the article should be. The options are Article, Manual, Document and Link. Most people will only use the Article and many the link type. The rendering of the articles depends on its type.

As stated ealier there is currently three levels of access, private, semi-private and public. Notice that the article is marked Private by default!! Public articles are displayed for all users on the site (also the ones not logged in). Semi-public is displayed for all logged in users, indifferently of which usergroups the user is in. The last access type, private, is only displayed if the user is logged in and is member of a groups that is defined for the extension (Refer to your administrator to hear how the extension is defined).

Each articles should have at least one, but potentially many categories and targetgroups associated with it. If an articles has relevance for two different targetgroups, or falls into more than one category, just choose the ones that are appropriate. There is no limitations to how many targetgroups or categories an article can be member of.

The article is by default marked as a Newsitem. The is a small plugin bunled with the extesion which show the newest articles, and can be told to only select the ones with the news flag set. This way on can mark whether or not this item is to appear in a newssection on the site. When used in conjugation with the moc_newsletter extension (Which is not created yet), this flag will tell the moc_newsletter that this articles should be send out with the newsletter (or just an abstract, depending on the setup of the moc_newsletter extension).

img-9

An article also needs a header, an author and some text. The bodytext is inserted via the Rich Text Editor so that articles can contain images, links and tables.

Notice that only images and links are put through HTML transformations, so please make sure code pasted from Word and others is cleaned vi the “Remoce all HTML formating in the Character style on the RTE.

img-10

Notice that some of the text in the RTE is formated differently, this is the paragraph called intro or Abstract. This allows the author of the article to insert a section that will serve as an abstract for the article. This paragrapgh can then be styled via the Stylesheet for the page.

Last, there is some extra options such as attached files, external links and related articles. These options will only show for some types of articles. In the screenshow below, we have chosen to inlude a PDF file explain Company law for dummies (wonder if such a book really exists...), inluded a link to the site www.company.law (Which curtanly doesnt exist :) with the title Link to site explaining company law. Last we have chosen that an other article called Adtomic VS MOC Company has relevance to this article.

img-11

The last option means that when displaying the article Planning a fusion of two companies, a link to the article Adtomic VS MOC Company will be shown. It doen not mean that the reverse is true. No link from the last article to the first will be shown!

This concluded the creation of an article, and the result will look lige the one below. This of course depends very strongly on the setup of the site.

[SCREENSHOT OF THE FINAL ARTICLE]

Adminstration

There is not really any administration of the extension. There is a small snippet of Page TSconfig installed by the extension:

t3lib_extMgm::addPageTSConfig('
# General configuration of the available classes:
RTE.classes {
  articleTeaser {
    name = Intro (for artikler)
    value= font-style: italic; font-weight: bold;
  }
}
RTE.config.tx_mocarticles_articles.bodytext {
   classesParagraph = articleTeaser
   hidePStyleItems = H1,H4,H5,H6
}

This configuration is to custimizing the RTE editor to allow to the new paragraph class articleTease named Intro (for artikler) (Sorry it's in danish, I dont know how to make this language dependent. Please enlight me if you know how).

Feel free to add more classes via the Page TS.

Configuration

The installation is done as usual via the extension manager. Please install as a local extension, as I might have forgotten to clear som hardcoded path to typo3conf.

When installing you should specify which usergroups is considered trusted. Measning that fe users member of one of these groups, will have access to articles marked as private. If you do not intent to use private articles, just leave the parameter untouched.

img-12

There is many configuration options available for this plugin, and some of them are fetched from the constants section. The individual instance of the plugin (ie. The tt_content record) might have special option configurable via a flexform. For instance, one migt say that a particular instance of a plugin should only list and search for articles with a given target groups. This way a local knowledgebase can be inserted.

img-13

In the example above, we inserted a plugin of type Article browser, and vi the flexform, choose to limit articles to these targets. If you do not want to limit the articles, just leave the selectorbox blank. Notice that if the TS parameter staticTarget is set, this will overrule the above!

The next sections take you through 3 different examples, a Very simple configuration, a medium sized configuration where there is three local knowlegdebases, and one global. It also inlcude a new section. The last configuration will also add a menu to the navigation menu of the site.

Simple configuration

If you only need a very simple article base that nas only one targetgroup, configuration is particular simple:

Insert a single targetgroup and dont mind its name.

Then insert the categories that you would like your articles to be seperated into. Create as many as you like.

Start creating articles, and make sure that the articles are maked as Public, and that they har the targetgroup that you created.

Insert a plugin of type articlebrowser and make sure that you set the Limit articels to these targets to the targetgroup you created.

Thats it, no more to it.

Advanced configuration

In this example we pretend to have a site with three different main areas of content, each one presented by a targetgroup. The targetgroups are IT,Public and Iværksætter, so three targetgroups with these names is created. We decide to store the articles in aseperate folder, that is not in the storage folder of the site.

img-14

img-15 Next we create som categories, as many as you like.

The layout of the site is this, the name are in danish, but the ones that we are interested in is the pages called Vidensbase which is knowledgebase in danish.

The folder for storing the articles is called Artikler og Nyheder.

You'll notice that there is four pages called Vidensbase, one for each of the main areas IT , Public and Iværksætter and one global (never mind that there is a duplicate one that is hidden).

img-16 If we take a look at the global page called Vidensbase, we see this:

img-17

Here we see that the startingpoint is set to the page Artiker og Nyheder as we wanted. The drow down menut called Limit articles to these targets is not set, as this is the global knowlegdebase, and we want to list all articles.

If we take a look at the page called Vidensbase in the IT section of the site:

img-18

Here we see that the drop down is set to the targetgroup IT. Which means that this will only show articels in that targetgroup. The same can be done for the two remaing Public and Iværksætter.

Now we also want to configure the Newssection. The first thing that needs to be done is to create a Templa Voila templateobject that has the static template datastructure from this plugin. Please see the TemplaVoila manual for how this is done.

When inserting a plugin of typo Newest articles you can againg specify which targetgruops you want to limit to. But wee need to tell the plugin where the articles can be show as the plugin can not show articles by itself. This is done in the constants section, with the parameer showPID.

Advanced configuration with a menu

This is not documente yet, but here is the configuration that I use:

temp.articlemenu < plugin.tx_mocarticles_pi1
temp.articlemenu {
 TOPLEVEL {
   name=Knowledgebase
   elementWrap = <div class="level-0-notactive">|</div>
   elementActiveWrap =  <div class="level-0-active">|</div>
   elementCurrentWrap =  <div><img src="fileadmin/templates/images/greybox.gif" /><span class="level-0-current">|</span></div>
   ActiveATagParams = class="activelink"
   CurrentATagParams = class="activelink"
 }
 SUBLEVEL {
   elementWrap = <div class="level-1-notactive"> | </div>
   elementActiveWrap =  <div class="level-1-active"> | </div>
   elementCurrentWrap =  <div><img src="fileadmin/templates/images/greybox.gif" /><span class="level-1-current">|</span></div>
   //ATagParams = class="navilink"
   ActiveATagParams = class="activelink"
   CurrentATagParams = class="activelink"
 }
 SUBSUBLEVEL {
   elementWrap = <div class="level-2-notactive"> | </div>
   elementActiveWrap =  <div class="level-2-active"> | </div>
   elementCurrentWrap =  <div><img src="fileadmin/templates/images/greybox.gif" /><span class="level-2-current">|</span></div>
   //ATagParams = class="navilink"
   ActiveATagParams = class="activelink"
   CurrentATagParams = class="activelink"
 }
 CODE >
 CODE=menu
 showPid = 3
 storagePID >
 storagePID = 13
}


lib.navbar =COA
lib.navbar {
 10 =< lib.menu
 20 < temp.articlemenu
}

This will produce an output tha looks like this

img-19

Feel free to play around with it, an maybe finish up this section of the manul...

Constants

The constants section has these configration properties.

ShowLimit

Property

ShowLimit

Description

When using the newest articles, limit the list to this manu articles.

Default

5

News only

Property

News only

Description

For the newest articles plugin. Display only articles that have the News flag set.

Default

True

Show PID

Property

Show PID

Description

If a Newest article plugin is inserted, specify where the page where the Article browser plugin is inserted in order to display the article.

Default

ShowSearchForm

Property

ShowSearchForm

Description

If set a simple searchform is displayed under all lists (List of categories or list of articles)

Default

1

External target

Property

External target

Description

This is used for specifying the target for external links. Parsed to the typolink function when creating links.

Default

_top

Template File

Property

Template File

Description

The template file used when showing a single article. This will be ported to Templa Voila as soon as I have the time.

Default

Index

Property

Index

Description

If this is set, then the displayin of articles are cached, and hence indexed. This is needed if the indexed search plugin is to be used in conjunction with this extension.

Default

1

IndexLists

Property

IndexLists

Description

If this is set, then also the lists of articles, categories, types, target groups etc. is also cached and hence indexed. This is turned off by default, other wise adding a new article wont show until the cache is cleared (should happen every night).

Default

0

Specifying storage folder

The extension will first check if the typoscript parameter storagePID is set. This is by default set to .field = pages, thus taking the value from the pages of the content record

img-20 If this is not set, the plugin will check to see if a General Storage Folder is defined in a page in the Root path

img-21 If this is not found, the current PID of the page (where the plugin is inserted) is used.

All articles, categories, targetgroups and links must reside in the same folder! (Thanks to rene for stressing this).

TS Reference

Reference for plugin 1:

staticTarget

Property

staticTarget

Data type

Int

Description

If set, this parameter will limit seaches and display to articles with this targetgroup. Should be the UID of the targetgroup record one wishes to limit to.

This will overrule the option set on the indicdual tt_content elements of the plugin!

Default

Not set.

staticCategory

Property

staticCategory

Data type

Int

Description

Same as above, only for categories.

Default

Not set

CODE

Property

CODE

Data type

string

Description

Determines what type the plugin should be inserted as. There is two options: browser which is the default if nothing is specified. This will render a plugin for viewing articles and browsing the through them. There is antoher option, menu for creating a hierachial menu with all target groups as level 1 and all categories as level 2. This is not very well documented, as there some feautes that would be noce to have, so use at own risk. If not specified, the plugin will set to browser.

Default

.field = select_key

TOPLEVEL

Property

TOPLEVEL

Data type

Description

Configures the toplevel states if the plugin is configured for menu operatinon. It has different configuration options:

  • .elementWrap: Wrap this elements if it not in the rootline
  • .elementActiveWrap: Wrap if this element is in the rootline, but is not the current.
  • .elementCurrentWrap: Wrap if this element is the current.
  • ATagParams: Aditional parameter for the a tag: Example: class='activelink'
  • activeATagParams: Parameter if the link is in the root line but not the currently
  • currentATagParams: Parameter for the A tag if this is the current.
  • name: The top level name for instance Knowledgebase.

Please see the example above for information how this can be configured.

Default

SUBLEVEL

Property

SUBLEVEL

Data type

Description

Same a TOPLEVEL, but the wraps for the next level (the list of targetgroups)

Default

SUBSUBLEVEL

Property

SUBSUBLEVEL

Data type

Description

Same as TOPLEVEL and SUBLEVEL, but for the list of categories.

Default

showPID

Property

showPID

Data type

Int

Description

If the plugin is in menu mode, this configures on which page the article is shown. This page must have a Artilce browser plugin configured for browser operation.

Default

Current page.

storagePID

Property

storagePID

Data type

int

Description

The ID of the page where articles, categories and targets are stored. If not set, it will use the general storage page of the site, and if that does not exist, the current page is used.

Default

.field = pages

defaultTask

Property

defaultTask

Data type

Sting

Description

This spefies how the plugin should be behave, if no task is specified. Options are:

  • showIntro: Shows an explanation of how the plugin workds. Descript fetched from template record.
  • listarticles: List all articles
  • listcategories: List all categories and number of articles in each category.
  • listtargets: List all target goups and number of articles in each target group.
  • listtypes: List the four different types of articles and number of articles of each type.

Default

listarticles

ExtTarget

Property

ExtTarget

Data type

String

Description

The target used for external links.

Default

The constant of the same name.

_CSS_DEFAULT_ STYLE

Property

_CSS_DEFAULT_ STYLE

Data type

String

Description

The default styles used in the plugin. Shoul be reset and includen in own styleshreet instead.

Default

index

Property

index

Data type

Boolean (0 or 1)

Description

If this is set, then the displayin of articles are cached, and hence indexed. This is needed if the indexed search plugin is to be used in conjunction with this extension.

Default

1 (Set via contstans)

IndexLists

Property

IndexLists

Data type

Boolean (0 or 1)

Description

If this is set, then also the lists of articles, categories, types, target groups etc. is also cached and hence indexed. This is turned off by default, other wise adding a new article wont show until the cache is cleared (should happen every night).

Default

0 (Set via contstans)

Stylesheets

An explanaiont will come.

Tutorial

To come, meanwhile se the configuration section.

Known problems

TO COME, probably...

To-Do list

  • Finish the manual, rewrite the confusing sections..
  • Integrate everything in Templa Voila, just because I think its so great!
  • Front end editing manual.

Changelog

  • 0.1.0: Uploaded to TER.
  • 0.2.0: Manual extended, bugfixing, TV integration.
  • 0.3.0: Merged different translations from TER, and included caching!

img-22 EXT: MOC Articles - 12