Monday, December 26, 2011

Magento Database Interaction

require_once 'app/Mage.php';
Mage::app('default');

$write = Mage::getSingleton('core/resource')->getConnection('core_write');
$readresult=$write->query("SELECT product_id, category_id FROM catalog_category_product ORDER BY product_id");
while ($row = $readresult->fetch() ) {
$write2 = Mage::getSingleton('core/resource')->getConnection('core_write');
$readresult2=$write2->query("SELECT sku FROM catalog_product_entity WHERE entity_id = ".$row['product_id']." LIMIT 1");
while ($row2 = $readresult2->fetch() ) {
$sku = $row2['sku'];
}
".$sku."echo $row['product_id']."
";

}

Sunday, December 25, 2011

Create a Global function in Magento

This code will allow you to add a function that can be called from anywhere within Magento. It extends the helper class

1) Create a file named ‘Mycode.xml’ and copy it to app/etc/modules/ – it should look like this:

 version="1.0"?>             true    local         

2) Create the directory
app/code/local/Mycode/Function/etc
and then create a file named ‘config.xml’
In it copy:

 version="1.0"?>                              1.0.0                                                              Mycode_Function_Helper                                 

3) Create the directory
app/code/local/Mycode/Function/Helper
and then create a file named ‘Data.php’
In it copy:

   class Mycode_Function_Helper_Data extends Mage_Core_Helper_Abstract {    public function test(){    return 'works';    }   }

You can now call this function like so

         echo Mage::helper('function')->test();      ?>

Sunday, November 28, 2010

Magento development help

Magento Admin Login Problem

comment few lines in following files to solve the admin login problem.

app\code\core\Mage\Core\Model\Session\Abstract\varien.php

$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()

then clear cache from var/cache folder

It will work ------------


Magento Home page Layout settings

Go to Admin Panel ->CMS->Pages

Here you can edit XML description .

Tutorial: Setup a new custom theme for your new Magento store



1.Upload these folders to your website:
/skin/frontend/default/NewTheme /app/design/frontend/default/NewTheme
Your folder will be called something other than gNewThemeh.


2.Login to the Admin


3.Navigate to System > Configuration > Design


4.Under the Themes section:
Type the name of your name theme in Templates, Skin and Layout. In this example the name of our theme would be NewTheme.
Type default in the Default textbox
Click Save Config at the top of the screen
Congratulations your new theme is now ready to go!

How to see block structure in front end

We can manage this from admin panel


Go to admin->system->configuration ->developer

select Main website view in Current Configuration Scope:

Under debus section select template path as yes.

it will show the folder structure in front end

Add Home Link with functional active state to Menu Bar (Alternative Method)

Find the file called top.phtml in app/design/frontend/default/yourtheme/template/catalog/navigation/ and make the following change:
  1. class="header-nav-container">
  2. class="header-nav">
  3. class="no-display">
  4. class="home">"getUrl('')?>">








Add Category listing in left sidebar



CATEGORIES



Add Information Pages in left sidebar


getChildHtml() ?>

renderCategoriesMenuHtml(0,'level-top') ?>
getCollection(); ?>


INFORMATION


Add Manufacturer dropdown

/public_html/app/code/core/Mage/Catalog/Block/manufacturer.php

class Mage_Catalog_Block_Product_Manufacturer extends Mage_Core_Block_Template
{
public function getAllManu() {
$product = Mage::getModel('catalog/product');
$attributes = Mage::getResourceModel('eav/entity_attribute_collection')
->setEntityTypeFilter($product->getResource()->getTypeId())
->addFieldToFilter('attribute_code', 'manufacturer');
$attribute = $attributes->getFirstItem()->setEntity($product->getResource());
$manufacturers = $attribute->getSource()->getAllOptions(false);
return $manufacturers;
}
}

In left sidebar


getAllManu() as $manufacturer): ?>




OR

MANUFACTURERS



addFieldToFilter('attribute_code', array('eq'=>'manufacturer'))
->addStoreLabel(Mage::app()->getStore()->getId())
->load();

