Showing posts with label Joomla. Show all posts
Showing posts with label Joomla. Show all posts

Monday, December 12, 2011

joomla how to remove js

By default joomla have some default js. Some time we need to remove the default js. last week my friend asked me to remove mootools.js in his project i searched via the Best Friend (Google) and i got some idea. Here is the solution to remove mootools from joomla

$document =& JFactory::getDocument();
foreach ($document->_scripts as $key=>$val) {
if (stripos($key, 'mootools.js') !== false) {
unset($document->_scripts[$key]);
}
}

Similar way we can remove any js , just replace with 'mootools.js' with 'yourjsname'.

Tuesday, June 28, 2011

Filelist params in joomla

In joomla we have the options to add the params in all extension, based on this params setting we can controll our extenstion output. Here we going to see about list your component layouts using file list params

<param name="layout_file" type="filelist" default="default" label="Select a layout" description="" directory="administrator/components/your_component/views/your_view/tmpl" filter="" exclude="" stripext="" />


This will list your layouts in that view.

stripext : set to 1 to strip the file extension in that list

exclude  : a regular expression will exclude the files from the list.

filter : a regular expression to filter on lists all files based on extension.
(eg) filter=?\.html$?



Wednesday, May 18, 2011

Dynamic positions in joomla template

In joomla one of the best extension is template, in template we can add number of position based on our site requirements. Here i am going to explain how we add/remove positions dynamically based on content. if you need to display the position only in that position module have content. Here is the easy way to do it


$doc =& JFactory::getDocument(); 
$buffer=$doc->getBuffer( 'modules', 'positionname', array());

if (!empty($buffer)) {
<jdoc:include type="modules" name="positionname" />
}

based on the above code you can easily enable or disable the position dynamically in joomla template.
(ex)

$doc =& JFactory::getDocument();
$buffer=$doc->getBuffer( 'modules', 'right', array());

if (!empty($buffer)) {
<jdoc:include type="modules" name="right" />
}

if the right position modules content not empty mean right position will load in your template similar to other postion.

Monday, May 9, 2011

Joomla1.6 installer xml changes

Compare to joomla 1.6 with joomla 1.5 they changed the parameters defined way in xml file. These changes apply to all extensions modules, plugins, component etc..


Here i going to list out the XML parameters changes

  1. <params> replaced with <config><fields name="params"><fieldset name="basic">
  2. <param> replaced with <field>
  3. <install replaced with <extension
    (ex) <extension type="module" version="1.6.0" client="site" method="upgrade">
These are basic changes done in joomla1.6 xml params compare to joomla1.5.

Sunday, April 24, 2011

Remove lock in joomla articles

In joomla some time we get lock image in article ,category , modules etc..

if it locked mean some one other than you using it or it not closed by prober way. In joomla 1.6 have option as "Check in" button at the top of the listing page, we can just check what are the things need to unlock it and click the button then the lock will removed.

In joomla1.5 we don't have that option but we can do it by a query , just rest the 'checked_out' filed to '0', then the lock will removed.

for example if you got your article locked but no one accessed that mean , just run this query

update jos_content set checked_out=0 where id = your_article_id;


if you want to apply this to all mean just remove the where that's it.

Thursday, April 21, 2011

How to recover joomla user password?

Before couple of days i working in my local joomla i just update my account , but i forgot the new password.
Then i go to the backend and reset with new password. But i am searching in google for reset the admin password because if forgot the admin password mean it some thing hard .

Finally i got the solution from joomla doc here they give the detail about how to reset the admin password both to joomla1.6 and joomla1.5.

if you want more detail please see the How do you recover joomla user password?

Thursday, April 14, 2011

Three important position in joomla template

There are four main extensions in joomla.
  1.  Component
  2. Module
  3. Plugins
  4. Template
Here i am going to discuss about template. Template change the way of presenting your sites. You can split the page with number columns (left, right, middle) and rows (header, content, middle). In joomla we have a future to load the content using jdoc. Using jdoc you can position the above there extensions(Component, module and plugin) output. Using jdoc you can easily set it.

How to add jdoc?
            There is no magic for this , you can add it via a simple HTML type notation.

<jdoc:include type=”specifictype”/>

Here I list out what are the important jdoc types
1.      Head
2.      Message
3.      Component

These three element should appear only one time in page.

Head:
            Header jdoc this will add with in <head>….</head> tag. This will load the meatadata, style and scripts.

<jdoc:include type=”head”/>

Message:
            This will used to render errors in each request. Using this we can display the error, notice and warning messages from mainframe redirect/enque messages.

<jdoc:include type=”message”/>

Component:
            Component act a main roll in joomla. You can render the component output using this jdoc

<jdoc:include type=”component”/>

Please reply your feedback in comments.




Sunday, February 27, 2011

How to install joomla1.6?

                Last month joomla release new version there 1.6 production version of joomla. Here I am going to explain how to install it in local.

Requirements
------------------
         
