Initialization
Installation
Initialize the directory of your site:
$ git init /var/www/izendsms.com
$ cd /var/www/izendsms.com
Declare your identity:
$ git config user.name izend
$ git config user.email izend@izend.org
Pull out the current version of iZend Core in a branch called izend:
$ git remote add izend https://github.com/izend/izend
$ git fetch izend
$ git checkout -b izend izend/master
Go to your master branch:
$ git checkout -b master
$ git branch
izend
* master
Make sure the Apache server is allowed to write the configuration files:
$ cd /var/www/izendsms.com
$ chgrp -R www-data .
For more security, check that the access to the configuration files is limited to the server:
$ cd /var/www/izendsms.com/includes
$ chmod 660 db.inc config.inc settings.inc aliases.inc paypal.inc payline.inc
Add a file called izendsms.conf in the directory /etc/apache2/sites-available with the following content:
DocumentRoot /var/www/izendsms.com
ServerName local.izendsms.com
php_admin_value open_basedir /var/www/izendsms.com
php_admin_value upload_tmp_dir /var/www/izendsms.com/tmp
</VirtualHost>
<Directory /var/www/izendsms.com>
AllowOverride all
Require all granted
</Directory>
Activate the website:
$ sudo a2ensite izendsms
Reload Apache:
$ sudo systemctl reload apache2
Add the following line in /etc/hosts :
127.0.0.1 local.izendsms.com
Enter local.izendsms.com in the address bar of your navigator.
Fill in the installation form:
What is the name of the site?
What is the email address of the webmaster?
In what languages is the content of the site written?
en fr
IMPORTANT: Configure a content in English and in French in order to be able to follow all the instructions about programming a website in several languages.
What is the default language?
en fr
Do you have a database server?
yes no
Do you use MySQL or PostgreSQL?
MySQL PostgreSQL
What is the name of the database?
What is the name of the database host?
What are the name and the password of the user of the database?
Do you use an existing database?
yes no
If no, what are the name and the password of the administrator of the database server?
What is the prefix of the tables?
What are the name and the password of the administrator of the site?
NOTE: Enter a combination of lowercase and uppercase letters and digits of at least 6 characters.
Press Configure.
Click on the logo to display the initial website.

