Home « Server software «
Documentation: articles/view.php
articles/view.php - View one article
The main panel has following elements:- The article itself, with details, introduction, and main text. This may be overloaded if required.
- The list of related files
- The list of comments, if the focus is on comments or if comments are threaded
- The list of related links
Details about this page are displayed if:
- surfer is a site associate or a section editor
- surfer is a member and ( ( global parameter content_without_details != Y ) or ( section option with_details == Y ) )
There are several options to display author's information, depending of option set in section. Poster's avatar is displayed if the layout is a forum and if we are not building the page for a mobile device.
If the main description field of the article has been split into pages with the keyword
[page]
,
a navigation menu is added at the bottom of the page to move around.A bar of links to previous, next and index pages is inserted at several places if the layout is a manual. The idea comes from the layout of the MySQL Reference Manual.
The files section is displayed only if some file has already been attached to this page. Else only a command to add a file is displayed in the main menu bar.
The list of comments is based on a specific layout, depending on options set for the anchoring section. For layouts 'daily', 'manual' and 'yabb', a first page of comments is put below the article, and remaining comments are available on secondary pages (see comments/list.php). For other layouts, the first comment is visible at secondary page, and a simple link to it is put here.
The links section is displayed only if some link has already been attached to this page. Else only a command to add a link is displayed in the main menu bar.
At the bottom of the page a set of tools are displayed to export article content:
- mail this page to someone else (if mail services have been activated at this server)
- download as PDF
- copy to Palm
- copy in MS-Word
The extra panel has following elements:
- Navigation links to previous and next pages in the same section, if any
- Contextual links to switch to sections in the neighbour
- Tools including icons and links to comment the page, send an image, etc.
- The list of related categories, into a sidebar box
- The nearest locations, if any, into a sidebar box
- Means to reference this page, into a sidebar box
- The top popular referrals, if any
Several HTTP headers, or <meta> attributes of the displayed page, are set dynamically here to help advanced web usage. This includes:
- a link to the section page (e.g., '<link rel="contents" href="http://127.0.0.1/yacs/sections/view.php/4038" title="Ma catégorie" type="text/html" />')
- a link to a RDF description of this page (e.g., '<link rel="meta" href="http://127.0.0.1/yacs/articles/describe.php/4310" title="rdf" type="application/rdf+xml" />')
- a rdf section implementing the trackback interface
- a pingback link (e.g., '<link rel="pingback" href="http://here/yacs/services/pingback.php" />')
- a link to the Comment API for this page
- a link to the next page, if neighbours have been defined, enabling pref-fetching
The displayed article is saved into the history of visited pages if the global parameter
pages_without_history
has not been set to 'Y'.The permission assessment is based upon following rules applied in the provided orders:
- associates and editors are allowed to move forward
- creator is allowed to view the page
- permission is denied if the anchor is not viewable
- access is restricted ('active' field == 'R'), but the surfer is an authenticated member
- public access is allowed ('active' field == 'Y')
- permission denied is the default
If a secret handle has been provided, and if the surfer has not been authenticated, he is automatically identified as the article creator. This is necessary to authorize the handling of items attached to the anchor, such as comments, file, links or actions.
If the page has been created by a registered user, the anonymous surfer is authenticated as the page author. Else surfer data, such as name and address, is recovered from the article.
Accept following invocations:
- view.php/12 (view the first page of the article document)
- view.php?id=12 (view the first page of the article document)
- view.php?id=12&variant=mobile (mobile edition)
- view.php/12/pages/1 (view the page 1 of the main content)
- view.php?id=12&pages=1 (view the page 1 of the main content)
- view.php/12/categories/1 (view the page 1 of the list of related categories)
- view.php?id=12&categories=1 (view the page 1 of the list of related categories)
- view.php/12/comments/1 (view the page 1 of the list of related comments)
- view.php?id=12&comments=1 (view the page 1 of the list of related comments)
- view.php/12/files/2 (view the page 2 of the list of related files)
- view.php?id=12&files=2 (view the page 2 of the list of related files)
- view.php/12/links/1 (view the page 1 of the list of related links)
- view.php?id=12&links=1 (view the page 1 of the list of related links)
If this article, or one of its anchor, specifies a specific skin (option keyword '
skin_xyz
'),
or a specific variant (option keyword 'variant_xyz
'), they are used instead default values.This script is a reference file of this system.
Voir aussi:
- skins/configure.php
- MySQL Reference Manual
- Link Prefetching FAQ
- skins/configure.php
- TrackBack Technical Specification
- Pingback specification
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com
Testeurs:
- Ghjmora
- Eoin
- Mark
- Moi-meme
- Macnana
- Guillaume
Reste à faire:
- add a switcher to other pages of the section (moi-meme)
- link overlaid pages to a micro-summary page, as per Firefox 2
- derive this to discuss.php, to support interactive threads (campfire)