yacs 7.3: dewplayer, page locks, ldap, hooks, backup, cron
Posted by Bernard on Apr. 1 2007, (popular)
549 files have been modified or added since the previous release.
The new release is available for
immediate download. If you are already running a YACS server we highly recommend you to
upgrade your server.
Here is a list of new or updated features coming with this release:

dewplayer - This little Flash player is all you need to play live music or podcast. All you have to do is to attach .mp3 files to pages, and to let YACS do the job. Insertion of the dewplayer is automatic in layout, as shown in
files/layout_files.php. You can also use the new code
[sound=id] to insert the dewplayer at almost any place. See
codes/codes.php for more details.

versions for sections - When section content is changed, previous state is saved for restoration, exactly like what already done for articles.

thread comments - For many layouts (namely: compact, daily, decorated, jive, manual, and yabb), threading of comments start on the main page. For other layouts, comments are moved away to a separate page. This is now properly reflected at the end of the edit form of comments (
comments/edit.php), which was not the case in previous versions.

updated layout for jive comments - Basically, the one for yabb threads has been re-used. See
comments/layout_comments_as_jive.php
lock, except for for comments - Previously, locking a section would prevent members to post articles and to comment to existing articles. With the 7.3 release a new policy has been implemented, by which locking only prevent the addition of new items. When a section is locked, a regular member cannot post a new article in it, but he can comment pages posted by others. To prevent commenting articles, you can either use the option
no_comments at the section level, or lock articles individually.

easy lock of sections and articles - In previous versions you had to edit sections or articles to lock/unlock them. Starting with release 7.3 this can be achieved with a single click while browsing the target page. New scripts
sections/lock.php and
articles/lock.php[.script] have been added for this purpose.
folder layout - When sections are folded, the number of sub-section and of pages is added to the clickable title. This provides an easy way to locate populated sections. See [script]sections/layout_sections_as_folded.php.

accelerated layouts - Inclusion directives have been moved outside loops, to speed up data processing.

enhanced SEO - Nick name are now added to most links generated dynamically by YACS, to improve ranking of your web server at most search engines. Many thanks to ThierryP for the suggestion and explanation on this hot topic.

named pages - The encoding of nick names used in web links has been fixed, to effectively support accents, spaces, and similar tricky characters.

using nick names in yacs codes - Because some names could include spaces, the separation of arguments by commas in YACS codes has been enforced in
codes/codes.php.

article editors - In previous versions members could be assigned to sections to delegate them editorial rights. With the 7.3 release this mechanism has been extended to articles as well, providing an easy way to limit access to individual pages. When browsing an article, assigned editors are listed in page details (
articles/view.php). The new function
Articles::is_assigned() can be used anywhere to check assignment of current surfer to a given article.

next and previous articles - A bug that prevented smooth navigation has been fixed in release 7.3, and links to next and previous pages now behave as expected. Navigation links now also feature draft pages to associates and editors. Previously, only published pages were considered. Updated code can be read in
sections/section.php.

page ordering in sections - The ordering of new pages coming from sub-sections now fully enforce the setting for pages attached directly to the section. See
sections/view.php.

streamlined categorization - The code used to assign article to weekly and monthly categories, and to attach tags as well, has been simplified and hardened. This seems to have fixed the bug reported by Pat some time ago. See
categories/categories.php. Also, a button has been re-introduced into the categorization form, as suggested by Ddaniel.

authenticator interface - YACS has been opened to external authentication through a new interface, defined at
users/authenticator.php. The actual class to use for authentication, and related parameters (e.g., LDAP server name), are selected in the configuration panel for users, at
users/configure.php. First implementations of the interface include: LDAP, FTP and XML-RPC authenticators. Look in directory
users/authenticators for more information.

default text editor - You can now select in the configuration panel for users which editor should be set by default for new users. Use this to ensure that new registrants will be driven to FCKEditor for example.

date in text editor - For users of the default YACS editor, a button has been added to insert date into the area of text. See
codes/edit.js
parameters added to hooks - YACS was already able to include external script files in various places. The mechanism has been extended to support the transmission of parameters to invoked functions. See
control/scan.php. For example, the hook triggered on page publication provides the id of the new published article.

new hooks in the index of users - The script
users/index.php features two hooks to include text as page prefix or suffix.

new hooks in the site map - The script
sections/index.php features two hooks to include text as page prefix or suffix.

new hooks in the help page - The script
help.php features two hooks to include text as page prefix or suffix.

new hook to cascade deletions - The script
shared/global.php has a new hook generated by the
delete_related_to() function. This hook is aiming is to maintain database consistency, even with complex software extensions.

Foxit Reader - This is the new piece of software that is recommended to read PDF files. Lightweight, fast, and free.

backup user files - With the 7.3 release it is possible to package, in a single archive, all configuration files, or all files of the current skin, or all user files, or all user images, and to download this for backup purpose. This has been made possible by a maor contribution of GnapZ to the
control/backup.php script.

import a table - A script has been added to tun an uploaded CSV file to a separate table in the database. Use this straightforward import facility to populate the database, and to leverage SELECT queries implemented in table objects. See
tables/import.php
link refresh - Links gathered from RSS feeds are now refreshed if they already exist in the database. Previously links were recorded once, with no subsequent updates. This improvement has been suggested by NickR.