Git
- /izendsms.com
- .htaccess
- avatars
- foobar.png
- includes
- aliases.inc
- config.inc
- db.inc
- logos
- sitelogo.png
- robots.txt
- sitemap.txt
Commit this initial version:
$ git status
$ git add --all
$ git commit -m"Initial website by iZend"
$ git status
$ git log --graph --oneline
Edit the file config.inc in the folder includes.
Set the parameter $socializing to 'either' to display the share on social media bar to the left of the page of the website:
- $socializing='either'; // false, 'inline', 'bar', 'either', 'both'
Change the file favicon.ico at the root of the site.
Git
- /izendsms.com
- favicon.ico
- includes
- config.inc
Commit this version:
$ git status
$ git add favicon.ico include/config.inc
$ git commit -m'Adds favicon.ico and sets $socializing to 'either' in config.inc'
Content
Click on the shadow
in the banner.
Enter with the identification code and the password of the administrator, i.e. foobar and f00bar.
The initial site has one thread called Content. This thread has two nodes called Welcome and Documentation.
IMPORTANT: Don't delete node 1 which is used to build the content of the home page by the action home and which is referenced by the configuration parameter $root_node in the file config.inc in the folder includes.
Click on the keyboard
in the toolbar to edit the content of the home page.
Mask content 1:
Modify the content 2:
Select all the content of the input field. Press Del to delete it. Type /files/images/sms_en.png. Select all the content.
Press on the button <img> in the bar above the input field.
The editor has created a tag <img> with the property src="/files/images/sms_en.png".
Add the property width="200" to the tag <img>.
Select all the content of the input field.
Press on the button <p> to insert the tag <img> in a <p> tag.
Press Modify.
Press on the flag
to display the version in French.
Press Modify.
Create the folder files/images at the root of the website:
$ cd /var/www/izendsms.com
$ mkdir -p files/images
Download the files sms_en.png et sms_fr.png in the folder files/images:
Display
the node.
Press on a flag
to check the result in English and in French.
Return
in the editor.
Make sure that all the buttons for the social networks in Options are checked.
Press Edit to validate the options for all languages.
Set the parameter Image to /files/images/sms_en.png for the version in English and to /files/images/sms_fr.png for the version in French to define the image which is displayed by social networks when sharing the home page of the website.
Click on the title Content of the thread at the top right of the banner. Hide content 2 Documentation in the list.
Click on the logo in the banner to display the home page.
Git
- /izendsms.com
- files
- images
- sms_en.png
- sms_fr.png
- images
- files
Commit this version:
$ git status
$ git add files
$ git commit -m'Edits the home page'
Edit the files views/banner.phtml and views/sidebar.phtml.
banner.phtml
- <?php if (false): ?>
- <?php if (!empty($search)): ?>
- <?php echo $search; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php if (true): ?>
- <?php if (!empty($headline)): ?>
- <?php echo $headline; ?>
- <?php endif; ?>
- <?php endif; ?>
sidebar.phtml
- <?php if (true): ?>
- <?php if (!empty($search)): ?>
- <?php echo $search; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php if (false): ?>
- <?php if (!empty($title)): ?>
- <?php echo $title; ?>
- <?php endif; ?>
- <?php endif; ?>
The title of the page is displayed in the banner. The search input is displayed in the vertical bar at the right of the page.
Invert the placement of the search input and the title of the page by inverting the true and false conditions.
banner.phtml
- <?php if (false): ?>
- <?php if (!empty($search)): ?>
- <?php echo $search; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php if (true): ?>
- <?php if (!empty($headline)): ?>
- <?php echo $headline; ?>
- <?php endif; ?>
- <?php endif; ?>
sidebar.phtml
- <?php if (true): ?>
- <?php if (!empty($search)): ?>
- <?php echo $search; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php if (false): ?>
- <?php if (!empty($title)): ?>
- <?php echo $title; ?>
- <?php endif; ?>
- <?php endif; ?>
The search input is displayed in the banner. The title of the page is displayed in the vertical bar at the right of the page.
Edit the file actions/home.php.
- $languages='home';
- $contact=$account=$admin=$donate=true;
- $edit=user_has_role('writer') ? url('editpage', $_SESSION['user']['locale']) . '/'. $root_node . '?' . 'clang=' . $lang : false;
- $validate=url('home', $lang);
- $banner = build('banner', $lang, $with_toolbar ? compact('languages', 'contact', 'account', 'admin', 'donate') : compact('languages', 'contact', 'account', 'admin', 'donate', 'edit', 'validate'));
- $toolbar = $with_toolbar ? build('toolbar', $lang, compact('edit', 'validate')) : false;
- $search_text='';
- $search_url=url('search', $lang);
- $suggest_url=url('suggest', $lang);
- $search=view('searchinput', $lang, compact('search_url', 'search_text', 'suggest_url'));
- $sidebar = view('sidebar', false, compact('search'));
Remove the option donate from the banner block.
Move the search block from the sidebar block to the banner block.
Remove the vertical bar on the right of the page:
- $languages='home';
- $contact=$account=$admin=true;
- $search_text='';
- $search_url=url('search', $lang);
- $suggest_url=url('suggest', $lang);
- $search=compact('search_url', 'search_text', 'suggest_url');
- $edit=user_has_role('writer') ? url('editpage', $_SESSION['user']['locale']) . '/'. $root_node . '?' . 'clang=' . $lang : false;
- $validate=url('home', $lang);
- $banner = build('banner', $lang, $with_toolbar ? compact('languages', 'contact', 'account', 'admin', 'search') : compact('languages', 'contact', 'account', 'admin', 'search', 'edit', 'validate'));
- $toolbar = $with_toolbar ? build('toolbar', $lang, compact('edit', 'validate')) : false;
- $sidebar = false;
Git
- /izendsms.com
- actions
- home.php
- views
- banner.phtml
- sidebar.phtml
- actions
Commit this version:
$ git status
$ git add actions views
$ git commit -m'Shows $search in banner.phtml and $headline in sidebar.phtml'
Disconnect
to display the home page.

Reconnect
as administrator to display the widest control bar in the banner.
Press Ctrl+Shift+M to switch to adaptive view. Set the width of the display to 360px. The placement of the elements within the banner has been adjusted. The social media sharing bar is displayed at the bottom of the page.
IMPORTANT: The floating toolbar is not displayed. To access the editor on a small screen, set the$with_toolbar parameter to false in config.inc.
Gradually widen the screen. At 720px, the menu bar is misaligned.
Edit the file media.css in the folder css.
Set the parameter max-width to 800px in the rule @media screen and (max-width:720px) :
- @media screen and (max-width:800px) {
- #logo {float:none;width:100%;}
- #logo h1 a {width:100%;}
- #bannermenu {margin-left:0;}
- h3 {background:none;text-indent:0;}
- }
Git
- /izendsms.com
- css
- media.css
- css
Commit this version:
$ git status
$ git add css/media.css
$ git commit -m'Folds banner when screen max-width:800px in media.css'
Comments