Skip to main content Help Control Panel

Aubagne HipHop

Tout le Hip Hop d'Aubagne et des alentours

Home «   Server software «  

Documentation: index.php

index.php - Welcome in the world of YACS

Well, this script is the front page of a YACS server.

If you are looking for general information about YACS, including design principles, please look at help.php.

Usually the front page is the most often visited page of a web site. Therefore we have crafted it as carefully as possible, to allow for maximum flexibility and efficiency.

First of all, YACS offers powerful features to assign content to various areas of the front page. These areas (e.g., cover page, gadget boxes, etc.) are introduced below.

Second, YACS offers a large number of customization options, and most parameters that impact the front page can be conveniently changed at the configuration panel for the rendering engine. Look at skins/configure.php for a full description of these parameters. This configuration panel is accessible from the Control Panel.

Also, several extension mechanisms have been added to this page, and we hope that gifted software programmers will take the most out of it. Look at control/scan.php for more information on YACS hooks and software extensions.

And of course, most tags generated by YACS, if not all, make intensive usage of CSS. Therefore the visual rendering can be changed directly by editing the style sheet used in the live skin for the site. Look at scripts/index.php for more information on skins and templates used by YACS.

General structure of a YACS page

Generally speaking the overall YACS rendering engine handles three different kinds of areas on the screen: Every YACS script is aiming to put some content in the main area. YACS scripts make intensive use of this to further improve site navigation. Most content of the navigation panel is generated and managed only in the template file of the current skin. However, some script, such as the one that generates the front page, may complement the navigation panel with additional information specific to only one page.

Please note that some skins do combine the extra and the navigation panels as a single visual column, where other skins will feature three column, or two columns plus a floating container, etc.

The main panel

Several elements compose the main part of this page. From first to last:

The cover article is, actually, the most recent article published in the section dedicated to covers. This section is visible to associates at the bottom of the Site Map. To create a new cover article, just add an article to this section. You can add images, use various YACS code or any HTML tag to achieve your goal. On completion, publish the article to make it visible at the front page. Rendering of the cover page may be total or partial based on parameter cover_at_home. Content of the cover article is formatted through a call to Skin::layout_cover_article(). Though this function has been implemented into skins/skin_skeleton.php, it can be overloaded into skin.php of any template if necessary.

The prefix hook is used to invoke any software extension bound as follows: Use this hook to include any text right after the cover article.

The Flash object is a convenient way to dynamically animate the front page, based on most recent articles published. This has to be explicitly activated in the parameter flash_at_home.

Gadget boxes are used either to display information that is not part of the regular stream of new content, or to specifically focus on special pages. Change parameter gadget_boxes_at_home to disable the display of gadget boxes. Up to 6 gadget boxes can be displayed at the front page. There are different ways to create gadget boxes: Each article will be put in a separate box. Each category will have its own box, and up to 5 pages and 5 links will be listed per box. You can select to have either one box per section, with up to 7 pages or links will be listed per box, or to have every article in its own separate box.

Activate the display of the Site Map (actually, a downsize version of it) to introduce top-level sections of your site. The layout used by YACS is specified in parameter sections_at_home. This can be:

The main hook is used to invoke any software extension bound as follows: Use this hook to include any text just before the list of recent publications.

By default, articles are formatted through a call to Skin::build_list(... 'decorated'). This function can be overloaded into skin.php of any skin. The configuration panel for skins (aka, skins/configure.php) may be used to adopt another layout depending of your needs. The parameter home_layout defines the layout to be used at the front page: This layout is suitable for weblogs. It is the default value. See skins/layout_home_articles_as_daily.php This layout is suitable for most sites. See skins/layout_home_articles_as_newspaper.php Previous articles may be accessed through sections, or through the index of articles. This layout is suitable for sites providing several different kinds of information. See skins/layout_home_articles_as_boxesandarrows.php Previous articles may be accessed through sections, or through the index of articles. This layout is suitable for sites providing several different kinds of information. See skins/layout_home_articles_as_slashdot.php This layout is suitable for sites with a lot of items (gadget boxes, etc.) at the front page. See articles/layout_articles.php Previous articles may be accessed through a menu. This layout is suitable for small sites with a low activity, maybe with a single section of pages. Use this option to fully customize the front page, for example through some hook.

The number of articles displayed depends on the selected layout. For example, the alistapart layout displays one single full-page, while slashdot summarizes several articles. To override this number set the parameter articles_count_at_home in the configuration panel for rendering engine.

The list of most recent public files can be added as well, by changing explicitly parameter home_with_recent_files.

The list of most recent public links can be added as well, by changing explicitly parameter home_with_recent_links.

Bottom and trailing icons are clickable images linked to related articles. For example, you would use this to show logos of your partners at the front page, and create one page to introduce each partner. To achieve this, add thumbnails to target pages, then configure the containing section to display them at the front page. Up to 12 images are displayed.

The suffix hook is used to invoke any software extension bound as follows: Use this hook to include any text at the bottom of the main area, after everything else.

The extra panel

Following components are displayed as boxes in the extra panel:

Featured pages are those articles that have been assigned to the category dedicated to that purpose. To feature one particular article, display it, then use side links to change assigned categories. Select the category named Featured in the drop list and click on the button.

The navigation panel

Following items are put in the navigation panel:

Also, a feeding link has been included, in order to let robots browse this resource when necessary. See feeds/rss_2.0.php for more information.

If geographical information has been set in skins/configure.php, it is included in meta data. See either GeoTags Search Engine and Free Geocoding Service for 22 Countries for more information.

Note that, contrary to other regular pages, this one does not trigger the 'tick' hook.

This script features several levels of cache. On ideal case, it can be rendered on one single SQL statement.

This script is a reference file of this system.

Voir aussi:

Licence: GNU Lesser General Public License

Auteurs:

Testeurs:

Reste à faire:

Tools
Browse the source of this script
Server software