en | fr  | Contact  | Print  | Share

FrameBeurk documentation

7. Actual modules

Here is an overview of what bring the modules that are present in the .zip file of FrameBeurk. (For precise and detailled informations, nothing is better than looking at the source code)

7.1.  Beurk

Module Beurk does not define any entity, but comes along :

  • The 3 main controllers : Maj, Vue and DivPatron
  • The interpreter : For URI rewriting
  • Server functions : Management of keys, URI, tokens, forms, error messages, entry point for management of authorisations
  • Client functions : Management of the display of divs, Ajax browsing, tag enhancements
  • A few tables : Storage of key tokens, declaration of actions and entity types.

7.2. Kom1

Module Kom1 gathers features shared with other modules :

  • Entities Site (with the Vues recherche, modere et reaffiche) and Style (with the Maj change).
  • Some tools to help the integration of other modules into the website : Menu Controller, widgets Recherche and Infos.
    • The Menu controller gathers the menus of all modules (declarations in $CONFIG['Controles']['Menu'])
    • Widget Recherche is the unique entry point to do researches on all the entities of the website. Each "researchable" entity declares the elements needed for its display in the widget, for the unique sql request and for the restitution of the entity data.

    • $CONFIG['Controles']['Recherche']['Sujet'] = array( 'libelle' => 'Sujets', 'niveau' => 3, 'aInclure' => true, 'autorisation' => 'Permission', 'requete' => 'Rhum_queryRechercheSujet', 'affichage' => 'Rhum_carteSujetTrouve');

      As of today, the research function uses the FULLTEXT indices of MySQL, despite their limitations (words of less than 4 letters ignored; if less than 3 lines in the searched table, research is unsucessfull...).

    • Widget Infos displays the Maj or Vue error messages, the proceeding time of the transaction on the server (+ other durations in a mouse-over bubble), a selection list of style sheets...
  • Helpers for displaying entities, forms, BBCodes management
  • Client functions for the insertion of BBCodes, the display of a calendar to pick-up a date...

7.3. Uzers

This crucial module brings the management of user, group and permission entities, and a login widget for the logging of the user.

7.3.1. Users

Users are created either by an administrator or by the users themselves in the way of a forum. A new registered person receives at his/her personal address an e-mail containing a link to activate his/her account.

At the installation of the module, 2 users are created :

  • admin (default password = admin)
  • anonymous : will stand for users that are not logged in.

7.3.2. Groups

Groups are used in 1st place to associate a permission to several users at the same time. A user can be linked to one or more groups. At the installation of the module, 2 groups are created :

  • ADMIN, to which are attached user Admin and all users having the same rights than Admin.
  • ALL, group of all users, ever. (Even if it does not appears in the list of groups of a user)

7.3.3. Permissions

Permissions are used to authorise or forbid the execution of Maj or Vue actions, for a type of entities, in a given perimeter. Example : Forbid « cree Sujet » in « Section 7 ».

A permission can be associated to several groups. These are the Maj and Vue controllers that check the permissions of requested actions before letting them proceed, IF these actions have been configured to use permissions. This feature brings contrains on the data base requests that should be properly prepared :

  • The request have to be written in the array form (see above the DB communication layer).
  • The SELECT clause should contain the Id fields on which the permission applies. In the previous example : IdSection
  • Before being sent to the DB, the request has to be completed by function Uzers_ajoutePermissionQUERY that adds in the WHERE clause the conditions linked to the permissions of the groups of the user (or group ALL if the user is not logged in).

This permission management feature has been developped with performance in mind, uses the minimum of SQL requests and stores the results in PHP session, until logoff (or login) of the user.

As of today, the interface for entering permissions does not check that the combinations of actions, entities and Ids make sense.

7.4. Rhum

Module Rhum implements a simple forum with the following entities :

  • Comments (commentaire)
  • Subjects (sujet), in which users can add comments.
  • Sections, in which users can add subjects.
  • The Forum (singleton) composed by a list of section -only created by administrator.
  • The News (singleton) composed by a list of comments -only created by administrator.

All actions of Rhum use permissions. It is therefore possible to restrain access or updates to some groups.

7.5. Zeek

Zeek is an embryonic module destined to manage music. For now, it only contains a player widget, using Dewplayer if Flash is activated, or HTML5 tag Audio if not.
This player, placed at the top of the page or in the side menu, will not be stopped during Ajax browsing.

Module Zeek serves as an example at chapter « Implementing ».

7.6. Zenpa (template)

Zenpa is the only template (Patron) delivered with FrameBeurk. It brings :

  • Default layouts for :
    • The full HTML pages returned by index.php, with header and trailer separate files,
    • The Vues returned by ajax.php,
    • The syndication files returned by rss.php.
  • Javascript functions :
    • That are used for displaying the data received from an Ajax transaction.
    • That handle the limited and independant scrollings of the main vue of the page and of the side menu.
  • Some PHP functions for the management of CSS :
    • Code generation of buttons,
    • Base64 encoding (and colourisation) of images to be embedded in style sheets,
    • Management of proprietary prefixes (-webkit-, -o-,...).

© 2010-2015 by ToolOscope SASU. © 2016-2018 by Arnaud De Rette. All rights reserved