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