Joomla Hosting BLOG

Blog about Joomla, Technologies and Hosting Service

Joomla 1.5 Hosting - ASPHostPortal :: How to Add New Module Positions in Joomla 1.5 Template

clock January 24, 2011 08:58 by author Jervis

If you are developing a new joomla 1.5 template or are editing any pre existing one, and need to add a new custom module position of your choice some where in the template index.php, here it is how to do it (you will be able to select this new module position from the Joomla! 1.5 admin backend for modules to be published at this new position):

1. Goto <joomla root>/templates/<template name>/ folder

2. Open the file index.php in that folder in your favourite editor

3. Add this code in the relative position in html of the template index.php to add the new custom module position in your Joomla 1.5 template

<?php if ($this->countModules('custom')) : ?>
<div>
<jdoc:include type="modules" name="custom" style="xhtml" />
</div>
<?php endif; ?>


4. Rename the word custom coming twice in the above code with any name that you want to give to that new module position.

5. Open templateDetails.xml in the same folder and find the part of code where it says <position>

6. After the already existing positions, simply add the new position that you just created in the above step in your Joomla! 1.5 index.php in the same format as the already existing ones.

7. Replace the word custom with the name of the position that you defined in step 4 above while adding the new module position code for Joomla! 1.5 in template index.php file.

This will add a new custom module position in your Joomla! 1.5 template which you can use to publish modules at this new position. You can repeat the same procedure for more custom module positions for Joomla! 1.5 template.

Reasons why you must trust ASPHostPortal.com


Every provider will tell you how they treat their support, uptime, expertise, guarantees, etc., are. Take a close look. What they’re really offering you is nothing close to what ASPHostPortal does. You will be treated with respect and provided the courtesy and service you would expect from a world-class web hosting business.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added- benefits you can find when hosting with us:

- DELL Hardware
Dell hardware is engineered to keep critical enterprise applications running around the clock with clustered solutions fully tested and certified by Dell and other leading operating system and application providers.
- Recovery Systems
Recovery becomes easy and seamless with our fully managed backup services. We monitor your server to ensure your data is properly backed up and recoverable so when the time comes, you can easily repair or recover your data.
- Control Panel
We provide one of the most comprehensive customer control panels available. Providing maximum control and ease of use, our Control Panel serves as the central management point for your ASPHostPortal account. You’ll use a flexible, powerful hosting control panel that will give you direct control over your web hosting account. Our control panel and systems configuration is fully automated and this means your settings are configured automatically and instantly.
- Excellent Expertise in Technology
The reason we can provide you with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams. Our operations are based on a continual improvement program where we review thousands of systems, operational and management metrics in real-time, to fine-tune every aspect of our operation and activities. We continually train and retrain all people in our teams. We provide all people in our teams with the time, space, and inspiration to research, understand, and explore the Internet in search of greater knowledge. We do this while providing you with the best hosting services for the lowest possible price.
- Data Center
ASPHostPortal modular Tier-3 data center was specifically designed to be a world-class web hosting facility totally dedicated to uncompromised performance and security
- Monitoring Services
From the moment your server is connected to our network it is monitored for connectivity, disk, memory and CPU utilization – as well as hardware failures. Our engineers are alerted to potential issues before they become critical.
- Network
ASPHostPortal has architected its network like no other hosting company. Every facet of our network infrastructure scales to gigabit speeds with no single point of failure.
- Security
Network security and the security of your server are ASPHostPortal’s top priorities. Our security team is constantly monitoring the entire network for unusual or suspicious behavior so that when it is detected we can address the issue before our network or your server is affected.
- Support Services
Engineers staff our data center 24 hours a day, 7 days a week, 365 days a year to manage the network infrastructure and oversee top-of-the-line servers that host our clients’ critical sites and services.



Joomla 1.6 Hosting - ASPHostPortal :: Creating Custom Parameters in Joomla 1.6

clock January 10, 2011 08:06 by author Jervis

In the course of updating our extensions to Joomla 1.6 we have managed to figure out some useful information about the differences between Joomla 1.5 and 1.6. There have been some big changes in the format of the installation package, which this article explores.

Format of the Installation Manifest

There have been some changes to the format of the installation manifest xml file. The root <install> tag has been replaced with an <extension> tag, while the <params> and <param> tags have been replaced with the <fields> and <field> tag respectively. The <fields> tags are now placed in a <config> tag container. The rest of the layout remains much the same. So a typical layout for a module in Joomla 1.6 would be:

<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="1.6.0" method="upgrade" client="site">
<name>My Module</name>
<author>Jo Bloggs</author>
<creationDate>July 2010</creationDate>
<copyright>Inspiration Web Design</copyright>
<license>GPL</license>
<authorEmail>