foreach($collection as $a){
$manufArray = $a->getSource()->getAllOptions(false);
foreach($a->getSource()->getAllOptions(false) as $option)
$manufArray[$option['value']] = $option['label'];
?>


Magento: Setup multiple currency shop


You can easily setup a multiple currency shop in Magento. By multiple currency shop, I mean giving the user to browse products in different currencies. Magento will provide a currency dropdown in category and product listing page. When you select your desired currency, the entire products price will be changed to your selected currency.

Here is a step-by-step procedure to setup multiple currency shop in Magento:-

- Go to System –> Configuration –> Currency Setup

- Under ‘Currency Options‘, select Allowed currencies.

The selected currencies will be displayed in currency dropdown in category and product listing page. Remember that your Base currency and Default display currency selection should also be selected in Allowed currencies.

- Click ‘Save Config‘ button.

- Go to System –> Manage Currency Rates

- Select Import Service. By default it is ‘Webservicex’.

- Click ‘Import‘ button. This will update the currency rates values.

- Click ‘Save Currency Rates‘ button.

- Go to category listing page. You will see currency selection dropdown list in left sidebar at top.

Now, user of your shop can browse product with price in their desired currency.

dditional Scenario:-

Suppose, you have two currencies (British pound and U.S. dollar) in your Magento shop. You also have two stores (Store A and Store B). You want to show British pound in Store A and U.S. dollar in Store B.

Here is the solution:-

- Follow the steps above to setup multiple currency Magento shop.
- You will have multiple currency shop.

- Follow these steps to show store specific currency:-

- Go to System -> Configuration -> GENERAL -> Currency Setup
- In left sidebar at top, you will see “Current Configuration Scope
- Select your desired store from the selection list
- Now, under “Currency Options“, you will see “Default Display Currency
- Select your desired currency from the selection list

You are done. In frontend, select the store for which you did the above changes. You will see the price in your desired currency.

Hope this helps. Thanks.




Currency drop down selector in header, Magento

Step 1: Create a new phtml file and directory


You will need to create a new directory, named “directory” and create a new file called “currency-top.phtml“:

/app/design/frontend/template/default/YOUR-TEMPLATE-NAME/template/directory/currency-top.phtml and write the following code in it :-

getCurrencyCount()>1): ?>






Step 2: Add curency code to directory.xml





Step 3: Add call to header file

getChildHtml('store_language') ?> //for showing language if you wish
getChildHtml('currency_top') ?>






Magento Framework Query

1.Where define database name,user name,and password of website

open magento folder

magento/app/etc/locale.xml

write in locale.xml









false






localhost
root
mysql_password
magento_demo
1








2)How to get the Current url path of any page in Magento

$currentUrl = $this->helper(‘core/url’)->getCurrentUrl();

3)How to get list of all categories in Magento

$categories = Mage::getModel('catalog/category')
->getCollection()

->addAttributeToSelect('*');

4)How to get name of all modules in present Magento Installation

$modules =Mage::getConfig()->getNode('modules')->children();

5)Problems in magento Installation

Most common problem during magento installation is timeout

problem which often occurs . A very simple solution to it is to open your php.ini and navigate to these lines

a)max_execution_time = 60

Change its value to 1800 and second line you will encounter is

max_input_time = 60

Change its value to 1800

Now reinstall magento and most probably time out problem will not trouble you

6)Adding javascript and css on pages ->The Magento way

$headBlock = $this->getLayout()->getBlock(‘head’);
$headBlock->addJs(‘anyfoldername/anyjavascriptname.js’);

7)removing javascript and css on pages ->The Magento way

jscalendar/calendar.js

$this->getLayout->getBlock(‘head’)->removeItem(‘js’, ‘calendar/calendar.js’);

8)Model query in magento or How to insert record in database in magento


class Sapera_Nag_Model_Nag extends Mage_Core_Model_Abstract
{
public function _construct()
{
parent::_construct();
$this->_init(‘nag/nag’);
}

public function nagmani()
{
$collection = Mage::getResourceModel(‘nag/nag_collection’);
$collection->getSelect()->where(‘status = ?’, 1)->order(‘title’);
return $collection;
}

public function nagVish($title,$nagin_title,$filename,$content,$status)
{
$write = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’);
$write->query(“INSERT INTO nag(title,nagin_title,filename,content,status,created_time,update_time)VALUES (‘”.$title.”‘,’”.$nagin_title.”‘,’”.$filename.”‘,’”.$content.”‘,’”.$status.”‘, ’2010-11-03 17:08:29′, ’2010-11-04 17:08:32′)”);
return $write;
}

public function nagVish2($title,$nagin_title,$filename,$content,$status)
{
$getModel=Mage::getModel(‘nag/nag’);
$getModel->setNaginTitle($nagin_title);
$getModel->save();
return $getModel;
}

