2
40

Initialization

Installation

Installation guide

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
$ sudo chgrp -R www-data .

Add a file called izendsms.conf in the directory /etc/apache2/sites-available with the following content:

<VirtualHost *:80>
    DocumentRoot /var/www/izendsms.com
    ServerName local.izendsms.com
    ServerAlias 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 service apache2 reload

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?

Press Configure.

Git
  1. /izendsms.com
    1. .htaccess
    2. avatars
      1. foobar.png
    3. includes
      1. aliases.inc
      2. config.inc
      3. db.inc
    4. logos
      1. sitelogo.png
    5. robots.txt
    6. sitemap.txt

Commit this initial version:

$ git status
$ git add --all
$ git commit -m"Initial website by iZend"
$ git status
$ git log --graph --oneline

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.

Click on the keyboard in the toolbar to edit the content of the home page.

Mask content 2:

Press Modify.

Click on the title of the thread at the top right of the banner. Hide content 2 Documentation in the list.

Edit the files views/banner.phtml and views/sidebar.phtml and invert the placement of the search input and the title of the page.

The search input is displayed in the banner.

banner.phtml
  1. <?php if (true): ?>
  2. <?php if (!empty($search)): ?>
  3. <?php echo $search; ?>
  4. <?php endif; ?>
  5. <?php endif; ?>
  6. <?php if (false): ?>
  7. <?php if (!empty($headline)): ?>
  8. <?php echo $headline; ?>
  9. <?php endif; ?>
  10. <?php endif; ?>

The title of the page is displayed in the bar at the right of the page.

sidebar.phtml
  1. <?php if (false): ?>
  2. <?php if (!empty($search)): ?>
  3. <?php echo $search; ?>
  4. <?php endif; ?>
  5. <?php endif; ?>
  6. <?php if (true): ?>
  7. <?php if (!empty($title)): ?>
  8. <?php echo $title; ?>
  9. <?php endif; ?>
  10. <?php endif; ?>

Edit the file actions/home.php.

Remove the option donate of the block banner:

  1.     $contact=$account=$admin=true;
  1.     $banner = build('banner', $lang, $with_toolbar ? compact('languages', 'contact', 'account', 'admin') : compact('languages', 'contact', 'account', 'admin', 'edit', 'validate'));

Remove the bar on the right of the page:

  1.     $search_text='';
  2.     $search_url=url('search', $lang);
  3.     $suggest_url=url('suggest', $lang);
  4.     $search=view('searchinput', $lang, compact('search_url', 'search_text', 'suggest_url'));
  5.     $sidebar = view('sidebar', false, compact('search'));
  1.     $output = layout('standard', compact('footer', 'banner', 'content', 'sharebar', 'toolbar'));

Change the file favicon.ico at the root of the site.

Git
  1. /izendsms.com
    1. favicon.ico
    2. actions
      1. home.php
    3. views
      1. banner.phtml
      2. sidebar.phtml

Commit this version:

$ git status
$ git add --update
$ git commit -m'Shows $search in banner.phtml and $headline in sidebar.phtml'

IMPORTANT: Edit the DB connector in the file includes/db.inc. Follow the instructions in the file SMS to update the DB.

Comments

Your comment:
[p] [b] [i] [u] [s] [quote] [pre] [br] [code] [url] [email] strip help 2000

Enter a maximum of 2000 characters.
Improve the presentation of your text with the following formatting tags:
[p]paragraph[/p], [b]bold[/b], [i]italics[/i], [u]underline[/u], [s]strike[/s], [quote]citation[/quote], [pre]as is[/pre], [br]line break,
[url]http://www.izend.org[/url], [url=http://www.izend.org]site[/url], [email]izend@izend.org[/email], [email=izend@izend.org]izend[/email],
[code]command[/code], [code=language]source code in c, java, php, html, javascript, xml, css, sql, bash, dos, make, etc.[/code].