[email protected]This e-mail address is being protected from spambots. You need JavaScript enabled to view it

</authorEmail>
<authorUrl>www.mysite.com</authorUrl>
<version>1.0.0</version>
<description>Mails a link to the current page</description>
<files>
  <filename module="my_module">my_module.php</filename>
  <filename>helper.php</filename>
  <filename>index.html</filename>
  <filename>tmpl/default.php</filename>
  <filename>tmpl/index.html</filename>
  <folder>assets</folder>
</files>
<config>
  <fields name="params">
    <fieldset name="basic" label="Module Parameters" description="Configure Module">
    <field name="fromEmail" type="text" default="" label="from email address"  />
    <field name="bcc" type="text" default="" label="bcc" description="DESCBCC" />
    <field name="filterEmails" type="textarea" cols="20" rows="3" label="invalid emails"  />
    <field name="moduleclass_sfx" type="text" default="" label="Module Class Suffix"  />
    <field name="use_slider" type="list" default="0" label="Use mootools slider" >
      <option value="1">Yes</option>
      <option value="0">No</option>
    </field>
    <field name="use_cookie" type="list" default="1" label="Remember slide state" >
      <option value="1">Yes</option>
      <option value="0">No</option>
    </field>
    <field name="use_detection" type="list" default="0" label="Use Extended URL detection">
      <option value="1">Yes</option>
      <option value="0">No</option>
    </field>
    </fieldset>
  </fields>
</config>
<languages>
  <language tag="en-GB">en-GB.my_module.ini</language>
  <language tag="en-US">en-US.my_module.ini</language>
</languages>
</extension>


Adding Custom Parameters

So how do you go about adding custom parameters? If you are familiar with doing this with Joomla 1.5 you will remember that this involved extending the JElement Class, and overriding the fetchElement() method. This method was used to generate the html for the required field.

In Joomla 1.6 the process is quite similar, in this case we need to extend the JFormField Class. This Joomla class includes a getInput() method, which we can override to generate the html for the form field. The main difference from Joomla 1.5 is in how we access the name, value and other attributes of the form field. In Joomla 1.5 these were passed as parameters to the fetchElement() method. In Joomla 1.6 these are pre-populated as properties of the JFormField object that we are working with. So, for example to access the name of the form field we simply refer to it by $this->name. The class include a variable $type which must be set to the name of the field type.

In case this is not all crystal clear, the best way to illustrate this is with a example. The example below generates a list of currently published Joomla articles arranged by category.

<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );


jimport('joomla.html.html');
jimport('joomla.form.formfield');//import the necessary class definition for formfield


/**
 * Supports an HTML select list of articles
 * @since  1.6
 */
class JFormFieldArticles extends JformField

{
      /**
  * The form field type.
  *
  * @var  string
  * @since  1.6
  */
      protected $type = 'Articles'; //the form field type

      /**
  * Method to get content articles
  *
  * @return array The field option objects.
  * @since  1.6
  */
      protected function getInput()
      {
  // Initialize variables.
  $session = JFactory::getSession();
  $options = array();
 
  $attr = '';

  // Initialize some field attributes.
  $attr .= $this->element['class'] ? ' class="'.(string) $this->element['class'].'"' : '';

  // To avoid user's confusion, readonly="true" should imply disabled="true".
  if ( (string) $this->element['readonly'] == 'true' || (string) $this->element['disabled'] == 'true') {
   $attr .= ' disabled="disabled"';
  }

  $attr .= $this->element['size'] ? ' size="'.(int) $this->element['size'].'"' : '';
  $attr .= $this->multiple ? ' multiple="multiple"' : '';

  // Initialize JavaScript field attributes.
  $attr .= $this->element['onchange'] ? ' onchange="'.(string) $this->element['onchange'].'"' : '';


    //now get to the business of finding the articles
     

  $db = &JFactory::getDBO();
  $query = 'SELECT * FROM #__categories WHERE published=1 ORDER BY parent_id';
  $db->setQuery( $query );
  $categories = $db->loadObjectList();
 
  $articles=array();
 

  // set up first element of the array as all articles
  $articles[0]->id = '';
  $articles[0]->title = JText::_("ALLARTICLES");
 

    //loop through categories
    foreach ($categories as $category) {
     $optgroup = JHTML::_('select.optgroup',$category->title,'id','title');
     $query = 'SELECT id,title FROM #__content WHERE catid='.$category->id;
     $db->setQuery( $query );
     $results = $db->loadObjectList();
     if(count($results)>0)
     {
    array_push($articles,$optgroup);
    foreach ($results as $result) {
     array_push($articles,$result);
    }
     }
    }  
  
  // Output
 
  return JHTML::_('select.genericlist',  $articles, $this->name, trim($attr), 'id', 'title', $this->value );
 
      }
}


