While monitoring a day time, the plugin facilitates publishing of special contents (texts, images, videos, tables, etc.:
- before the information - e.g. announcement, agenda etc.
- during the information - e.g. flowtrough report (maybe even a webcam outputs -
not tested).
- after the information - e.g. new announcement, new agenda etc.
Plugin also allows to show special content or hide pages if there is no information to publish. Eventnually there may be put a special content to be published instead.
Important Notice
Please do read this documentation, before you encounter any problems!
sitr_XH couldn't be tested so far in various environments.
It is a so called beta version. Use with caution!
Requirements
sitr_XH is a plugin for CMSimple_XH ≥ 1.7+. It requires a UTF-8 encoded
version.
Installation
The installation is done as with many other CMSimple_XH plugins. See the
CMSimple_XH wiki
for further details.
- Backup the data on your server.
- Unzip the distribution on your computer.
- Upload the whole directory sitr/ to your server into CMSimple_XH's
plugins directory.
- Set write permissions to the subdirectories config/, css/ and
languages/.
Settings
The plugin's configuration is done as with many other CMSimple_XH plugins in
the website's back-end. Select "sitr" from "Plugins".
You can change the default settings of sitr_XH in "Plugin Config" and
language in a file. Hints for the options will be displayed when hovering over
the help icon with your mouse.
Localization is done in "Plugin Language". You can translate the character
strings to your own language, or customize them according to your needs. In the
language file there are also language depending formats of date and time. These
have to be also set properly to have the plugin working properly.
The look of the sitr_XH can be customized in "Plugin Stylesheet". This is
mainly meant for styling the back-end. The styling of the Show in Time Range
should be done by modifying the template and its stylesheet.
Usage
Function sitr_today
Specify the name of a page in your language file (e.g.:
anyday)
Create the page
anyday and put the code on this page:
<h1>anyday</h1><br>
{{{sitr_today();}}}
or in your template in place where you want, e.g. in a newsbox. Here use the
standard newsbox call with the name of your "anyday" page..
<?php echo newsbox('<anyday>');?>
Instead of <anyday>, you may choose any replacement for <Stranka-sitr>. This page may be optional published or hidden from navigation.
If there is no information for current day, leave the page empty(the title may remain on the page).
You have to specify one more page in your language file and create in the content, e.g.:
No Einformation
and put som general information on it, e.g.:
No Event
Event finished or no information prepared.
This information will be published after an information has finished or no information was announced on the
anyway page.
NOTE:
This function requires all configuration values and only the anyway and No Info page.
Function sitr_weekday
This function provides the same information like the
sitr_today function.
For this function you have, however, to create a page for each week day and put the information
for each day in a week in advance.
The function then reads the pages day-by-day and sent them to the newsbox.
You have to add a newsbox in your template and put the code:
<?php echo newsbox(sitr_weekday);?>
If an daily information is finished or no information is scheduled for a day, the "No Event" page is published.
Function sitr_week
This function the list of the "
week informations" from all "
week day pages"..
For this function you have to spicify in your language file and create a page "
Week plan".
The function is primarilly meant for the use on a page with the call:
{{{sitr_week}}}
You may put it also in a newsbox in your template with the code:
<?php echo newsbox(sitr_week);?>
If an day is ower, the information in the list appears dimed.
NOTE:
This function requires only the $plugin_cf['sitr']['information_announce_on'] value in the configuration,
the No Info page, and all Week days pages.
The Start and Stop times shall be put on respective Week days pages.
Function sitr_nextday
This function uses the function "
sitr_weekday" and extends the published information by
the information of "
following day"..
Activation of the "
sitr_nextday" must be specified in the plugin configuration.
The function is primarilly meant for the use in a newsbox in your template by the call:
<?php echo newsbox(sitr_nextday);?>
You may put it also in a newsbox in your template with the code:
NOTE:
This function requires only the $plugin_cf['sitr']['information_announce_on'] and
the $plugin_cf['sitr']['show_nextday'] value in the configuration,
and
the No Info page, and all Week days pages.
The Start and Stop times shall be put on respective Week days pages.
Note:
Hints to all configurable variables are shown in plugin configuration on hovering over the icon
.
Also
consider that there are predefined texts in your language file that can be used above and below daily information. They are
customizable in language files and may optioinally be left
empty. In this case their container won't appear at all.
Administration
You can administrate and/or configure the sitr_XH in Plugins→sitr→Config
or in Plugins→sitr→Languages. Currently it's possible:
- in configuration
- $plugin_cf['sitr']['information_announce_on']="09:00"; - set up the beginning of
an information publishing
$plugin_cf['sitr']['information_start_time']="10:00"; - set up the beginning of
an information
$plugin_cf['sitr']['information_stop_time']="11:00"; - set up the beginning of
an information end
$plugin_cf['sitr']['show_nextday']="always, today, never"; - set when the information shall be published
NOTE: The time may also be inserted as yyyy-mm-dd hh:mm. In this case, the date is accounted. This is useful with more days informations or the longer breaks between informations.
- in language files
- $plugin_tx['sitr']['day']="anyday";
- $plugin_tx['sitr']['week_starts_monday']="1"; - or 0 - depending on national standard.
- $plugin_tx['sitr']['page_no_information']="No Event";
- $plugin_tx['sitr']['text_before_announcement']="Program for new information is being prepared and will be published at ";
- $plugin_tx['sitr']['text_before_start']="Program starts at ";
- $plugin_tx['sitr']['text_above']="text above information";
- $plugin_tx['sitr']['text_below']="text below information";
License
sitr_XH is licensed under
GPLv3.
© 2020 Dr. Martin Sereday (tata)
Credits
Many thanks to the community at the
CMSimple forum for tips, suggestions
and testing. Particularly my thanks go to
cmb, who helped the most with his
invaluable and inexhaustible experience. Also
olape helped to "clean and humanize" the code.
And last but not least many thanks to
Peter
Harteg, the "father" of CMSimple, and all developers of
CMSimple_XH without whom this amazing CMS
wouldn't exist.