Wednesday, December 16, 2009

Photoshop

Basics

http://www.we-r-here.com/ps/index.htm

http://www.photoshop-plus.co.uk/2012/06/05/working-more-quicker-and-more-efficiently-in-photoshop/

Random Tutorials

http://www.tutorialized.com/tutorials/Photoshop/1

Create  a rectangle outline
  1. select rectangle tool in tool bar
  2. click workpath with pen(second one) from top tool bar
  3. draw rectangle  dragging mouse
  4. Ctrl ENTER
  5. Select Edit > >  Stroke
  6. Set width and color
  7. Ctrl D to deselect
Drawing glowing rays

http://www.psdgraphics.com/tutorials/windows-7-wallpaper-photoshop-tutorial/2/
    Blend modes:http://www.northlite.net/ps/blend.htm

      Friday, November 27, 2009

      xcart

      database values are in config.php

      # $sql_host - DNS name or IP of your MySQL server;
      # $sql_user - MySQL user name;
      # $sql_db - MySQL database name;
      # $sql_password - MySQL password.



      usual work flow of authenicated pages is
      require "./auth.php";
      auth.php  includes the following

      @include_once "./top.inc.php";
      @include_once "../top.inc.php";
      @include_once "../../top.inc.php";
      if (!defined('DIR_CUSTOMER')) die("ERROR: Can not initiate application! Please check configuration.");

      require_once $xcart_dir."/init.php";

      important function x_load defined in include/func/func.core.php
      it includes file like this
      x_load("backoffice");
      includes include/func/func.backoffice.php

      template engine is smarty

      Password encryption is done in function text_crypt in includes/funct/func.crypt.php

      Thursday, November 12, 2009

      Wednesday, November 11, 2009

      Jomsocial

      documentation(http://www.jomsocial.com/docs.html)
      FAQ(http://www.jomsocial.com/docs/Pre_sales_FAQ)
      demo(http://www.jomsocial.com/community.html)

      user perspective http://www.jomsocial.com/docs/User_guide
      the following are the main functionalities available in default jomsocial component in users perpective
      1.add as friend
      2.add photos
      3.add videos
      4.write a private message
      5.list friends
      6.edit profile,change profile photo
      7.configure privacy settings
      8.show my updates to others
      9.create group
      10.wall
      11.adjust, arrange, remove, applications (http://www.jomsocial.com/docs/List_of_Applications)

      Monday, November 9, 2009

      Possible attacks on and from websites

      Iframe Attack

      Solution
      change permission of  php, htm, html , js and css files  to 444
      If you need to edit any file, first change its permission to 655
      once you completed the changes
       set the permission back to 444

      also check for joomla

      Bloodhound exploits  , link2

      htaccess,mod rewrite tips

      if your intention to code and decode mod_rewrite urls and handle it with php and mysql ,this should work

      to convert to url
      $url = preg_replace('/[^A-Za-z0-9_-]+/', '-', $string);


      And to check in mysql with the url value,use the same expression discounting '-'.first replace the url value  with php using preg_replace  and use with mysql REGEXP

      $sql = "select * from table where fieldname_to_check REGEXP '".preg_replace("/-+/",'[^A-Za-z0-9_]+',$url)."'"

      http://www.freewebmasterhelp.com/tutorials/htaccess/

      Error display
      php_flag display_errors on
      #E_ALL ^ E_NOTICE
      php_value error_reporting 2039

      condtional flag settings based on php version

      # PHP configuration values

      < IfModule mod_php5.c >
        php_flag register_long_arrays On
        php_flag register_globals On
        php_flag display_errors Off
      < /IfModule >

      < IfModule mod_php4.c >
        php_value session.use_trans_sid 0
        php_value register_globals 1
        php_flag display_errors On
        php_flag track_errors Off
      < /IfModule >

      enabling url rewrite
      RewriteEngine On
      RewriteBase /

      check for hostname
      #RewriteCond %{HTTP_HOST} ^myhostname\.com
      #RewriteRule (.*) http://www.myhostname.com/$1 [R=301,L] 


      Check for Query string
      RewriteCond %{QUERY_STRING} ^options\=(.*)$
      RewriteRule ^(.*)-p-(.*).html$ script.php?var=$2&%{QUERY_STRING}

      Rewrite  for file name
      RewriteRule ^(.*)-p-(.*).html$ redirect.php?var=$2%1

      Rewrite based on browser
      RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
      RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]



      password protection
      http://www.freewebmasterhelp.com/tutorials/htaccess/3

      Creloaded

      Commercial shopping cart
      http://www.creloaded.com/

      after downloading backup,
      import db
      edit path and db variables in
      configure.php
      includes/configure.php
      admin/includes/configure.php

      UPDATE `admin` SET `admin_password` = 'ac0501ee3073f680a3a77c66d8c3edb1:09' WHERE `admin`.`admin_id` =5 LIMIT 1 ;

      for setting password = 123456 as encrypted in function tep_encrypt_password($plain) in includes/functions/password_funcs.php

      SEF module
      Installation_and_Guide_To_PCI_Compliance_v_1.1.pdf 
      Shipping module development
      it is saved in should contain the functions l\includes\modules\shipping\ folder name of file and class should be same.should contain following functions
      1. constructor(same as classname)
      2. quote($method = '') :fucntion that returns the text and vlayues to display below shopping cart.should return in the format
        $this->quotes = array('id' => $this->code,
                                   'module' => titelOfTheShippingModule,
                                   'methods' => array(array('id' => $this->code,
                                                             'title' => $shipping_method,
                                                            'cost' => $shipping_cost)));
      3. check() : to check if this module is installed when shown in admin section,basically checks the configuration table
      4. install() :should enter values into configuration table .contains     
        tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('
      5. remove() : remove all entries in configuration table
      6. keys() : returns keys to be stored as 'configuration_key' in TABLE_CONFIGURATION,used in install,remove etc
      Should contain the following variables
      1.  $code, 
      2. $title,
      3. $description
      In admin its the admin/modules.php that handles(install/edit/remove) shipping modules

          Tuesday, November 3, 2009

          Virtuemart



          After installing with joomlapack
          Edit administrator\components\com_virtuemart\virtuemart.cfg.php
          define( 'URL', str_replace("/administrator/","/",JURI::base()));
          define( 'SECUREURL', str_replace("/administrator/","/",JURI::base()));

          Configuring for SSL

          To import install CSV Improved component






          How to display attributes on the browse page?

          Display selectable attributes on main browse page

          CLASSPATH is administraor/components/com_virtuemart/classes
          payment and shipping gateway files are in subfolders of this folder
          'Model'  files are in administraor/components/com_virtuemart/html
          'View files'(html files) are in /components/com_virtuemart/themes

          Attributes with Stock Control (Child and Parent Products),Advanced attributes,Custom Atrribute

          Monday, November 2, 2009

          javascript tips

          date picker with drop downs

          default values in textbox,they dissappear on focus 

          Syntax highlighter

          DOM basics 

          Style Object

          Regexp
          Email:
          function checkEmail(emailField) {
                      var email = emailField;
                      var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
                      return filter.test(email.value);
                  }

          check url:
          var filter = /^http(s?):\/\/(\w*)\.([\-\+a-z0-9]*)\.(\w*)/;
          Iframe handling

          String Trim : http://www.somacon.com/p355.php
          or as function trim in  http://www.webtoolkit.info/javascript-trim.html

          strip_tags  http://javascript.internet.com/snippets/remove-html-tags.html

          Popular javascript Frame works
          http://www.ajaxline.com/10-most-popular-javascript-frameworks
          http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks


          Modal Windows
          http://javascript.gakaa.com/window-showmodaldialog-4-0-5-.aspx


          Modal windows with frameworks
          http://www.designlabelblog.com/2009/03/20-ways-to-create-javascript-modal.html

          Sunday, November 1, 2009

          HTML/CSS tips

          Input box with rounded corners


          using this image as background


          /* Rounded Corner */
          /*Method 1 set the bg of the imput as the image itself.Drawback is that you should explicitly set the wiidth and height of the input box to match the size og the backgorund*/
          .tb5 {
              background:url(../images/bgd_input.gif) no-repeat ;
              height: 25px;
              width: 265px;
              color:#FFF;
              padding-top:5px;
              padding-left:5px;
          }



          HTML to use
          < input type="text" name="email" id="email"  class="tb5"/ >



          /*Method 2 put the input inside 3 nested divs.containerleft,container right,container as below.set bg of the input box to none.Using this method variable size inputs can have rounded corners*/

          #inputContainerLeft{
              background:url(../images/bgd_input.gif) no-repeat ;
              display:inline-block;
              background-position:top left;
              padding:0px 0px 0px 5px;
              margin:0px;
          }
          #inputContainerRight{
              background:url(../images/bgd_input.gif) no-repeat ;
              background-position:right top;
              display:inline-block;
              padding:0px 5px 0px 0px;
              margin:0px;
              height:30px;
              border:0px solid #FF0;

          }

          .halfInputContainer{
              background:none;
              color:#FFFFFF;
              margin-bottom:0px ;
              padding:5px 0px 5px 0px;
             
              border:0px solid #F00;
             
             
             
             
          }

          .halfInput{
              background:none;
              color:#FFFFFF;

              padding:0px;
          }


          HTML to use

          < div id="inputContainerLeft"   >
                 
                  < div id="inputContainerRight" >
                   
                 
                    < div class="halfInputContainer" >
                            < input type="text" name="mobile_no" size="10"  class="halfInput" / >
                      < / div >
                   
                   
                    < / div >
                  < / div >


          for IE6  you shoukld add this addtional block in the html page

          < !--[if IE 6] >   
          < style tpe="text/css" >
          .inputContainerRight{
               width=10px;   
             
          }
          < /style >
          < ![endif]-- >

          Thursday, October 22, 2009

          Magento

          CMS name:Magento http://www.siteground.com/tutorials/magento/
          http://www.magentocommerce.com/support/magento-user-guide-book/table-of-contents
          is based on Zend Framework http://framework.zend.com/

          Inno DB issue in wamp 2.4
          Download Url: 
          http://www.magentocommerce.com/download.

          System Requirements: http://www.magentocommerce.com/system-requirements
          Other Helpful links:


          Magento user's guide: http://www.magentocommerce.com/wiki/welcome_to_the_magento_user_s_guide
          Magento support: http://www.magentocommerce.com/support/overview
          Magento screencasts: http://www.magentocommerce.com/media/screencasts

          Good link :http://www.richardcastera.com/tag/magento/

          SVN details

          Class and interface documentation

          CMS Type:


          Installation: Install sample data into the first and then call magento url
          http://www.magentocommerce.com/knowledge-base/entry/magento-installation-guide
          http://www.siteground.com/tutorials/magento/magento_installation.htm

          Installation errors (protocol error http://,https etc) and database connection error
          www.magentocommerce.com/boards/viewthread/460305/#t467824
          http://www.magentocommerce.com/boards/viewreply/467822/
          if sample data is to be imported follow the steps below after installation

          drop database
          if table_prefix was set remove it (in app/etc/local.xml)
          After installation unzip magento-sample-data-1.2.0.zip,copy media folder into magento folder (overwriting the original one there) and import the sql file

          d:
          cd D:\wamp\bin\mysql\mysql5.1.33\bin
          mysql -u root  magento < magento_sample_data_for_1.2.0.sql
          default admin login is
          admin
          123123

          sample user in sample data

          john.doe@example.com
          123123


          Admin login issue

          with localhost/ admin login works only in opera
          to enable admin login in firefox follow the steps below(not worked yet though)

          http://www.nickbartlett.com/wordpress/magento-cannot-log-into-admin/
          http://web-funda.blogspot.com/2009/07/magento-admin-login-problem.html
          The solution is to add the following line to your hosts file so you can access your localhost as www.localhost.com.
          C:Windows\System32\drivers\etc\hosts (edit this file in notepad)
          127.0.0.1        magento.localhost.com www.localhost.com

          Other solutions
          http://asia-connect.com.vn/2009/04/after-installing-magento-cant-log-in-to-admin-panel/

          http://www.vinagento.com/blog/magento-tutorial/fix-admin-login-issue-when-install-magento-at-localhost/
          for magento 1.4

          edit app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
          replace 'httponly' => $cookie->getHttponly() with 'httponly' => false
           actually no need to change code .first time login with opera browser
          go to admin >>System>>Configuration >>Web>>Session Cookie Management
          set 'Use HTTP Only' to 'No'

          to get default store code:
          Mage::app()->getStore()->getCode();
           

          Demo store
          http://demo-admin.magentocommerce.com/

          admin
          http://demo-admin.magentocommerce.com/index.php/admin/
          admin
          123123

          Tips
          http://visionwidget.com/inspiration/web/374-free-magento-extensions.html


          Add addtional admin user to magento



          Whoops our bad issue when trying to access product details page in frontend
          Cache control is located in admin panel at System > >  Cache Management
          Set All Cache in Cache control to 'disable' and submit the form
          Magento: Clear the cache with PHP script.(not tested)

          Class files missing error

          Extensions folder

          Installing extensions from magento connect  through admin panel
          File permissions for magento connect

          Free Magento Template
          In case categories are not showing in this template
          1. check catalog.xml in \app\design\frontend\blank\lloyds\layout
          2. check the
            < reference name="top.menu" >
            < block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/ >
            < /reference >
          3. check if there is template/catalog/navigation/top.phtml
          4. if not copy the file from default template.
          Custom attributes as in virtuemart

          vide of custom attributes http://www.magentocommerce.com/magento-on-the-fly/custom-product-options/

          magento WSDL API (url of wsdl  in magento site is index.php/api/?wsdl)    example of export with soap
          http://www.magentocommerce.com/boards/viewreply/113901/
              First: I created a web services user in Admin -> Web Services -> Add new user
              Second: I created a new Role for that user in Admin-> Web Servivces -> Roles and gave it full access to all services.
              Third: I assigned that new role to the new user
              My Webservices user is “soaper” and the key or password is also “soaper”.
          overriding a model or block(customize part of a configuration)

          Add to cart with custom price based on attribues and Values
          add a field ringsize to table `sales_flat_quote_item`.
          ALTER TABLE `sales_flat_quote_item` ADD `osol_field_custom_size` VARCHAR( 10 ) NOT NULL 
          Product details page : app\design\frontend\default\default\template\catalog\product\view.phtml

          Product Item in list page:app\design\frontend\default\default\template\catalog\product\list.phtml
          add input box inside < ?php if($_product->isSaleable()): ? >(should edit for both // List mode and  //Grid Mode )

          add in \app\code\core\Mage\Core\Block\Template.php :class Mage_Core_Block_Template
          public function showCustomSize()
              {
                  ?>
                  Size : < input name="customSize" size="3" type="text" />

                      }

            in app\design\frontend\default\default\template\catalog\product\view.phtml
          add
          $this->showCustomSize() where needed
          http://magentodev.blogspot.com/2009/05/how-to-import-products-with-custom.html
          http://todd.be/notes/exporting-importing-magento-product-options

          To update products using Mage:getSingleTon('catalog/product')- >load($product_id)- >setSku('newSku')- >save();
          * Updated the core code (/app/code/core/Mage/Eav/Model/Entity/Abstract.php)  so it checks for a valid array on line 970.
          * Added the following call to the controller:

          Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

          http://www.magentocommerce.com/boards/viewthread/67133/ 

          dynamic product creation http://magentoexpert.co.uk/2009/02/10/creating-magento-products-on-the-fly/

          http://activecodeline.com/programatically-manually-creating-simple-magento-product

          http://ecommlab.com/21/how-to-import-images-into-magento/
           image management through admin
          changing product image sizes by editing code  and  this

          Delete all products




          Terminology:

          Tips: 
          1. Configuration:http://www.magentocommerce.com/wiki/how-to/customize_part_of_configuration
          2. Add Website:Admin > System > Manage Stores > Click Create Website
          3. Add Store:Admin > System > Manage Stores > Click Create Store
          4. To create a Role, navigate to System > Permissions > Roles and click Add New Role.
          5. Add Category, import category  summary (with images ),direct import with php and mysql
          6. Manufacturers : is added as attribute
            http://littleripplesproject.blogspot.com/2009/03/adding-new-manufacturer-field-to.html
          7. Add product
          8. Stock enabling and disabling  Configuration, and click on the 'Inventory' under 'Catalog' tab in the left column.
          9. Product Types : Simple,virtual,bundled,downloadable,  Configurable Products ,Grouped Products
          10. Attributes
          11. Tax :System> Configuration > Sales > Tax > Tax Classes > Tax Class for Shipping . video .importing
          12. discount: Admin > Promotions :forum thread
            - It is possible make discounts per customer
            - It is possible make discounts per product
            - It is possible make discounts by category
            - It is possible make discounts for the purchase value of a particular category
          13. coupon :article
          14. Customer Group :Customers > Customer Groups
          15. Payment Modules : System> Configuration > Sales >
          16. Shipping modules : System> Configuration > Sales >
          17. Export
          18. Export categories and this
          19. Export products : Under Magento Admin, go to System → Import/Export → Profiles (profiles are saved in 'dataflow_profile' table) will be exported into \var\export\export_all_products.csv  Forum discussion
          20. Export products with addtional images  :http://devzone.pratthost.com/2009/10/09/magento-import-multiple-images-for-products-module/comment-page-1/
          21. Import category structure with products using DataFlow
          22. Creating a copy of siteChange values of web/unsecure/base_url and web/secure/base_url in core_config_data table.
          23. Import SQL http://activecodeline.com/moving-magento-site-from-development-to-live-server

            /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
            /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
            /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
            /*!40101 SET NAMES utf8 */;
            /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
            /*!40103 SET TIME_ZONE='+00:00' */;
            /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
            /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
            /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
            /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;



            Notice
            Undefined index:  0  in /home/sygma/www/app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

            http://www.magentocommerce.com/boards/viewthread/23276/P15/
          24. ERROR: failed to mkdir  after porting from one servet to another

            Follow the steps and you’ll get it done. magento/downloader/pearlib/pear.ini
            Delete the file - don’t try to edit it - it doesn’t work

            http://www.magentocommerce.com/boards/viewthread/3379/

          25. moving magento from one site to another http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server
          26. problem with SEF URLS http://www.magentocommerce.com/boards/viewthread/1590/

          27. Add site / multi store http://www.crucialwebhost.com/blog/how-to-setup-multiple-magento-stores/   different stores in frontend
          28. Layout customizations (skins):to change akin Admin > Design > Add  design change (later edit this)http://www.magentocommerce.com/wiki/how-to/designing/designing-for-magento
          29. http://vincirufus.wordpress.com/2009/06/12/magento-templating-jumpstart/ 
          30. http://magentotuts.wordpress.com/2009/05/25/understanding-templates/
          31. http://www.chr00t.com/2008/06/magento-theme-customization/
          32. http://www.magentocommerce.com/boards/viewthread/1210/  
          33. http://www.free-ebusinesshelp.com/magento/how-to-edit-the-magento-footer-footer-links.html
          34. Adding custom structuralblock: http://inchoo.net/ecommerce/magento/custom-reference-structural-block/
          35. Show products in home page

            {{block type="catalog/product_list"  category_id="2" template="catalog/product/list.phtml"}}

            cheange id to the id of the rquired category

          36. retrieving base urls in php/phtml files magento http://activecodeline.com/retrieving-url-paths-in-magento see also http://www.magentocommerce.com/boards/viewthread/16324/
          37. getting current url in template :http://blog.chapagain.com.np/magento-get-current-url-of-the-page/

            at any place you can get the current url with Mage::helper('core/url')->getCurrentUrl();











          38. $this->getRequest()->getRequestString()
            or











            $this->getRequest()->getRouteName()
            to get the first subfolder like “customer” or “checkout”

            eg:if(Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' && Mage::getSingleton('cms/page')->getIdentifier() == 'home')

          39. creating admin  urls
            http://subesh.com.np/2010/03/generating-backend-admin-url-key-parameters-magento/#more-228
          40. changing title,keyword,meta description :http://blog.chapagain.com.np/magento-setchange-page-layout-title-tag-meta-keywords-and-description/
          41. Setting breadcrumbs :http://blog.chapagain.com.np/magento-easily-add-breadcrumbs-to-any-page/ 
          42. url tags used in magento cms pages http://www.magentocommerce.com/wiki/markup_tags
          43. setting  messages to show in 'global_messages' http://activecodeline.com/utilizing-magento-notification-system
          44. in template file it can be retrieved as echo $this->getUrl('')  or echo $this->getUrl('contacts') etc
            same as Mage::
            getUrl('')
            I had an issue with https in my custom module,my work around was like this
            $loadFromSSL = $_SERVER['SERVER_PORT']==443?true:false;
            Mage::getUrl('', array('_secure'= >$loadFromSSL))
          45. Change logo file through admin panel:http://www.magentocommerce.com/boards/viewreply/141205/
          46. Stuck on billing information in checkout 
          47. one page checkout breaks if right-column div class names are changed
          48. Email Templates Path is \app\locale\en_US\template\email\
          49. Very good magento tutorial http://alanstorm.com/category/magento 
          50. http://stackoverflow.com/questions/576908/how-does-magento-code-work
          51. Creating custom module
          52. Creating custom module example 2:Custom contact us form with zend mailing fuction
          53. Creating addtional product tab with frontend display http://ecommerce.aheadworks.com/free-stuff/video-module.html
          54. Best seller module : 
          55. Adding Language pack :http://inchoo.net/ecommerce/magento/adding-a-new-language-in-magento/
          56. customizing magento code

            important files and folder

            app/etc/modules/XyzCorp_Catalog.xml
            app/code/local/
            app/code/local/XyzCorp/Catalog/etc/config.xml 
          57. Overloading Controllers
          58. How to Add a Custom Module for Custom Admin Config Options
          59. To get rid of index.php from magento urls ,in configuration set 'Use Web Server Rewrites' to 'Yes'
          60. To show subctegories with images
            http://www.magentocommerce.com/boards/viewthread/14527/   and http://onerutter.com/web/magento-custom-category-images-listing-block-tutorial.html
          61. Show subcategories of active category in left nav

            http://www.magentocommerce.com/boards/viewthread/4810/P0/
            New file -app\design\frontend\blank\default\template\catalog\layer\homeview.phtml
            Edit file - app\code\core\Mage\Cms\controllers\Indexcontroller.php

          62. Use magento code for custom pages(eg:logged in,cart contents etc)
          63. Some API Tips
          64. Database tables and fields of categories and tables
          65. Write custom queries
            Database connection object in magento(lib\Zend\Db\Statement\Pdo.php) http://gogotuts.com/site/node/10    
            to run select
            $data = Mage::getSingleton(’core/resource’) ->getConnection(’core_read’)->fetchAll($sql);
            to run other queries
            http://www.magentocommerce.com/boards/viewthread/2235/
            Mage::getSingleton('core/resource') ->getConnection('core_write')->query($sql);
            can also run prepared queries like this
            $sql         "INSERT INTO 











































































             SET field1 = ?, field2 = ?, ..."; $connection->query($sql, array($field1_value$field2_value, ...)); last insert id http://www.magentocommerce.com/boards/viewthread/51096/
          66. Template positions
            To know which all phtml files are included fo each postions
            edit
            \app\code\core\Mage\Core\Block\Template.php

            add

            echo "".$this->_viewDir.DS.$fileName."";

            just above

            include $this->_viewDir.DS.$fileName;
          67. another usefull url for template
            http://www.topinternetguides.com/2008/05/26/magento-tutorial-turning-on-template-path-hints/

            http://classyllama.com/development/magento-development/enable-templateblock-hints-in-admin-panel/
            Footer links editing

            Compare Products
            ================

            \app\design\frontend\blank\lloyds\template\catalog\product\compare\sidebar.phtml

            NewsLetter
            ==============

            app\design\frontend\blank\lloyds\template\newsletter\subscribe.phtml

            Polls
            =====

            app\design\frontend\blank\lloyds\template\poll\active.phtml

            Cart
            =====

            app\design\frontend\blank\lloyds\template\checkout\cart\sidebar.phtml

            FrontEnd Dashboard
            ===================

            app\design\frontend\blank\lloyds\template\customer\account\dashboard.phtml

            Customer registrationa nd related forms
            =======================================

            \app\design\frontend\blank\lloyds\template\customer\form

            logout
            ======

            app\design\frontend\blank\lloyds\template\customer\logout.phtml

            order
            =====

            \app\design\frontend\blank\lloyds\template\customer\order\view.phtml

            breadcrumbs
            ===========

            app\design\frontend\blank\lloyds\template\page\html\breadcrumbs.phtml

            Reecntly compared products
            =============================

            app\design\frontend\blank\lloyds\template\reports\product_compared.phtml


            Reecntly viewed products
            ========================

            app\design\frontend\blank\lloyds\template\reports\product_viewed.phtml


            Currency Header
            ===============

            app\design\frontend\blank\lloyds\template\directory\currency_header.phtml
            get Currecy code(like USD,GBP)

            $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
            Product under category
            ======================

            app\design\frontend\blank\lloyds\template\catalog\product\list.phtml

            Product Description
            =====================

            app\design\frontend\blank\lloyds\template\catalog\product\view.phtml
          68. Config viewer :http://alanstorm.com/magento_config
          69. handling static blocks
          70. Writing a custom magento module
          71. Security Issues:Backup : Porting:Good Reference URLS:Entity Relationship::downloadsGeneral Details
            1. What are the main features ?
            2. Type of users
            3. What can be done for each user?
            4. What features can be extended?What can be added?
            5. Main Extensions:Shopping cart,Forum,Seo,Gallery,Blog
            Admin:
            1. How to enable and disable offline mode
            2. What all can be monitored? 
            3. How can a content be added
            4. How can menu items be controlled?
            5. How can template be changed?
            6. How SEO is enabled?Limits of basic SEO options
            7. How meta tags are set?
            8. How mass mail is done?
            9. Banner Management:
            10. News letter
            11. RSS
            Backend:
            1. How doest it differentiates betwee users
            2. How ACL works
            3. how could login be emulated
            4. how can i know if a user is logged in and get user details?
            5. How could logout be emulated
            6. How could registration be emulated
            7. How a user record be emulated.
            8. How could a user be deleted
            9. How can a content be added,edited and deleted
            Programming Core CMS
            1. Steps of Skinning screencast
            2. Steps for customizing menus
            3. Steps for creating an extention:Extenstion Type:Details
            Popular Extensions
            1. Ecommerce:
            2. SEO:
            3. Blogging:
            4. Gallery:
            5. Calendar:
            6. Forums:
            7. Directory Listings:
            8. Social neworking:
            9. Multi Language
            10. Other:
            Adding captcha http://www.fontis.com.au/magento/extension/recaptcha AJAX with magento http://subesh.com.np/2009/11/working-with-ajax-in-magento/ creating a payment module: http://www.lakevillewebdesign.com/how-to-create-magento-payment-module/ Blog module http://ecommerce.aheadworks.com/blog.html To check if the current page is a CSM page in a template  $cmsPage=(in_array(Mage::app()- >getFrontController()->getAction()- >getFullActionName(),array('cms_page_view')));//'cms_index_index' is home page  //Mage_Cms_IndexController is the class of the home page controller To know which controlloller,action or module is used from template  //check http://blogchapagain.com.np/magento-how-to-get-controller-action-and-module-name-in-template-file/ to get module ,controller,action name in template     /* echo $this->getRequest()- >getParam('page_id');     echo "< pre >";         print_r($this- >getRequest());     echo "< /pre >";     */ to get $_REQUEST outside phtml files use this $appCls = Mage::getSingleton('core/app'); $params = $appCls- >getRequest()- >getParams(); Creating a magento module http://codes.prometsupport.com/2009/05/27/magento-how-to-create-an-extension-with-its-own-layout/ http://www.magentocommerce.com/magento-connect/Daniel+Nitz/extension/1108/modulecreator Packinging for magento connect http://www.magentocommerce.com/wiki/packaging_a_magento_extension http://www.magentocommerce.com/wiki/how_to_use_magentoconnect possible error messages:
            1. Invalid tag order in , found  expected one of "lead"

              solution:When you create a new package. You need to add a “Maintainer” with Level “Lead”. 
            Manually downloading extension file tgz/direct download url of a custom module http://www.magentocommerce.com/boards/viewthread/198339/ 
            http://connect.magentocommerce.com/community/get/EXTKEY_EXCLUDING(magento-community/)-VERSION.tgz eg:
          http://connect.magentocommerce.com/community/get/
          magento_easy_lightbox-1.0.1.tgz

          if you are looking for the package of an already installed community module,its tgz will be there in your site at
          downloader/pearlib/download/ folder 

          if you are creating a package for magento connect the tgz and the xml file of paths and other details(not package.xml) eg:outsourceOnlineCaptcha.xml will be saved in var\pear folder you can use this xml to modify and repackage the extension to submit a revised version of the module to magento connect

              Manually Uninstalling a module from magento
               
               
              DELETE FROM `core_config_dataWHERE path LIKE 'payment/something%'; DELETE FROM `core_config_dataWHERE path LIKE 'Ve;ndor_Something%';  DELETE FROM `core_resourceWHERE `code`='something_setup';DELETE FROM `eav_attributeWHERE attribute_code LIKE 'something%';  DROP TABLE IF EXISTS `something_audit_log`;     Magento Outsourcing And Customization,Hire Magento Developers 

              Monday, October 19, 2009

              Mootools tips

              Basics

              http://www.catswhocode.com/blog/mootools-basics-5-useful-tips

              Demos

              http://demos.mootools.net/
              http://demos111.mootools.net/



              Validation
              http://mootools.floor.ch/en/demos/formcheck/
              datepicker 
              Selecting  sub elements :http://mootools.net/docs/core/Utilities/Selectors
              tabs
              AJAX
              Light box
              Gallery
              menu
              Accordion
              Drag and drop
              Preloader
              Uploader progress bar
              slider
              color picker

              Saturday, October 10, 2009

              PHP encryption

               Encoding:Zend guard (needs zend opimizer toun encrypted php scripts)
              Running:ioncube encoder: http://www.ioncube.com/encoder_eval_download.php need loader to run
              http://www.ioncube.com/loaders.php

              http://www.webhostgear.com/77_print.html
              http://www.seocompany.ca/software/free-encryption-software.html

              Cracking

              info: http://foff.astalavista.ms/how2usecracks.html

              http://www.serials.ws/
              http://my.softarchive.net/

              Friday, October 9, 2009

              Google Maps

              API Home:
              http://code.google.com/apis/maps/
              Google maps key signup: http://code.google.com/apis/maps/signup.html
              API Reference:
              http://code.google.com/apis/maps/documentation/reference.html

              http://econym.org.uk/gmap/
              JSAPI(good for client location from IP)
              http://code.google.com/apis/ajax/documentation/

              Geocoding with PHP/MYSQL


              Documentation: http://code.google.com/apis/maps/documentation/

              Official Google Maps API Blog

              Google Maps API Tutorial  (IMPORTANT,contains examples)


               Directions Sample
              Car Trip Using the Google directions for an animated drive.
              Car Trip 2 Same trip with polyline that grows as the car moves.
              Car Trip 3 Using <canvas> to rotate the icon (HTML5 capable browsers only)

              My Maps functionality(draw rectangle,lines etc)


              Flash API




              Google Static Maps API - Google Code

              sample with key
               
              Static map image sample without key


              http://mt.google.com/mapdata?cc=us&tstyp=5&Point=b&Point.latitude_e6=40755374&Point.longitude_e6=-73988113&Point.iconid=15&Point=e&w=150&h=100&zl=6



              Google Maps with PHP

              marker icons
              
              

              Thursday, October 8, 2009

              Actionscript(AS3 and AS2) Tips

              AS2 Best practices

              OnRelease in Event in AS2 and AS3
              hitTest Method of movieclip



              Flash debug player installation
              http://blog.hydrotik.com/2007/10/01/as3-useful-little-things/

              Conventions: http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions

              usefull downloads: http://www.senocular.com/flash/source.php
              Good Tutorials:http://www.gotoandlearn.com/
              Vector,Metrics 3D classes in CS4?  used in  globe:


              preloader


              disable right click with javascript and AS3
              Code: http://www.uza.lt/blog/2007/08/solved-right-click-in-as3/






              Adjust on resize

              stage.addEventListener(Event.RESIZE, onResize, false, 0, true);

              //assuming that eh main movieclip is having 3 childs
              1.header
              2.footer
              3.view: main content area which holds all other children in the page


              public function resize(e:Event = null):void {
                if (view.numChildren > 0) {
                Page(view.getChildAt(0)).resize();
                }
                header.resize();
                footer.resize();
                footer.y = stage.stageHeight - footer.defaultHeight + 1;
                }








              loading and resizing display area with javascript and using asual classes


              <script src="js/swfobject.js" type="text/javascript">

              </script>

              <script src="js/swfaddress.js" type="text/javascript">

              </script>

              <script type="text/javascript">

              var size = getViewportSize();

              function getViewportSize()

              {

              var size = [0, 0];

              if (typeof window.innerWidth != "undefined") {

              size = [window.innerWidth, window.innerHeight];

              }

              else if (typeof document.documentElement != "undefined" &amp;&amp; typeof document.documentElement.clientWidth != "undefined" &amp;&amp; document.documentElement.clientWidth != 0) {

              size = [document.documentElement.clientWidth, document.documentElement.clientHeight];

              }

              else {

              size = [document.getElementsByTagName("body")[0].clientWidth, document.getElementsByTagName("body")[0].clientHeight];

              }

              return size;

              }

              function createFullBrowserFlash()

              {

              // swfobject.createCSS("window", "overflow:auto;");

              swfobject.createCSS("html", "height:100%; margin:0; padding:0;");

              swfobject.createCSS("body", "height:100%; margin:0; padding:0;");

              swfobject.createCSS("#flash", "margin:0; width:100%; height:100%; min-width:1024px; min-height:786px; display:block;");

              window.onresize = function() {

              var el = document.getElementById("flash");

              var size = getViewportSize();

              el.style.width = size[0] < 986 ? "1024px" : "100%";

              el.style.height = size[1] < 800 ? "786px" : "100%";

              };

              window.onresize();

              }

              function setHeight( h )

              {

              if ( h < size[1] ) h = "100%";

              var el = document.getElementById("flash");

              if ( h != "100%" ) el.style.height = h < 786 ? "786px" : h + "px";

              else el.style.height = "100%";

              }

              //bgcolor: "#513e2c",


              var params = {

              quality: "high",

              scale: "noscale",

              wmode: "window",

              allowscriptaccess: "always",

              bgcolor: "#513e2c",

              allowFullScreen: "true"

              };

              var flashvars = {

              controllerPath:"swf/THLM-THLM.swf",

              totalExternalBytes:"7278224"//"3911744"

              };

              var attributes = {id:"flash"};

              swfobject.embedSWF("Preloader.swf", "flashcontent", "400", "400", "10.0.0", "expressInstall.swf", flashvars, params, attributes);

              if (swfobject.hasFlashPlayerVersion("10.0.0")) {

              swfobject.addDomLoadEvent( createFullBrowserFlash );

              }

              </script>








              asual Deeplinking with.htaccess,setting page title,changing url in addressbar thereby enabling SEF pages in flash sites


              changing url path in address bar
              SWFAddress.onChange = goto;///this is setting event listener,inside go to function we must write code to load the xhtml file in the relative url set as follows

              SWFAddress.setvalue('relative url');


              if it is an absolute url(starting with http)write it as following in goto function



              if(linkToGo.substr(0,5) == "/http")

              {

              GlobalVars.getURLFromMain(new URLRequest(SWFAddress.getValue()));

              return;

              }

              Textfield cursor and string insetrtion
                     first stage.focus = activeTextRef;    


                     private function insertCharAtCursor(stringToInsert)
                      {
                          var activeTextRef = _base.txtEmail;
                          var cusrsorPos = activeTextRef.caretIndex;
                          //trace("cusrsorPos = "+ cusrsorPos);
                          var mainString:String = activeTextRef.text;
                          var fstring = mainString.slice(0,cusrsorPos);
                          var lstring = mainString.slice(cusrsorPos,mainString.length);  
                          if(stringToInsert == 'backSpace')
                          {
                              if(cusrsorPos >0)
                              {
                                  fstring = mainString.slice(0,cusrsorPos - 1);
                                  if(cusrsorPos < mainString.length)
                                  {
                                      lstring = mainString.slice(cusrsorPos,mainString.length);  
                                  }
                                  else
                                  {
                                      lstring = '';
                                  }
                              }
                              stringToInsert = '';
                          }
                          //activeTextRef.text += stringToInsert;
                          activeTextRef.text = fstring + stringToInsert + lstring
                          /*if(!_base.mouseClickedOnTextbox)
                          {  
                            
                              activeTextRef.setSelection(activeTextRef.text.length,activeTextRef.text.length);
                          }
                          else*/
                          {
                              var midstring:String = fstring + stringToInsert
                              var newCaretPos = midstring.length;
                              activeTextRef.setSelection(newCaretPos,newCaretPos);
                          }
                      }


              Masking Options

              gradient maskwith alpha channel? <a href="http://www.senocular.com/flash/source.php?id=0.180">http://www.senocular.com/flash/source.php?id=0.180</a>









              Options Presentation

              Menu

              Accordion

              Slider(easing scrollbar)

              Context menu




              Skinning

              Skinning Controls

              Text format

              Applying CSS in textfields






              Transitions

              "Masking Options

              (gradient,solid)"

              Slideshow

              flip sample1 ,

              carousal: gotoandlearn

              Gallery

              accordion

              Audio Player  :Sound Object  , Sound channel ,load,close,play,stop

              Video Player




              Movement

              Circlular(with sin and cos)

              3d movement(Cube,papervision)

              Sine wave type

              Zigzag

              Drawing:


              Actionscript movieclip.transform.matrix

              http://www.kirupa.com/developer/actionscript/3dindex.htm
              Simple 3D Drawing in Flash CS3
              3dpicturebox.fla





              Frontend (inbrowser)Communication

              Js communication

              Flash to flash communication in same browser page




              Flash to Backend Communication

              "XML handling"

              loadvars

              JSON

              AMFPHP




              FMS

              basic functions

              call function in serer from client

              call function in client from serer

              checking bandwidth

              shared object

              User interaction(chat)

              whiteboard

              Online teaching




              Extending Flash

              Creating And Deploying Component

              Creating And Deploying flash Extensions

              changin color of movieclips
              AS2
              var c:Color = new Color(box_mc);
              c.setRGB(Math.random() * 0xFFFFFF);

              AS3
              var c:ColorTransform = new ColorTransform();
              c.color = (Math.random() * 0xFFFFFF);
              box_mc.transform.colorTransform = c;

              Wednesday, October 7, 2009

              RETS

              Menu Structure

              Website Development
              1. Type of websites
              2. Building a new website
              3. Hosting.




                1. free hosting,
                2. paid hosting





              4. Free tools for website development
              5. Website Programming  
              6. Frontend:-Graphics,HTML,CSS
              7. LAMP - Linux,Apache,Mysql,PHP
              8. Managing Website development 
              PHP
              1. PHP Programming.
              2. Different versions of php 
              3. Srength and weakness of PHP
              4.  PHP CMSs




                1. Joomla
                2. Different versions of joomla
                3. Benefits of joomla
                4. Joomla Website Development
                5. Empowering Joomla with Flash
                6. Magento





              5. PHP Frameworks





                1. PEAR
                2. CAKE PHP
                3. Code Ignitor
                4. Zend Framework






              1. Common PHP Tools





                1. FPDF
                2. NUSOAP
                3. SMARTY
                4. SNOOPY





              MYSQL

              1. MYSQL Database,
              2. different versions, contraints
              3. Srength and weakness of MYSQL
              JAVASCRIPT
              1. Srength and weakness of Javascript
              2. Common javascript usages 
              3. AJAX
              4. Javascript fameworks
              5. Jquery
              6. Mootools
              7. Prototype Framework
              8. Script.aculo.us 
              Flash and Flex
              1. Flash and Flex
              2. Actionscript Programming
              1. Different versions of Acionscript
              2. Flash and PHP
              3. Action Message Format and PHP (AMF PHP) 
              4. Flash and Javascript
              5. Simple applications
              6. Flash  and Media
              7. Adobe Flex builder
              8. Flash and Flex
              9. 3D scripting
              10. interactive applications
              Web Services
              1. Using PHP,javascript and Flash
              2. Payment
              3. Shipping
              4. Aweber 
              5. RETS
              6. EBay
              7. Google:maps.
              8. Geocoding
              9. Analytics
              10. Adsense 
              11. OpenID 
              Website promotion

              1. SEO(Search Engine optimization)


              Outsourcing
              1. What is outsourcing?
              2. Benefits of outsourcing
              3. Drawbacks of outsourcing
              4. Type of Outsourcing  
              5. Outsouring and Oursource Online 
              6. Outsourcing web development 
              7. Outsourcing Joomla Development
              8. Outsourcing Flash Delevopment
              9. Outsourcing SEO(Search Engine Optimization)
              10. BPO


              • Online and Offline


                1. Online support
                2. Online Data Entry
                3. Online Marketing


              adsense and adwords

              Adsense:
              http://articles.sitepoint.com/article/introducing-google-adsense


              Adsense Application:Things to be taken care of
              create a page with the text "This post confirms the ownership of the site and that the site adheres to AdSense policies and
              Terms and Conditions" and submit it as primary url in google adsense application


              Paste this text at the footer of all pages in teh site aswell(it can be removed once adsense is approved)

              Make sure Whois record address and the address submitted to google adsense are same



              adwords pricing : https://adwords.google.com/select/AfpoFinder

              Tuesday, October 6, 2009

              mail with headers

              without headers

              <?php echo "Mail send status = ".(mail(';toemail2@gmail.com', 'My Subject', "TEST"));?>

              with headers test

              <?php

                $to = "toemail@gmail.com";

                $subject = "My test";

                $txt = "Hello world!";

                $headers = "From:Sender name <fromemail@gmail.com>" . "\r\n" .

                "To:Toemail2 Name <toemail2@gmail.com>";

              echo "Mail send status = ".mail($to,$subject,$txt,$headers);

                ?>

              Joomla

              CMS name: Joomla 1.5 http://www.joomla.org/about-joomla.html



              Download Url:http://www.joomla.org/download.html

              CMS Type:  (CMS), The system includes features such as page caching to improve performance, RSS feeds, printable versions of pages, news flashes, blogs, polls, website searching, and language internationalization.


              Installation
              1. http://help.joomla.org/content/category/15/99/132/
              2. http://docs.joomla.org/Joomla_installation
              3. 'JFolder::create: Could not create directory' .if this error is seen check 'Path to Temp-folder' in 'Global Configuration'.make sure the folder exists.
                Or
                It is indicated that some invalid paths setting found in the Joomla configuration file. You should try open up “configuration.php” and reset the paths for:
                1) $log_path
                2) $tmp_path
                Also check at Admin panel > Help > System Info > Directory Permission > make sure all listed given as Writable

              Migration Steps:
              1. From 1.0 to 1.5 stable
              Common Errors:
              1. 404 even if the pages are there as seen in admin:Reason-> either default item is not set in main menu OR the link item is unpublished OR SEF handling is incorrect.
              Terminology :
              1. http://help.joomla.org/content/view/1607/214/
              2. http://www.dart-creations.com/joomla/joomla-tutorials/joomla-beginners-guide-to-joomla-terms.html


              Tips: 
              1. To view inline positions use index.php?tp=1
              2. For additional security return ##configuration.php## to ##chmod 644## after making changes. Additional information on ##chmod## and permissions can be found at:
                  * http://catcode.com/teachmod
                  * http://www.evolt.org/article/A_quick_and_dirty_chmod_Tutorial/18/541/linux_The_chmod_command.html
              3. Protect files in download directory from direct downloading
              4. Legacy Plugin:
                Enabling the Legacy mode is not very straightforward. This is done by enabling a system plugin. To enable the plugin, you need to go to Extensions > Plugin Manager, find the plugin named System - Legacy, and click on the red cross to enable the legacy plugin.
                Once this has been enabled, any Joomla 1.0 template, component, module or mambot can be used on your Joomla 1.5 website. As we have already said, the legacy plugin does introduce additional overhead, and should be used with caution. If possible, always use Joomla 1.5 components and avoid using the Legacy plugin.
              5. To add captcha in contact us form the captcha plugin mentioned in this tutorial is not available for download so use this one

              Security Issues:

              Backup :Backip all files,backup db dump


              Porting:

              1. create db
              2. import db dump
              3. edit configuration.php change $tmp_path,$log_path,$host ,$user ,$db ,$password(total 6)
              4. if 'System - Canonicalization' plugin is installed,change the 'host' parameter through MYSQL
                if   
              5. resetting user passwords
              Good Reference URLS:
              1. http://docs.joomla.org/Beginners
              2. http://docs.joomla.org/Joomla!_1.5_Template_Tutorials_Project
              Entity Relationship:http://www.torkiljohnsen.com/wp-content/uploads/2006/04/joomla_15_database_schema.png

              General Details

              1. joomla 1.0 to 1.5 Migration guide , Migration guide 2  , Development Guide
              2. What are the main features ?
              3. Type of users: 1.0: http://help.joomla.org/content/view/476/153/ cant add more type in 1.0 (http://forum.joomla.org/viewtopic.php?f=267&t=59844)
              4. What can be done for each user?
              5. What features can be extended?What can be added? 

              Admin :


              1. How to enable and disable offline mode:To put Joomla website offline, you must first login in the administration area. In the second step go to Site -> Global configuration.

                The first option that appears at this moment is Site Settings. On Site offline option, click the Yes button. Click the Save button at the upper right.

                To return online, follow the same steps, except at Site offline option, instead of Yes, you select No.

                  Then click Save at the upper right.
              2. What all can be monitored? 
              3. How can a content be added
              4. How can menu items be controlled?
              5. How can template be changed?
              6. How SEO is enabled? tutorial Limits of basic SEO options(cant always convert links to meaning full urls) :    Artio ,(see more atio links in the bottom) sh404 :tutorial
              7.  , SEO tools 
              8. How meta tags are set? Can set in Global Configuration,for each article  using JoomSEO plugin  and and for each component with metadata class as in e2s component of insure-your-mobile
              9. How mass mail is done? Tools >> Mass mail
              10. Banner Management:
              11. News letter:ccNewsletter
              12. RSS: any article,category,section page can be viewd as RSS appending &format=feed.for example homepage can be viewd as RSS as index.php?format=feed
                Rss feed of items in a section or category page  eg:/index.php?option=com_content&view=category&id=29&format=feed&type=rss
                custom RSS syndicator :http://extensions.joomla.org/extensions/content-sharing/rss-syndicate/6392 ,for aggreagtion 'News feeds' component can be used, there are otehr componets that can be checked at JED
              13. Integrating aweber auto responder script
              Controlling Articles

              1. To show articles in a module use 'news flash module'.
              2. To show modules inside articles use load_position plugin
              3. To remove/change copy right text in the bottom 
              4. To add Google Analytics to Joomla 
              5. Control frontpage parameters (no columns etc )
              6. To embed Yourtube vide in article use Qtube plugin(  JED page , demo






              Backend:http://docs.joomla.org/Framework

              1. How doest it differentiates betwee users
              2. How ACL works
              3. how could login be emulated
              4. how can i know if a user is logged in and get user details?
              5. How could logout be emulated
              6. How could registration be emulated
              7. How a user record be emulated.
              8. How could a user be deleted
              9. How can a content be added,edited and deleted
              Backend coding Tips:
              1. Work flow:http://docs.joomla.org/API_Execution_Order 
              2. joomla1.5 equivalent of sefRetToAbs is JRoute::_($url)
              3. Session handling is done byJSESSION( API,docs link, source ) class.Instance got with &JSession::getInstance();Only needed if to set a session variable or getToken 
              4. A component in MVC framework could be made with files componentname.php,controller.php and folders model,view,helpers,tables,language,images
              5. To write an  independant file in a component
                define( '_JEXEC', 1 );
                define('JPATH_BASE', realpath(dirname(__FILE__)."/../../") );//$mosConfig_absolute_path

                define( 'DS', DIRECTORY_SEPARATOR );
                require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
                require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
                $mainframe =& JFactory::getApplication('site');
                $mainframe->initialise();
                //define('CANERI_TEST_MODE',0);
                $mainframe->route();
                //require_once(realpath(dirname(__FILE__)).'/canaryConfig.php');
                $uri =& JURI::getInstance();
                define('JOOMLA_BASE_URL', substr($uri->base(),0,strpos($uri->base(), 'components/')));



















                How can I get the path to Joomla! (or a component) folder?

                The path to the folder where Joomla! is installed is stored in a constant defined by the framework
                JPATH_SITE
                This constant always contains a path on the server's file system. The statement

















                echo JPATH_SITE;
                will output something like

















                /home/account_name/public_html
                This only an example. If you try to echo the constant on your site, the result will likely be different. If you host your Joomla! site with an hosting company the actual path depends by how they organize user accounts on their servers.
                But all these details are largely irrelevant. Use JPATH_SITE whenever in your code you need to build a path relative to the folder where Joomla! is installed and you will never be wrong.
                While developing a Joomla! component we often need to build a path relative to the folder where the component is installed. We could simply use, for example

















                $mycom_folder = JPATH_SITE . DS . 'components' . DS . 'com_componentname';
                DS means directory separator and is a constant used to build paths that are indipendent from the server's operating system where Joomla! is running. DS is initialized with / in a UNIX/Linux environment and with \ in a MS Windows environment.
                But we also have available a handy shortcut
                JPATH_COMPONENT_SITE
                When used in a file that is part of a component, this constant contains the path to the frontend folder of that particular component.
                There is also
                JPATH_COMPONENT_ADMINISTRATOR
                As it's now easy to guess, we can use this constant in a file that is part of a component to get the path to the backend folder of the component. In other words the constant is equivalent to

















                JPATH_SITE . DS . 'administrator' . DS . 'components' . DS . 'com_componentname'
                Here's another one!
                JPATH_COMPONENT
                This constant is equivalent to JPATH_COMPONENT_SITE or JPATH_COMPONENT_ADMINISTRATOR respectively when used in a file that is part of a component frontend or backend.





              6. Other important functions
                 Filepaths:
                In Joomla! v.1.5.x the absolute path($mosConfig_absolute_path) is set in the index.php (line 17) file in the base directory to the constant JPATH_BASE.define('JPATH_BASE', dirname(__FILE__) );


                echo $uri->root()."
                "; //root url
                echo $uri->base()."
                "; //base url
                echo $uri->current()."
                "; //current url pathj
                echo JURI::base()."
                ";//$mosConfig_live_site = str_replace("/administrator/","/",JURI::base());*/
                Confiuration Object
                $config = JFactory::getConfig();
                //echo  $config->getValue('sitename');
                Database Object:
                //$db =& JFactory::getDBO();
                /* select query
                               
                $query = "select * from #__canary_search_categories order by category_id";
                $db->setQuery($query);
                //echo $db->_sql."
                ";      
                //$db->query();
                $results = $db->loadAssocList();
                Other Queries:
                               
                                $query = "insert into `#__canary_search_places`(`category`,`title`,`Phone`,`Address`,
                                `City`,`Zip`,`Region`,`country`,
                                `longitude`,`latitude`,`staticMapUrl`,`accuracy`,`rating`,`source`,`Modified_date`)
                                values
                                ($category_id,  $sqlFields '5','0',1,NOW())";
                       
                       
                                $db->setQuery($query);
                                showSQL();
                                //echo $db->_sql.";\n";    //exit;   
                                $db->query();
                                $placesId =  $formats[$category_id]['place_ids'][$fieldIndex] = $db->insertid();
                           
                Get language
                //$lang =& JFactory::getLanguage();
                //echo 'Current language is: ' . $lang->getName();
                //global $_CB_framework;echo $_CB_framework->getCfg( 'lang' ) ;
                Get User Object
                //echo $user->id
                $user =& JFactory::getUser();
                //echo $user->id

                pre array or var:JUtility::dump()


                        MAIL:
                JUtility::sendMail();

                or

                jimport('phpmailer.phpmailer');
                        //$mailer = new PHPMailer();
                        /*jimport('joomla.mail.mail');
                        $mailer = new JMail()*/
                        $mailer = & JFactory::_createMailer();
                        $shareLink =  JOOMLA_BASE_URL.'/index.php?option=com_canarysearch&isSharedSearchPage=true&'.$_REQUEST['searchAddress'].'&shareId='.$_REQUEST['shareId'].'&task=sharedPage';
                        $HTMLMsg = "please visit this ".$shareLink."";
                        //echo $shareLink; exit;
                        $mailer->From = $_REQUEST['youremail'];
                        $mailer->FromName =  $_REQUEST['yourname'];
                        $mailer->AddAddress($_REQUEST['email']);
                        $mailer->Subject = "Check this page at ".$config->getValue('sitename');
                        $mailer->Body =$HTMLMsg;
                        $mailer->IsHTML(true);
                        $mailer->AltBody= strip_tags($HTMLMsg);
                      
                        if ($mailer->Send() !== true)
                        {
                            // an error has occurred
                            // a notice will have been raised by $mailer
                            echo $shareLink;
                            //echo 'There was a problem sending this mail!';

                        }
                        else
                        {
                            //echo $shareLink;
                            echo "Mail send successfully";
                        }
                        exit;
                        Date
                        $date =& JFactory::getDate();
                        $date = $date->toMySQL();
              7. Create encrypted password
                $salt = JUserHelper::genRandomPassword(32);
                $crypt = JUserHelper::getCryptedPassword("blabla", $salt);
                $password = $crypt . ':' . $salt;
                Add a user in backend with username and password only

                        $email = $_POST['email'];
                        $passwd = $_POST['passwd'];
                        $password = md5($passwd);
                        $full_name = $email;
                        $username = $email;
                        $usertype = 'Registered';
                        $gid = 18;
                        $date = $date->toMySQL();
                        //check if username exists
                        $db =& JFactory::getDBO();
                        $query = "select * from #__users where username='$email'";
                        $db->setQuery($query);
                        //$db->query();
                        $results = $db->loadAssocList();
                        //echo "



















































                ";print_r($results);echo "
                ";exit;
                        if(count($results ) >0)
                        {
                            echo "Username '$email' already exists'";
                            exit;
                        }
                        else //if(count($results ) >0)
                        {
                                    $query = "INSERT INTO #__users (name,username,email,password,usertype,gid,registerDate)
                                VALUES
                                ('$full_name', '$username', '$email', '$password', 'Registered', '18', '$date')";
                            $db->setQuery($query);
                            showSQL();
                            $db->query();
                            $userid = $db->insertid();
                            $query = "INSERT INTO #__comprofiler (id,user_id)
                                    VALUES
                                ('$userid', '$userid')";
                            $db->setQuery($query);
                            showSQL();
                            $db->query();

                            /*
                            #__core_acl_aro:id     section_value('users')     value($userId)     order_value(0)     name($username)     hidden(0)*/
                            $query = "INSERT INTO #__core_acl_aro
                                    (id,section_value,`value`,`order_value`,`name`,`hidden`)
                                    VALUES
                                    ('', 'users', '$userid', 0,'$username',0)";
                            $db->setQuery($query);
                            showSQL();
                            $db->query();
                            $aro_id = $db->insertid();
                            /*
                        #__core_acl_groups_aro_map :group_id(18)     section_value ('')    aro_id ($aro_id);
                            */
                            $query = "INSERT INTO #__core_acl_groups_aro_map
                                    (group_id,section_value,aro_id )
                                    VALUES
                                    ($gid, '', '$aro_id')";
                            $db->setQuery($query);
                            showSQL();
                            $db->query();
                            $usersipass['username'] = $email;//'admin';//$user->get('username');
                            $usersipass['password'] = $passwd;//123456;
                            $loginResponseObj = $mainframe->login($usersipass);

                            echo "Registration completed successfully";
                            exit;
                        }//if(count($results ) >0)
                        /**/





































              8. login with AJAX
                        //$_SERVER['QUERY_STRING'];exit;
                        //usinng code from
                        //http://www.gjcwebdesign.com/nl/joomla-15-automatic-login-after-registration.html
                        $usersipass['username'] = $_REQUEST['username'];//'admin';//$user->get('username');
                        $usersipass['password'] = $_REQUEST['passwd'];//123456;
                        $loginResponseObj = $mainframe->login($usersipass);
                        //echo (trim($loginResponseObj->message) =='d');exit;
                        if($loginResponseObj->message)
                        {
                            echo $loginResponseObj->message;
                        }
                        else
                        {
                            echo "Sign in successfull";
                        }
                        exit;
              9. Add breadcrumb
                        //$mainframe->appendPathWay('Local Search');
              10. Edit /Delete Bread crumb nodes
                         $cmsPathway =& $mainframe->getPathway();
                         if($cmsPathway->_pathway[0]->name =="Shop")
                         {
                           unset($cmsPathway->_pathway[0]);
                         }
                        
              11. Change page title
                        //$mainframe->setPageTitle('Local Search');
              12. Load Javascript and css(bundled with core cms)
                            http://docs.joomla.org/Adding_JavaScript_and_CSS_to_the_page 
                           
                            JHTML::script('joomla.javascript.js', 'includes/js/', false);
                            JHTML::script('mootools.js', 'media/system/js/', false);
                            JHTML::script('modal.js');
                            JHTML::stylesheet('modal.css');
              13. pclzip is available at administrator/includes/pcl/pclzip.lib.php : details here
                           
                  

                       





              Programming Core CMS

              1. Steps of Skinning : See Templates below
              2. Steps for customizing menus
              3. Steps for creating an extention:Extenstion Type:Details
                Component:
                http://www.vojtechovsky.net/joomla/component-helloworld-2-create-tutorial-guide-en.html
                http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1
                Module
                http://docs.joomla.org/How_to_create_a_module
                Custom module Development http://help.joomla.org/content/view/20/125/
                Plugins:System Events
                Authentication Plugin:http://docs.joomla.org/Tutorial:Creating_an_Authentication_Plugin_for_Joomla_1.5
                content plugin
                http://developer.joomla.org/tutorials/184-how-to-create-a-joomla-plugin.html

                All Plugins: http://forum.egypt.com/enforum/articles-f141/how-create-joomla-plugin-18810.html
                Types of Plugins:
              4. Authentication
              5. Content
              6. Editors
              7. Editors XTD (Extended)
              8. Search
              9. System
              10. User
              11. XML-RPC
                Templates:http://docs.joomla.org/Tutorial:Creating_a_basic_Joomla!_template
                http://developer.joomla.org/tutorials/33-tutorials/165-understanding-output-overrides-in-joomla.html

                displaying component messages < jdoc:include type="message" / >
                in component controllers $this- >setRedirect($link, $msg);

                $this- >setTitle(html_entity_decode($mainframe- >getCfg('sitename'). ' - ' .$this- >title));

                setting 'base'  tag  with $this- > setBase( '/' ); when artio sef component is used

                Javascript features available:JHTMLBehaviour:http://api.joomla.org/__filesource/fsource_Joomla-Framework_HTML_joomlahtmlhtmlbehavior.php.html
                1. adminside toolbars
                2. mootools lightbox(Squeezebox) http://digitarald.de/project/squeezebox/
                  JHTML::_('behavior.modal')
                  use

                  rel="{handler: 'iframe', size: {x: 900, y: 500}}" in 'a' tag

                  To custom open use


                  <a href="link" rel="{handler: 'iframe', size: {x: 900, y: 500}}" onclick="return showModal(this);" >View Selecteda>


                  function showModal(aObj)
                         {
                          //alert(aObj.href);
                        
                          SqueezeBox.fromElement(aObj);
                          
                          var scrollTop = document.documentElement.scrollTop;
                          
                          if(navigator.userAgent.indexOf("MSIE") > -1 )
                          {
                           document.location = "#top";
                          }
                          
                         
                          return false;
                         }


                  To close use

                  window.parent.document.getElementById('sbox-window').close();
                  OR
                  window.parent.SqueezeBox.close()
                3. datebox

                  JHTML::_('behavior.calendar');

                  then for your date field in your form:

                  <   input class="inputbox" type="text" name="startdate"
                  id="startdate" size="25" maxlength="25"
                  value=""   /  >
                  <  input type="reset" class="button" value="..."
                  onclick="return showCalendar('startdate','%Y-%m-%d');" /    >

                4. tooltip:
                5. AJAX http://docs.joomla.org/Ajax_using_MooTools
                  this explains only get method for post the change requried is
                   method: 'post',data: $('idOfForm')
                6. To show content without template html use &format=raw .The same effect cacn be cuased with the codes below in controller as in ,http://forum.joomla.org/viewtopic.php?p=1936378
                        $document = &JFactory::getDocument();
                        $document = JDocument::getInstance('raw');

                        parent::display();
                7. validation tools?(email,number,website etc) http://docs.joomla.org/Form_validation
                  is done with motools.js and validate.js

                  remember to set the following in template.css

                  .invalid{ color:red !important;}
                  .form-validate label { font-size:12px;}

                  And

                      $script = '';
                      $document =& JFactory::getDocument();
                      $document->addScriptDeclaration($script);
                8. creating tabs
                9. WYSWYG editor for text area
                  < ? php
                  $editor        =& JFactory::getEditor();//http://docs.joomla.org/JFactory/getEditor                         // parameters : areaname, content, width, height, cols, rows,show buttons( image,pagebreak,readmore )
                  echo $editor->display( 'header', $row->header , '500', '250', '75', '20' ,false) ;
                  ?>




                  and in javascript form validation/submit script
                                 <?php






                  // var headerContent = getContent( 'header' )?>
                  //alert(headerContent);
                  <?php echo $editor->save( 'header' );?>
                  // alert(form.header.value);

                                  ?>
                                 
                  just above submitform( pressbutton );

                  When you false for show buttons( image,pagebreak,readmore ) add the following CSS
                  <style type="text/css">
                  .button2-left{
                  margin:10px 0px 10px 0px;/*to reposition 'Toggle editor' button which otherwise will jump upwards when other buttons are disabled */
                  }</style>

                  in backend/controller if you are using JRequest::get('post') add JREQUEST_ALLOWHTML to make it






                  JRequest::get('post', JREQUEST_ALLOWHTML))
                   



                Popular Extensions

                1. Ecommerce:Virtuemart:download , svn details
                2.  ; tutorial
                3. SEO:   artio: download  ,tutorials  FAQ  demo is insure-your-mobile.co.uk,sh404(now commercial): download ; tutorials:(to have urls ending with .html,it has to be set explicitly in "Configuration edit File suffix"
                4. Blogging: component list,smart blog :download ,tutorial,demo
                5. Gallery:component list ,
                6. Calendar:component list
                7. Forums: component _list, Kunena ; Agora,fireboard(currently abandoned);
                8. Newsletter:Acajoom , aweber integration .
                9. Directory Listings:SOBI :component download , extensions download
                10. Social neworking:joomsocial (commercial ): buy-now.html    demo , documentation
                11. Multi language: Joomfish: download , Tutorials ,Tutorial(with virtuemart)  .(components >> joomfish.Then click 'translations tab' )
                12. Other: 
                  1. Content Comment tool:Jcomment article category is selectd to have comment feature.if an article doesnt need this feature it should be in a different category
                  2. Export and import contents : http://extensions.joomla.org/extensions/4054/details
                  3. Custom Form creation from admin: JED listFabrik ;ChronoForm: download , tutorial , tutorial 2 ,
                  4. Community builder:downloadplugin development , download helloworld plugin login required to download
                  5. Captcha :JED list
                  6. Downloads Management:Phoca download (after installing edit function getPhocaId($id){ in dministrator\components\com_phocadownload\helpers to get rid of the footer set by phoca guys); JED list
                  7. Glossary & Dictionary:Component List , Glossary
                  8. File management
                    eXtplorer(1.5 native)(Good but starts with DOCUMENT _ROOT,needs to be changed to show from joomla home), 
                    for that edit administrator/components/com_extplorer/include/init.php
                    change line $GLOBALS['home_dir'] = !empty( $_SERVER['DOCUMENT_ROOT'] ) ? $_SERVER['DOCUMENT_ROOT'] : '.';

                    to
                    $GLOBALS['home_dir'] = realpath(JPATH_BASE."/../");//!empty( $_SERVER['DOCUMENT_ROOT'] ) ? $_SERVER['DOCUMENT_ROOT'] : '.';

                    ,Joomla explorer(1.5 legacy only) ,
                  9. backup :component_list; JoomlaPack (good for downloading sites whenthere are customization projects),just download the zip and call the joomla path and it will show the joomla pack installer screen(not core joomla installer),change database setinngs and proceed clicking 'Next" and you are done.- JoomlaCloner(GOOD to install in aremote site) - LazyBackup 2 
                  10. database management :
                    backup with System - JBackup ,
                    Enable plugin
                    set paremeters
                    '
                    Download with Cron' to Yes
                    'Send Mail' to No
                    Apply and click 'Execute Cron Link'

                    run sql with easy sql component
                      component_list 
                  11. Auction module : JED list  ;
                  12. Jumi : tutorial  enable to include php, html, javascript scripts into the modules position, articles, category or section descriptions, or into your own custom made component pages
                    Jumi

                  13. Jobline
                  14. Hotel Booking : joomres
                PS:
                SVN of joomla 1.6 is available at http://joomlacode.org/svn/joomla/development/trunk/ username:anonymous

                http://www.blogingbloging.com/download-latest-version-joomla-16/ 
                 
                It is actually pretty straight forward, let me give an example of a command line export on Ubuntu (subversion client is installed of course).
                cd /var/www
                svn export http://joomlacode.org/svn/joomla/development/trunk/ --username anonymous
                Authentication realm:  Document repository
                Password for 'anonymous':
                
                
                As you can see we do a checkout from the 1.6 trunk location (http://joomlacode.org/svn/joomla/development/trunk/) and use anonymous access to retrieve the repository. There are several different clients available that can read the subversion repository on a variety of platforms (Windows, Linux, MAC). Under windows you can use for example Turtoise SVN, all you then need to do is to right-click on a folder in the explorer en you can select the export option.

                Subversion Terminology 
                Developer tools
                Template wizard:
                Component creater:
                 Non Joomla tools

                Creating custom components
                1. create a basic file structure with http://www.notwebdesign.com/joomla-component-creator/
                2. create required database tale for the first section of the component(add fields id,published,ordering)
                3. create admin menu entry of the section by manually inserting  a record into jos_components
                4. Create tool bar
                5. Add required values in component's config file
                6. create controller,view with display,search,delete,publish,unpublish options
                7. create model and table classes appropriately
                8. add static functions in helper class appropriately