public function getSortColorCategories() {
$collection = Mage::getResourceModel(‘vmfabriccolorcat/vmfabriccolorcat_collection’);
$collection->getSelect()->where(‘status = ?’, 1)->order(‘sort_order’);
return $collection;
}

public function getFabricPartImage($fabricId, $designId, $partId) {
$collection = Mage::getResourceModel(‘vmsuitfabricdesignimage/vmsuitfabricdesignimage_collection’);
$collection->getSelect()->where(‘fabric_id = ?’, $fabricId)->where(‘design_id = ?’, $designId)->where(‘part_id = ?’, $partId);
$data = $collection->toArray();
$fabricImage = (isset($data['items'][0]['filename'])?$data['items'][0]['filename']:”);
return $fabricImage;
}

}

9)-view query in magento or coding of action script in magento

__(‘Module List’) ?>



/*
This shows how to load specific fields from a record in the database.
1) Note the load(15), this corresponds to saying “select * from table where table_id = 15″
2) You can then just use the get(fieldname) to pull specific data from the table.
3) If you have a field named news_id, then it becomes getNewsId, etc.
*/

/* fetch all ID Record*/

$raj = Mage::getModel(‘nag/nag’)->nagmani();

foreach($raj as $ne){
echo $ne['nag_id'].’—’;
echo $ne['content'].’—
’;
}

/* fetch single ID Record*/
/*
$news = Mage::getModel(‘nag/nag’)->load(2);
echo $news->getNewsId();
echo $news->getTitle();
echo $news->getContent();
echo $news->getStatus().’——–1
’;

/*
This shows an alternate way of loading datas from a record using the database the “Magento Way” (using blocks and controller).
Uncomment blocks in /app/code/local/Namespace/Module/controllers/IndexController.php if you want to use it.

*/

/* record show single record from controller*/
$object = $this->getNag();
echo ‘id: ‘.$object['nag_id'].’
’;
echo ‘title: ‘.$object['title'].’
’;
echo ‘nagin_title: ‘.$object['nagin_title'].’
’;
echo ‘content: ‘.$object['content'].’
’;
echo ‘status: ‘.$object['status'].’
’;

/*
This shows how to load multiple rows in a collection and save a change to them.
1) The setPageSize function will load only 5 records per page and you can set the current Page with the setCurPage function.
2) The $collection->walk(‘save’) allows you to save everything in the collection after all changes have been made.
*/

$i = 0;
$collection = Mage::getModel(‘nag/nag’)->getCollection();
$collection->setPageSize(5);
$collection->setCurPage(2);
$size = $collection->getSize();
$cnt = count($collection);
foreach ($collection as $item) {
$i = $i+1;
$item->setTitle($i);
echo $item->getTitle();
}
$collection->walk(‘save’);

/*
This shows how to load a single record and save a change.
1) Note the setTitle, this corresponds to the table field name, title, and then you pass it the text to change.
2) Call the save() function only on a single record.
*/

$object = Mage::getModel(‘nag/nag’)->load(1);
$object->setTitle(‘This is a changed title’);
$object->save();

?>

10:) block query in magento

class Sapera_Nag_Block_Nag extends Mage_Core_Block_Template
{
public function _prepareLayout()
{
return parent::_prepareLayout();
}

public function getNag()
{
if (!$this->hasData(‘nag4′))
{
$this->setData(‘nag4′, Mage::registry(‘nag4′));
}
return $this->getData(‘nag4′);
}
}

11- controller coading in magento

class Sapera_Nag_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{

/*
* Load an object by id
* Request looking like:
* http://site.com/nag?id=15
* or
* http://site.com/nag/id/15
*/
if(isset($_REQUEST['submit']))
{
echo $title=$_REQUEST['title'];
echo $nagin_title=$_REQUEST['nagin_title'];
echo $filename=’index.jpg’;
echo $content=$_REQUEST['content'];
echo $status=$_REQUEST['status'];
echo $submit=$_REQUEST['submit'];
$rajh = Mage::getModel(‘nag/nag’)->nagVish($title,$nagin_title,$filename,$content,$status);
}
$nag_id = $this->getRequest()->getParam(‘id’);
if($nag_id != null && $nag_id != ”) {
$nag = Mage::getModel(‘nag/nag’)->load($nag_id)->getData();
} else {
$nag = null;
}
/*
* If no param we load a the last created item
*/
if($nag == null) {
$resource = Mage::getSingleton(‘core/resource’);
$read= $resource->getConnection(‘core_read’);
$nagTable = $resource->getTableName(‘nag’);

$select = $read->select()
->from($nagTable,array(‘nag_id’,'title’,'nagin_title’,'content’,'status’))
->where(‘status = ?’,1)
->order(‘created_time DESC’) ;

$nag = $read->fetchRow($select);
}
Mage::register(‘nag4′, $nag);

$this->loadLayout();
$this->renderLayout();
}
}