thumbnail limit - The 7.3 release changes the way images are reduced to thumbnails. Previously the smallest dimension was reduced, now the largest dimension is reduced. This means that thumbnails will always stay within limits set in configuration panel. See
images/image.php.

issue manager - The overlay that manages issues do not record the name of the posting surfer as being the solution manager any more. See
overlays/issue.php
cron for background processing - Since the inception of YACS, background processing was intermixed with front-end processing. Background processing is related to the gathering of external RSS feeds, or to the transformation of inbound mail messags to web pages. While being carefully designed to minimize its impact, the random addition of additional CPU cycles to the generation of dynamic pages is obviously something to be avoided. The 7.3 release brings advanced support of
cron, meaning background processing can be completely uncoupled from data delivery to end-users. Look at
cron.php to check updated code, and at
tools/yacs_crontab to get a documented configuration file for actual implementation on Unix servers.

visibility on background processing - For the advanced setup of a server, YACS has convenient options for debugging, that allow webmasters to troubleshoot and finalize configuration quite easily. Most often, these options are disabled afterwards to streamline regular server operations. To check a running server unattended, the only option to gain visibility was to activate debugging options and wait. With the 7.3 release visibility on background processing has been improved with the settings of new records in the table for values. When a background tick is triggered, this is recorded in the table (in
cron.php. When a RSS feed is fetched, its name, and number of retrieved links, is saved in the table as well (in
feeds/feeds/php). When inbound messages or files are retrieved, and turned to web pages, this is also remembered (in
agents/messages.php and
agents/uploads.php, respectively). Lastly, the full list of such values as been made available in the YACS information panel (in
control/info.php). To see what's happening now, you just have to refresh this panel and look at values change over time.

mail stamp - The mailer script saves in the database the subject of the last message successfully posted. This information is available among other values in the YACS information panel. See
shared/mailer.php.

MySQL supported charsets - The SQL information panel (in
control/info.php) also lists charsets supported by the database. The next step will be to better support UTF-8 native storage...

streamlined inclusion of library files -
agents/logger.php and
categories/members.php have been moved to the
shared directory. Most files of this directory are now included from
shared/global.php, meaning a lot of inclusion directives have been suppressed in other files.

centralized configuration file - YACS has a number of configuration options, and these are documented in separate files. In order to ease the handling of all these files and, more specifically, to reduce the pain on permission settings, they have put in one single directory starting on release 7.3. All configuration panels have been modified to write configuration data in the new directory
parameters. This is also the place where the main switch file (either
switch.on or
switch.off) will be placed. A special run-once script is provided to smooth the transition of existing servers, and to centralize configuration files without disruption.

centralized temporary files - A new directory
temporary has been introduced in version 7.3, with the aim to streamline permission settings on directories. This is the place where YACS will write log and debug files. This is also the place where cached versions of localized strings will be created by
i18n/i18n.php.

environment variable - YACS has a standard organization of files that has been proven quite handy over time. However, in some occasions you may have to depart from the standard. The environment variable
YACS_HOME has been introduced to the release 7.3 to ensure proper operation of the front page, and of background processing. All you have to do is to set this environment to the absolute path to the installation directory of YACS. Updated code can be checked in
index.php and in
cron.php.

Flash detection - Javascript-based Flash detection has been added to login script, to ensure that Firefox user would also benefit from the Flash Freemind player. Internet Explorer was already detected through server-side analysis.

reduced rendering time - Pattern matching rules used by the rendering engine to locate YACS codes have been turned to static arrays to be initialized only once on multiple invocations. See
codes/codes.php
stage in safe mode - GnapZ has advised to not block servers in safe mode for staging. This limitation has been removed from
scripts/stage.php and only a warning remains.

escaped HTML - The code used to escape regular rendering has been extended to HTML and XHTML tags.

security countermeasures - The variable
$context is explicitly reset in
shared/global.php to stop vicious attacks, and
get_anchor(), in the same script, now checks that actual records have been retrieved from the database.
Skin::error() - This function has been introduced to ensure that error messages are always processed the same way throughout all scripts. Error messages are now stacked as independant items before rendering, and YACS filters submitted messages to avoid repetitions on screen.
validate() - The function now beautifies the input where applicable, and uses
Skin::error() if necessary.

transcoding bug fixed - In
shared/utf8.php
Free bug fixed - The hosting provider free.fr seems to have strange ways to implement safe mode. We have changed back the connection to the database to ensure YACS serve could run there.

IE6 bug fixed - The absence of some Javascript seems to confuse IE6, so we have updated the commenting form (
comments/edit.php) to avoid this error.

nicetitle bug - The
included/browser/nicetitle.js has been changed, to accomodate a small bug in this piece of Javascript, that seems to kill IE6 on hovering links.

table bug fixed - Sortable tables do feature clickable column headers again.

gadget box fix - A compact
<br style="clear: both" /> has been appended to gadget boxes, to ensure proper rendering of floating images in gadget boxes.

footprints copy - On successful update the file
footprints.php is copied from the staging directory to the installation directory.

no front page by default - The default behavior for new sections is now to not display new articles at the site front page. You will have to explicitly configure sections to have their content listed at site front page. See
sections/view.php.

front page limited to one section - The bug that prevented proper display of the section assigned to the home page has been fixed.

umask bug - All calls to
umask() have been suppressed, because they translate to higher file permissions, and to internal error at various ISP, including OVH and Free.fr. See
shared/safe.php.