Here the list individual requirements need for joomla1.6 installation.
*) PHP    5.2+
*) MYSQL 5.0.4+
*) Apache 2.x+

For local installation we can use any one off the following , it easy and quick way to set the joomla requirements.
*) LAMP (Linux)
*) MAMP (Macintosh)
*) XAMPP (Multi-platform)

 For more details about joomla requirements please click here   http://www.joomla.org/technical-requirements.html .

Steps to install joomla1.6
--------------------------------
          *)Download latest joomla1.6 version
if you sure the above requirements ok with your local then just download the latest joomla version, you can get the current joomla1.6 version from http://joomlacode.org/gf/project/joomla/frs/?action=FrsReleaseBrowse&frs_package_id=5696

*) extract ( unzip)  the file
Just extract the downloaded file and rename it as what you want here I am going to use “joomla1.6” to the folder name.

*)  copy the extracted folder to your php installed path.
          If you use wamp in windows mean just go the installed directory path (ex) E:\wamp\www  past it and set the write permission to that folder .

NOTE : don’t forget to start apache

*) start installation
          just run this in you browser (http://localhost/joomla1.6/) and give the required details on it.

NOTE: if you get blank page, please view this localhost give blank page

*) After installation just delete/rename the  installation folder in joomla1.6.

Now you can enjoy with joomla1.6

Please fell free to post comments.

Saturday, February 26, 2011

joomla1.5 advanced tips

         Here we going to see some of the advanced concepts in joomla1.5.


USE OTHER COMPONENT LANGUAGE FILE:
-----------------------------------------------------------

         In joomla we have the option to maintain separate language file for each component.if you want to use other component language file to your component here is the solution for that.we can able to controll it by using JFactory class

$lang = JFactory::getLanguage();
$lang->load('component_name');
echo $lang->_('LANGUAGE_KEY');

No need to use JText for this.

INCLUDE OTHER MODLE TO YOUR VIEW:
---------------------------------------------------------

  By default joomla we can able set a single model to particular view, but we need to call some function that one not avail in another one model mean , need to just include the model and create the instant for that using this JModle::addIncludePath()
JModel::addIncludePath( 'Model path' );
        $model           =JModel::getInstance( 'type', 'prefix for model class name');
        $return            =$model->getYourFuctionName();



LOAD MODULE WITH IN CONTENT AREA:
--------------------------------------------------------

joomla1.5 have defaule plugin do render the module with in your content area.You can call any module position in a content item.

(ex)  {loadposition yourpositionname}

Thursday, February 24, 2011

joomla1.6 module changes from joomla1.5?

Joomla1.6 give much facilities to site administrator and also front end customers.here i am going to give some detail about joomla1.6 changes

Module changes:
    *) module publish date selection option

    joomla1.6 have great future in module, using joomla1.6 we can able to publish the module at particular time.(ex) if you want to display a score or some content at particular time we no need always depend on article.
yes joomla1.6 have option to set publish start and end date to module.

    *) except menu selection option

 joomla1.6 also add one of most joomla dream concept to modules, that was except menu selection option to modules.using that we can set where we don't need to load the module.

  *) language selection option

     in joomla1.6 we can able to select the language to the module

  *) advanced params
         cache time settings and also layout selection option.
          layout selection option we can easily select  the layout from module params. layouts listed based available layout files for that modules.




How create new user group in joomla1.6

Here i am going to step by step instruction to create a new user group in joomla1. in joomla1.5 and it later version we don't have this option.

   1.  go to administrator page

  2 . login with your superadmin user

   3. After login select "Users" ->  'Groups' -> 'Add New Group'













   4. Add your group name and your parent Group and click save and close it.

 

 now you successfully added new user group to your site


Thursday, February 17, 2011

joomla1.6 database changes from joomla1.5?

here i am going to give some detail about joomla1.6 database changes compare to joomla1.5.

in joomla1.6 they introduce new query builder class. that class allow you to develop better understandable query format rather than normal query.

in joomla1.5 we can build the query like this:

$db = JFactory::getDbo();
$db->setQuery(
'SELECT *'.
' FROM #__menu'.
' WHERE published = '.(int) $published.
' AND id = '.(int) $ItemId.
);


in joomla1.6 we can build using the new query class:

$db = JFactory::getDbo();
$query = $db->getQuery(true);

$query->select($db->nameQuote('link'));
$query->from($db->nameQuote('#__menu'));
$query->where($db->nameQuote('published') . '=1');
$query->where($db->nameQuote('id') . '=' . $db->quote($itemid));

Thursday, November 25, 2010

image gallery for joomla

Lots of component and modules are available in joomla for image gallery.Phocagalery is best of that. i have used the phocagallery in my projects.it was very easy use.

More detail for phocagalley available in http://www.phoca.cz/phocagallery.

if you have any doupt please feel free to ask me

Thursday, November 18, 2010

How to add openx add in joomla?

Openx having module for joomla site. you can download the module from here and also having detail explanation how to use this module.