11-Short path for site folder

1-media url= pup/media:-

img src=”{{media url=”buying.png”}} http://uni-50.com/pup/media/buying.png

————————
2-store url= pup/index.php/nag

  • Product Item


  • http://uni-50.com/pup/index.php/nag

    12:-How to know whether a customer is logged in or not

    Answer) the code below will give a boolean value which will tell whether customer is logged in. The advantage of code is it can be used in all files of magento to get whwther a customer is logged in or not

    Mage::getSingleton(‘customer/session’)->isLoggedIn();

    13)Retrieve Customer’s name which is login

    The query below will give you name of customer which is logged in.The advantage of code is it can be used in all files of magento to get whwther a customer is logged in or not

    Mage::helper(‘customer’)-> getCustomerName();

    14)How to know whether Paypal Module is Enabled or not
    The below code tells whether paypal module is enabled or not
    $modules =Mage::getConfig()->getNode(‘modules’)->();$modulesArray =(array)$modules;
    if(isset($modulesArray['Mage_Paypal')){
    echo "Paypal module exists.";}else{
    echo"Paypal module doesn't exist.";
    }
    This code is to be placed inside a block tag in xml whereever appropriate

    15)How to get current category object and current product object in magento coding

    By below code we can get current category object and then we can get various parameters

    Mage::registry('current_category');

    By below code we can get current product object and then we can get various parameters

    return Mage::registry('current_product')

    Sometimes you may want to change default text in Magento, for example from "My cart" to "My basket", or even change the text into your native language.


     





    Sometimes you may want to change default text in Magento, for example from "My cart" to "My basket", or even change the text into your native language.

    16)How to enable translate Inline option and it's use in magento

    In Magento you can do that easily with a built-in tool: Translate inline. It enables you to make dynamic changes to default text without spending hours working with lines of code.
    To enable Translate inline text, firstly, go to Admin panel ->System ->Configuration ->Developer ->Translate inline.
    Then select Yes for Enable for Frontend
    Now go to frontend and refresh the page. You should see red dotted lined around the text Roll mouse over them, a book icon will appear. Click on this and an editor lightbox window will pop up. Change the text as you want and click “submit”. After that, refresh the page. Remember that if your magento site is in other languages, you should tick Store View Specific.
    And you’ve all done.

    17)How to use collection functions in magento ?

    or

    How to write database query interacting magento ?

    Here some database interaction functions present in the class Mage_Eav_Model_Entity_Collection_Abstract. These collection functions are used to select data from Magento database.

    $collection = Mage::getModel('catalog/product')->getCollection();
    Now if we want to select all attributes :-
    $collection->addAttributeToSelect('*');
    Now if we want to select some specfic attributes
    $collection->addAttributeToSelect(''name', 'url_key', 'color');
    Now we want to give some condition like to produce a collection with status equals to one
    select only those items whose status = 1
    $collection->addAttributeToFilter('status', 1);
    Using Like statement in select queries
    $collection->addAttributeToFilter('sku', array('like' => '%ogi%'));
    Using greater than command in select
    $collection->addAttributeToFilter('id', array('gt' => 15));

    18)How to write custom sql queries in magento ?
    By the below way we can write custom sql queries for select
    query
    getConnection('core_read');
    $query = 'SELECT * FROM ' . Mage::getSingleton('core/resource')->getTableName('catalog_product_entity');
    $results = $read->fetchAll($query);

    print_r($results);
    19)How do we move a certain Block in magento from one position to other

    This article is written for newsletter block and can be applied simlarly for various other magento blocks.By viewing the following guideline, you can change the position of block newsletter from 'left' to 'right', 'footer' to 'header' or 'right' to 'left' and viceversa. The changes are all carried out within the layout.xml located in app\design\frontend\default\your theme\layout\newsletter.xml
    1. You just change the reference name from ‘left’ to ‘right’, or ‘right’ to 'left'


    2. Move block newsletter to 'footer' or 'header'
    Fistly, you change the reference name to 'footer' or to 'header'
    The code is something like




    Now you can change refrence name to right , top etc:-

    20)How to Enabling Template path hint and block hints

    One very useful way of debugging magento code is to enable path hints for blocks and template. By enabling it we will be able to some hint with red background and white text with template path hint on left of a block and on right path of block name responsible for generating the block
    Now we come to how to achieve it. we log in to admin by proper credential then on top menu click on "system" and a dropdown pops up and go extreme down to click "configuration". Then after page opens see the left vertical menu and go extreme down and click on
    "developer". then a page loads with certain options. Now go to "Current Configuration Scope" at top left and in that dropdown choose your websites store view. Now on right clicon debug and change the value of "Template Path Hints" and "Add Block Names to Hints" to yes by drop down and clear the cache and then open index.php of your website

    Tuesday, August 17, 2010

    Joomla Interview Questions

    Question : What are plugins?

    In Joomla 1.5 mambots will be renamed plugins.
    Plugins: The new name for mambots. In addition, some 3rd party components, modules and mambots themselves have plugins. is a small, task-oriented function that intercepts content before it is displayed and manipulates it in some way.

    Question : What are Joomla modules?

    Modules extend the capabilities of Joomla! giving the software new functionality. Modules are small content items that can be displayed anywhere that your template allows it to be displayed by assigning them to positions and pages through the module manager in the administrative interface.
    Modules are installed in the Admin Section. Joomla! modules may include: Main Menu, Top menu, Template Chooser, Polls, Newsflash, Hit Counter, etc.
    Members of the Joomla! Community produce Joomla! modules on a continuous basis.

    Question : What are Joomla components?


    Content elements or applications that are usually displayed in the center of the main content area of a template. This depends on the design of the template in use.
    Components are core elements of Joomla!’s functionality. These core elements include Content, Banners, Contact, News Feeds, Polls and Web Links.
    Members of the Joomla! community produce third party Joomla! components on a continuous basis.
    They are freely available to download from http://extensions.joomla.org/ and a number of other web sites.

    How do I eliminate the pathway or breadcrumbs?

    An example is as follows; You are currently reading a content item "New Page". This content item is a member of the "Pages " category. In the turn the pages category is a member of the "Books" section. In this case the breadcrumb for that page would look like: "Home >> Books >> Pages >> New Page".


    If you wish to eliminate the pathway entirely, edit your template html (index) file. Usually it will look like this:




    Question : How do I remove the page title from the front page of my site?

    To remove the title from being displayed on the front page of your site, you need to change a parameter setting in the front page component.

    ► First log into the administrative back end.
    ► On the top menu click "Menu"->"mainmenu"
    ► Click "Home".
    ► On the right side of the screen in the parameters section, locate the “Page Title” parameter that is next to the radio buttons “Show” and “Hide”.
    ► Click the “Hide” radio button.
    ► Click the “Save” button to make your change permanent.

    Question : What determines what is shown on my frontpage?

    Frontpage is a component that is part of the core of Joomla!, like the front page of a newspaper, it shows (usually) multiple pieces of content arranged in some way.

    When you install Joomla! the front page component is by default set as the homepage of your site (that is it is the first link on your Main Menu) but front page does not have to be your "home" page.

    What exactly appears on the front page and how it is laid out is controlled in two ways. First, if you open the menu link in your menu manager in the backend there are numerous parameters that control the number of items shown, the number of columns etc.

    To control which items are shown you must also indicate that an item should be placed on the front page by editing the parameters for the content item. In the backend this will be indicated by a check mark in the front page column of the list of content items.

    In addition, you can use the front page manager (in the content menu of the backend) to control the publication dates and other variables for content items that are on the front page.

    Question : How do I change the favicon?

    The joomla favicon is stored in the /images folder. The file is called favicon.ico. By definition a favicon must be 16x16 pixels.
    If you wish to use your own favicon, rename the default joomla favicon.ico file and put your file with that name in the images directory.

    Alternatively, you can change the favicon in the Joomla! global configuration Site tab (on the bottom).

    Question : What are positions in Joomla?

    Site templates divides the "pages" displayed on a site into a series of positions, each with a different name.

    You can view the location of positions in your default template from the administrator go to Site =>Preview=>Inline with Positions.

    You can annotate your positions through the administrator (backend). Go to Site=>Template Manage=>Module Positions.

    You can add or remove positions by modifying your template html.

    You assign a module to a position using the module manager.

    Modules=>Site Modules
    On the left side of the page, on the third line, there is a drop down menu that lets you select the position.

    How do you install an extension?


    From the backend of your joomla site (adminsitration) select Installers and then the type of extension (module, component, mambot/plugin, site template, administrative template, language
    -Browse for the package file
    -Click the install icon
    -Follow any instructions

    Sometimes you cannot use the automated installer. For example, very large extensions may exceed the maximum upload size allowed by your host.

    In this case, unzip all of the files locally. Then transfer the files to a folder in the the install directory(for example administrator/components/com_installer/components) for the type of extension you are installing (using FTP). Then use the installer, but select "install from directory" indicating the correct folder name.

    Question : What determines my homepage?

    Your "homepage" in a traditional html site--the page that shows when you type mydomain.com for example-- would be the page displaying that is in the index.html file.

    Jooma! is a database driven CMS so it does not have html pages, but rather pulls up the pieces of pages from a mysql database.

    The "page" that shows when a user navigates to mydomain.com is the page created by clicking on the first link on the Main Menu. The link can be called anything (Home, Bob it does not matter), that is the page that will show.

    Question : Can content items be assigned to multiple categories or sections?


    No, content items cannot be assigned to multiple categories or sections.
    This menu can be displayed anywhere and can be displayed vertically or horizontally or not at all. The menu does not even need to be published.

    When you installl Joomla! by default it has a menu link to the frontpage component as the home page. However, any content or component or other link can be used as the "home" page.

    How do I link from inside content to another content item?

    The simple answer is that you get the URL for the page you want to link to. Then you make a link using whatever editor you are using or with html if you have nowysiwyg.

    The more complicated answer is that some editors have fancier links managers. For example with the JCE editor you can add the advanced linking plugin and it will give you nice lists of static and other content types to pick from.


    Question : How do I change the image(s) in my template?




    One common template change is to use your own graphic/image. Simple graphics (not banners) are linked in the html file. Simply change the reference to the image of your choice in the html file of your template. In the adminsitrative interface do this by going to Site =>Template manager and then selecting your template. Click the icon for html.

    Keep in mind that it if it is a different size than the original image this may change the appearance of the site in unexpected ways.

    Additional information:

    The images for a given template are generally located in this folder:
    /templates/templatename/images (Substitute the name of the template you are using in place of "templatename").

    A trick for finding the name of the image is to put your cursor over it and click right. Select view image. This will display the image and give its full url. Sometimes the images are background images. This is viewable in Firefox or you can look for the background tag in your page source.

    How to upload an image:

    There are many ways to upload images. Which one you use will depend on your host and server.
    1. You can use an ftp client.
    2. You can use a cpanel file manager.
    3. You can use the media manager.
    4. You can use various extensions that allow uploading, including joomlaexplorer and galleries.

    Question : What do the locks mean? How do I get rid of them?

    At any given time you may see a padlock next to a specific item in Joomla!'s administrative backend. These padlocks may be displayed next to any of the following (Content Items, Menu Items, Modules, etc).

    The Joomla! system places these padlocks next an item to indicate that a user is currently editing (checked out) the item. The lock is removed by the sytem when the user clicks on the "Save" button for that item.
    If the user never clicks save and instead hits the "Back" button or naviagtes to another page, then the item stays locked. If another user needs to work with the item he or she must have the item checked back in before the can work.

    There are two ways of checking items back in. One way is to contact the person that has the module checked out to see if they are done with the item.

    The other option utilizes the administrative back end;
    Click on "System => Global check in"
    This option should be used very carefully, especially in multi-user environments. This single action checks in all previously checked out items, whether they were checked out by you or not. Possible undesirable side effects may be that multiple editors end up working on the same document.
    In this case who ever clicks the save button last has their version saved as the final copy.

    Question : How do I exit the wrapper?

    The page that contains the link you click on to load the wrapped content is the parent page.
    You can get out of the wrapper by clicking on anyone of the links in the menu of the parent page.
    If there are no other menu items visible then the wrapper may have been loaded directly into the parent page, replacing the content that was initially there.
    This however defeats the purpose of having a wrapper which is a means of simply enclosing content from another site within the parent site.

    Question : What are mambots and plugins?

    A Mambot is a small, task-oriented function that intercepts content before it is displayed and manipulates it in some way. Joomla! provides a number of Mambots in the core distribution, e.g. WYSIWYG editors, but there are many other mambots available for specific tasks.
    Some 3rd Party developer components have their own mambots which need to be installed in order to make the component work properly. In Joomla! 1.5 mambots will be renamed plugins.
    Plugins: The new name for mambots. In addition, some 3rd party components, modules and mambots themselves have plugins.



    Oops in PHP

    Inheritance:

    Inheritance revolves around the concept of inheriting knowledge and class attributes from the parent class. In general sense a sub class tries to acquire characteristics from a parent class and they can also have their own characteristics. Inheritance forms an important concept in object oriented programming.

    Polymorphism

    This ability of different objects to respond, each in its own way, to identical messages is called polymorphism.
    Polymorphism results from the fact that every class lives in its own name space. The names assigned within a class definition won't conflict with names assigned anywhere outside it. This is true both of the instance variables in an object's data structure and of the object's methods:

    UML

    UML or unified modeling language is regarded to implement complete specifications and features of object oriented language. Abstract design can be implemented in object oriented programming languages. It lacks implementation of polymorphism on message arguments which is a OOPs feature.

    Data Abstraction

    Data Abstraction increases the power of programming language by creating user defined data types. Data Abstraction also represents the needed information in the program without presenting the details.

    Overriding

    Overriding polymorphism is known to occur when a data type can perform different functions. For example an addition operator can perform different functions such as addition, float addition etc. Overriding polymorphism is generally used in complex projects where the use of a parameter is more.

    Method:

    A method will affect only a particular object to which it is specified. Methods are verbs meaning they define actions which a particular object will perform. It also defines various other characteristics of a particular object.
    15) Name the different Creational patterns in OO design?
    There are three patterns of design out of which Creational patterns play an important role the various patterns described underneath this are: -
    1) Factory pattern
    2) Single ton pattern
    3) Prototype pattern
    4) Abstract factory pattern
    5) Builder pattern

    Overloading

    Overloading is one type of Polymorphism. It allows an object to have different meanings, depending on its context. When an exiting operator or function begins to operate on new data type, or class, it is understood to be overloaded

    Overloading is polymorphism. In this we use more than one same name function but with different parameter value.For example:

    read(int a){
    ...........
    }
    read(int a, int b){
    ........
    }
    This kind of definition is called overloading, where function is same but having different parameters.
    Now, when the read() will required, the passed arguments will match with present read() functions.

    Example:

    read(5);

    if it will passed it will matched with the first read() i.e. read(int a);

    OOPS and object:

    Different kinds of objects often have a certain amount in common with each other. Mountain bikes, road bikes, and tandem bikes, for example, all share the characteristics of bicycles (current speed, current pedal cadence, current gear). Yet each also defines additional features that make them different: tandem bicycles have two seats and two sets of handlebars; road bikes have drop handlebars; some mountain bikes have an additional chain ring, giving them a lower gear ratio.

    Object-oriented programming allows classes to inherit commonly used state and behavior from other classes. In this example, Bicycle now becomes the superclass of MountainBike, RoadBike, and TandemBike. In the Java programming language, each class is allowed to have one direct superclass, and each superclass has the potential for an unlimited number of subclasses:

    Constructor:

    yes we can implement oops in cell phones through concept called constructor.Wen we create object constructor is automatically invoked llly wen pone is witched off automatticallly a signal is sent to nework

    Abstraction:

    Abstraction can also be achieved through composition. It solves a complex problem by defining only those classes which are relevant to the problem and not involving the whole complex code into play

    Class:

    Class describes the nature of a particular thing. Structure and modularity is provided by a Class in object oriented programming environment. Characteristics of the class should be understandable by an ordinary non programmer and it should also convey the meaning of the problem statement to him. Class acts like a blue print.

    Object:

    An object is a combination of messages and data. Objects can receive and send messages and use messages to interact with each other. The messages contain information that is to be passed to the recipient object.

    Encapsulation :

    To design effectively at any level of abstraction, you need to be able to leave details of implementation behind and think in terms of units that group those details under a common interface. For a programming unit to be truly effective, the barrier between interface and implementation must be absolute. The interface must encapsulate the implementation--hide it from other parts of the program. Encapsulation protects an implementation from unintended actions and inadvertent access.

    Function:

    Function overloading is essential to allow the function name (for example the constructor) to be used with different argument types.