Simples!

Note that there are other ways of tackling this. Among the predefined field types that Joomla 1.6 supplies is the 'list' type, which defines the JFormFieldList class, which in turn is an extension of JFormField. We could have chosen to extend The JFormFieldList instead. This class returns a generic select list field. It includes a method, getOptions(), which returns the options available. We could have chosen to over-ride this method to return the articles as a list of options.

Adding the Custom Form Field to The Installation Package


The custom form field is added to your installation package using an addfieldpath attribute added to the < fields> tag. In the example below we assume that the articles field definition is placed in a file called articles.php which is placed in a folder /modules/mod_mymodule/fields (note that this is relative to the root folder of your site).

<fields name="params" addfieldpath="/modules/mod_mymodule/fields">

Backwards Compatibility With Joomla 1.5

In fact we have found that the Joomla 1.6 installer will understand the old <install> tag, so it is possible to create an installation package that will install in Joomla 1.6 and Joomla 1.6. To do this, use the <install> tag:-

<install type="module" version="1.5.0" method="upgrade" client="site">

The parameters for Joomla 1.6 can be added in a <config> tag, while the old <params> tag can be used for the Joomla 1.5 parameters. The installers will simply ignore the tags that they do not use.

If you want to add custom parameters for versions 1.5 and 1.6 we have found that the easiest way to do this is to have separate folders for the separate definitions of the custom fields, for example called 'elements' and 'fields' respectively.

Reasons why you must trust ASPHostPortal.com

Every provider will tell you how they treat their support, uptime, expertise, guarantees, etc., are. Take a close look. What they’re really offering you is nothing close to what ASPHostPortal does. You will be treated with respect and provided the courtesy and service you would expect from a world-class web hosting business.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added- benefits you can find when hosting with us:

- DELL Hardware
Dell hardware is engineered to keep critical enterprise applications running around the clock with clustered solutions fully tested and certified by Dell and other leading operating system and application providers.
- Recovery Systems
Recovery becomes easy and seamless with our fully managed backup services. We monitor your server to ensure your data is properly backed up and recoverable so when the time comes, you can easily repair or recover your data.
- Control Panel
We provide one of the most comprehensive customer control panels available. Providing maximum control and ease of use, our Control Panel serves as the central management point for your ASPHostPortal account. You’ll use a flexible, powerful hosting control panel that will give you direct control over your web hosting account. Our control panel and systems configuration is fully automated and this means your settings are configured automatically and instantly.
- Excellent Expertise in Technology
The reason we can provide you with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams. Our operations are based on a continual improvement program where we review thousands of systems, operational and management metrics in real-time, to fine-tune every aspect of our operation and activities. We continually train and retrain all people in our teams. We provide all people in our teams with the time, space, and inspiration to research, understand, and explore the Internet in search of greater knowledge. We do this while providing you with the best hosting services for the lowest possible price.
- Data Center
ASPHostPortal modular Tier-3 data center was specifically designed to be a world-class web hosting facility totally dedicated to uncompromised performance and security
- Monitoring Services
From the moment your server is connected to our network it is monitored for connectivity, disk, memory and CPU utilization – as well as hardware failures. Our engineers are alerted to potential issues before they become critical.
- Network
ASPHostPortal has architected its network like no other hosting company. Every facet of our network infrastructure scales to gigabit speeds with no single point of failure.
- Security
Network security and the security of your server are ASPHostPortal’s top priorities. Our security team is constantly monitoring the entire network for unusual or suspicious behavior so that when it is detected we can address the issue before our network or your server is affected.
- Support Services
Engineers staff our data center 24 hours a day, 7 days a week, 365 days a year to manage the network infrastructure and oversee top-of-the-line servers that host our clients’ critical sites and services.



Joomla 1.6 Hosting - ASPHostPortal :: Media Manager Joomla 1.6

clock January 4, 2011 06:43 by author Jervis

The Media Manager is a longstanding feature in Joomla. It came over from the Mambo days. Between Joomla 1.0 and 1.5, not many changes were made to the Media Manager. Along the way, the Media Manager even lost functionality, when it lost the ability to upload multiple images at once.

Fortunately, the Media Manager has been granted a bit of love in Joomla 1.6. Let's take a look at some of the new features you can expect to find.

First, the location for the menu item for the Media Manager has changed, from the Site menu to the Content menu. Go to Content - Media Manager in the back end of Joomla, and you should see a screen like this:



