Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
systems:joomla:audina_website_v3 [2012/10/15 16:58]
smayr
systems:joomla:audina_website_v3 [2013/02/27 15:25] (current)
smayr [User Registration (Component)]
Line 76: Line 76:
 } }
 ?> ?>
 +</code>
 +  * Setup ''htaccess'' file with some basic security.  This how ''.htaccess'' in the root folder in Joomla should look like:<code bash>
 +# Deny all PHP pages
 +<Files *.php>
 +deny from all
 +</Files>
 +# Allow only these PHP pages
 +<Files ~ "(^index.php|^index2.php|chrono_verification.php)$">
 +allow from all
 +</Files>
 </code> </code>
   * Point the browser to website URL, and test.   * Point the browser to website URL, and test.
 +== Search Engine Optimization ==
 +  * Home page Title should have keywords.
 +  * Description Metatag should have relevant site summary for Google to display it.
 +  * Images in Home page should have descriptive ''alt'' descriptions.
 +  * Switch on Search Engine Friendly URLs (Global Configuration).
 +  * Switch on Apache mod_rewrite (Global Configuration).
 +=== Apache mod_rewrite Setup ===
 +  * Install mod_rewrite support for apache.
 +    * Enable it: <code bash>% sudo a2enmod rewrite</code> or <code bash>% cd /etc/apache2/mods-enabled
 +% ln -s ../mods-available/rewrite.load rewrite.load</code>
 +    * Enable AllowOverride for apache: Edit file ''/etc/apache2/sites-available/default'' (or whatever the virtual site is using) and set it to ''AllowOverride All''. Eg:<code bash><Directory /var/www/>
 +    Options Indexes FollowSymLinks MultiViews
 +    #AllowOverride None
 +    AllowOverride All
 +    Order allow,deny
 +    allow from all
 +    # Uncomment this directive is you want to see apache2's
 +    # default start page (in /apache2-default) when you go to /
 +    #RedirectMatch ^/$ /apache2-default/
 +</Directory></code>
 +    * Restart apache: <code bash>% /etc/init.d/apache2 restart</code>
 +  * Create test script. Sample test ''.htaccess'' file:<code bash>
 +RewriteEngine On
 +Options +FollowSymLinks
 +RewriteRule ^joomla\.html http://www.joomla.org/? [R=301,L]
 +RewriteRule ^link([^/]*).html$ rewrite.php?link=$1 [L]
 +</code>Test script ''rewrite.php'' (open in browser, and test links being displayed):<code php>
 +<html>
 +<body>
 +<h2>
 +<?php
 +if($_GET['link']==1)
 +{
 +  echo"You are NOT using mod_rewrite";
 +}
 +elseif($_GET['link']==2)
 +{
 +  echo"Congratulations!! You are using Apache mod_rewrite";
 +}
 +else
 +{
 +  echo"Apache mod_rewrite Test Tutorial";
 +}
 +?>
 +</h2>
  
 +<p><a href="rewrite.php?link=1">LINK1</a> = rewrite.php?link=1</p>
 +<p><a href="link2.html">LINK2</a> = link2.html</p>
 +<p>How this works: both links are for this same page, but each calls the page differently:</p>
 +<ul>
 +<li>Link1 is without the mod_rewrite. It shows the php file.</li> 
 +<li>Link2 is using mod_rewrite. </li>
 +</ul>
 +<p>
 +With mod_rewrite, we are mascarading the php file into an html file. Any extension can be used (eg: .htm, .shtml etc.). Make sure it is reflected in the .htaccess file</p>
 +</body>
 +</html>
 +
 +</code>
 +  * Rename and test Joomla's ''htaccess.txt'' to ''.htaccess''
 = Language Switching = = Language Switching =
 == Dropdown Selector == == Dropdown Selector ==
Line 164: Line 233:
      * Go to Joomla > Components > CP Event Calendar.      * Go to Joomla > Components > CP Event Calendar.
      * For calendar 'Events', click on 'Admin Data' to edit calendar and to add/delete events.      * For calendar 'Events', click on 'Admin Data' to edit calendar and to add/delete events.
 +== User Registration (Component) ==
 +  * Edit file ''<//joomla_root>///components/com_user/views/register/default.php'' to include this at the top:<code php>
 +<?php // no direct access
 +defined('_JEXEC') or die('Restricted access');
 +
 +// coastline wayne code added for forms url
 +$urlBase =  $this->baseurl;
 +
 +$mainframe->redirect($urlBase.'/index.php?option=com_chronocontact&chronoformname=Registration');
 +
 +// end wayne
 +?>
 +<script type="text/javascript">
 +. . .
 +</code>
  
 +== ChronoContact (Component) ==
 +  * Look for revised ''if'' statement on this plugin called ''$wayneFix'' that cuts off the e-mail from being sent.  See file ''<//joomla_root//>/components/com_chronocontact/plugins/cf_joomla_registration.php''.
 = Backup Files = = Backup Files =
   * A copy of the webserver files can be found in ''/data/backup/www''   * A copy of the webserver files can be found in ''/data/backup/www''