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
$ sudo chgrp -R www-data .
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
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
- /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
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
- <?php if (true): ?>
- <?php if (!empty($search)): ?>
- <?php echo $search; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php if (false): ?>
- <?php if (!empty($headline)): ?>
- <?php echo $headline; ?>
- <?php endif; ?>
- <?php endif; ?>
The title of the page is displayed in the bar at the right of the page.
sidebar.phtml
- <?php if (false): ?>
- <?php if (!empty($search)): ?>
- <?php echo $search; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php if (true): ?>
- <?php if (!empty($title)): ?>
- <?php echo $title; ?>
- <?php endif; ?>
- <?php endif; ?>
Edit the file actions/home.php.
Remove the option donate
of the block banner
:
- $contact=$account=$admin=true;
- $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:
- $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'));
- $output = layout('standard', compact('footer', 'banner', 'content', 'sharebar', 'toolbar'));
Change the file favicon.ico at the root of the site.
Git
- /izendsms.com
- favicon.ico
- actions
- home.php
- views
- banner.phtml
- 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