The Media Manager is a longstanding feature in Joomla. It came over from the Mambo days. Between Joomla 1.0 and 1.5, not many changes were made to the Media Manager. Along the way, the Media Manager even lost functionality, when it lost the ability to upload multiple images at once.

Fortunately, the Media Manager has been granted a bit of love in Joomla 1.6. Let's take a look at some of the new features you can expect to find.

First, the location for the menu item for the Media Manager has changed, from the Site menu to the Content menu. Go to Content - Media Manager in the back end of Joomla, and you should see a screen like this:



- Legal extensions are the types of files that may be uploaded to the Media Manager, including images and files like PDFs, Office documents, etc.


- Maximum size is the maximum size of the file that may be uploaded. In this case, it's 10 MB. Remember that this is a Joomla restriction on file size. PHP may also restrict file upload size, so be sure to check PHP's settings if you are having trouble uploading large files.

- Path to file folder and path to image folder are the default paths for uploading files (like PDFs, Office documents, etc) and images within the Media Manager. Note the stories folder is gone! You can upload to the images folder directly.

- Legal image extensions (file types) means what kinds of files uploaded should be considered images (GIF, JPG, PNG, etc).

- Enable Flash uploader means to turn on the capability to upload multiple images and files at a time.


Set "Enable Flash Uploader" to YES and click the Save button in the upper right. The bottom of the Media Manager screen will update to a new looking interface:

Browse files will let you browse to the right folder containing your images and files on your hard drive. Start upload will start uploading the files you've chosen to put into the Media Manager. Clear List clears the list of files to be uploaded and those that have already been uploaded.

Reasons why you must trust ASPHostPortal.com

Every provider will tell you how they treat their support, uptime, expertise, guarantees, etc., are. Take a close look. What they’re really offering you is nothing close to what ASPHostPortal does. You will be treated with respect and provided the courtesy and service you would expect from a world-class web hosting business.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added- benefits you can find when hosting with us:

- DELL Hardware
Dell hardware is engineered to keep critical enterprise applications running around the clock with clustered solutions fully tested and certified by Dell and other leading operating system and application providers.
- Recovery Systems
Recovery becomes easy and seamless with our fully managed backup services. We monitor your server to ensure your data is properly backed up and recoverable so when the time comes, you can easily repair or recover your data.
- Control Panel
We provide one of the most comprehensive customer control panels available. Providing maximum control and ease of use, our Control Panel serves as the central management point for your ASPHostPortal account. You’ll use a flexible, powerful hosting control panel that will give you direct control over your web hosting account. Our control panel and systems configuration is fully automated and this means your settings are configured automatically and instantly.
- Excellent Expertise in Technology
The reason we can provide you with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams. Our operations are based on a continual improvement program where we review thousands of systems, operational and management metrics in real-time, to fine-tune every aspect of our operation and activities. We continually train and retrain all people in our teams. We provide all people in our teams with the time, space, and inspiration to research, understand, and explore the Internet in search of greater knowledge. We do this while providing you with the best hosting services for the lowest possible price.
- Data Center
ASPHostPortal modular Tier-3 data center was specifically designed to be a world-class web hosting facility totally dedicated to uncompromised performance and security
- Monitoring Services
From the moment your server is connected to our network it is monitored for connectivity, disk, memory and CPU utilization – as well as hardware failures. Our engineers are alerted to potential issues before they become critical.
- Network
ASPHostPortal has architected its network like no other hosting company. Every facet of our network infrastructure scales to gigabit speeds with no single point of failure.
- Security
Network security and the security of your server are ASPHostPortal’s top priorities. Our security team is constantly monitoring the entire network for unusual or suspicious behavior so that when it is detected we can address the issue before our network or your server is affected.
- Support Services
Engineers staff our data center 24 hours a day, 7 days a week, 365 days a year to manage the network infrastructure and oversee top-of-the-line servers that host our clients’ critical sites and services.



About ASPHostPortal.com

We’re a company that works differently to most. Value is what we output and help our customers achieve, not how much money we put in the bank. It’s not because we are altruistic. It’s based on an even simpler principle. "Do good things, and good things will come to you".

Success for us is something that is continually experienced, not something that is reached. For us it is all about the experience – more than the journey. Life is a continual experience. We see the Internet as being an incredible amplifier to the experience of life for all of us. It can help humanity come together to explode in knowledge exploration and discussion. It is continual enlightenment of new ideas, experiences, and passions

Corporate Address (Location)

ASPHostPortal
170 W 56th Street, Suite 121
New York, NY 10019
United States

Sign in