<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8917934279436344995</id><updated>2020-05-14T17:15:09.965+05:30</updated><title type='text'>joomla Extensions</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>28</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-96122993609657745</id><published>2020-05-14T17:15:00.000+05:30</published><updated>2020-05-14T17:15:09.886+05:30</updated><title type='text'>Sri Lanka - Covid 19 - Tourism industry and hotels</title><content type='html'>&lt;div&gt;&lt;font size=&quot;4&quot;&gt;Sri Lanka - Covid 19 - Tourism industry and hotels&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size=&quot;4&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;Sri Lanka, Covid 19, tourism industry and hotels are the main subject in these days in Sri Lanka. Sri lanka is small county. Furthermore It doesn&#39;t have strong economy. Covid 19 already badly affected for Sri lankans. Identically tourism industry and hotels. Last year there was an Easter Sunday attack too. Mainly Sri Lanka is a Sinhala Buddhist country. But there are living Tamil and Muslim minority in very peacefully. In here I would like to describe key factors that has been affected to control covid 19. And also feature plan of tourism industry and hotels.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-CDJTwjcA548/Xr0vGUSHLvI/AAAAAAAAHyw/VAk5SI3CRSgwzJMgXFBe2S6oKSwNQ_AGQCK4BGAsYHg/Tourism-industry-and-hotels.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;163&quot; data-original-width=&quot;263&quot; src=&quot;https://1.bp.blogspot.com/-CDJTwjcA548/Xr0vGUSHLvI/AAAAAAAAHyw/VAk5SI3CRSgwzJMgXFBe2S6oKSwNQ_AGQCK4BGAsYHg/Tourism-industry-and-hotels.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Leadership&lt;br /&gt;Sri lanka president Mr Gotabaya Rajapaksa is always listening to the right person. In this covid 19 case, He took the opinions from doctors. Collected the intelligent information. Discussed with right person and made decision. All the decision has been took the right time. if something went wrong, He didn&#39;t waste time to correct it.&lt;/li&gt;&lt;li&gt;Information flow&lt;br /&gt;The information flows not only in one direction. It is been top-down and bottom-up too.&amp;nbsp;General public has been given information to the covid 19 control unit.&amp;nbsp;All the medias always made awareness programmer about covid 19 and published them.&lt;/li&gt;&lt;li&gt;Sri Lankan tradition&lt;br /&gt;Herbal steam is the well known treatment method in Sri&amp;nbsp;Lanka. In this time, It is popular in here.&amp;nbsp;Foods style of Sri lanka is very special.&amp;nbsp;&amp;nbsp;It&#39;s bit of spicy and too hot.&amp;nbsp;Curry Leaves&amp;nbsp; , Turmeric,&amp;nbsp; Clove , Cinnamon , Pepper, Cardamom , Lemongrass and Citronella, Nutmeg and Mace, Vanila , and Ginger are mainly using.&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;Tourism industry and hotels&lt;/h2&gt;&lt;p&gt;Right now Sri Lanka has golden opportunity to accelerate Tourism industry. furthermore Sri Lanka should have start medical tourism. Sri Lankan traditional medical system is more than fit with current situation. Then this will enhance the Tourism industry and hotels. Sri Lanka is waiting for you to warm welcome. This is the time to visit Sri lanka. There is proved medical system to overcome from covid 19. Sri Lanka can protect your life.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-qfWR6uG8H6M/Xr0vLG2-waI/AAAAAAAAHy8/sVyn1pa0vWECWETs8S67ugpwLu82xB69ACK4BGAsYHg/medical-tourism-sri-lanka.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;222&quot; data-original-width=&quot;374&quot; src=&quot;https://1.bp.blogspot.com/-qfWR6uG8H6M/Xr0vLG2-waI/AAAAAAAAHy8/sVyn1pa0vWECWETs8S67ugpwLu82xB69ACK4BGAsYHg/s320/medical-tourism-sri-lanka.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/96122993609657745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2020/05/sri-lanka-covid-19-tourism-industry-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/96122993609657745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/96122993609657745'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2020/05/sri-lanka-covid-19-tourism-industry-and.html' title='Sri Lanka - Covid 19 - Tourism industry and hotels'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-CDJTwjcA548/Xr0vGUSHLvI/AAAAAAAAHyw/VAk5SI3CRSgwzJMgXFBe2S6oKSwNQ_AGQCK4BGAsYHg/s72-c/Tourism-industry-and-hotels.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-6046810407567174496</id><published>2013-11-01T10:41:00.002+05:30</published><updated>2013-11-01T10:41:38.471+05:30</updated><title type='text'>simple web service zend framework 2 |  zf2</title><content type='html'>Hi all, Today I am going to code simple web service from ZF2.&lt;br /&gt;&lt;br /&gt;As first step, you need to set up zf2 . Follow the instruction given in following link&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://framework.zend.com/manual/2.0/en/user-guide/skeleton-application.html&quot;&gt;http://framework.zend.com/manual/2.0/en/user-guide/skeleton-application.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Mysoap is folder name of my new module. and it&#39;s place under root module on ZF2.&lt;br /&gt;&lt;br /&gt;Copy all the folder from Application and past into Mysoap. Now we are ready to develop &amp;nbsp;our web service. see the below for folder structure &lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-avuK2f34UmQ/UnM30bVi-XI/AAAAAAAAEfA/jviYpYJiGxg/s1600/zend.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-avuK2f34UmQ/UnM30bVi-XI/AAAAAAAAEfA/jviYpYJiGxg/s1600/zend.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;1.&lt;br /&gt;C:\xampp\htdocs\ZendFramework\module\Mysoap\config\module.config.php&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;&amp;nbsp;* Zend Framework (http://framework.zend.com/)&lt;br /&gt;&amp;nbsp;*&lt;br /&gt;&amp;nbsp;* @link &amp;nbsp; &amp;nbsp; &amp;nbsp;http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository&lt;br /&gt;&amp;nbsp;* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)&lt;br /&gt;&amp;nbsp;* @license &amp;nbsp; http://framework.zend.com/license/new-bsd New BSD License&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;&lt;br /&gt;namespace Mysoap;&lt;br /&gt;&lt;br /&gt;use Zend\Mvc\ModuleRouteListener;&lt;br /&gt;use Zend\Mvc\MvcEvent;&lt;br /&gt;&lt;br /&gt;class Module&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; public function onBootstrap(MvcEvent $e)&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $eventManager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= $e-&amp;gt;getApplication()-&amp;gt;getEventManager();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $moduleRouteListener = new ModuleRouteListener();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $moduleRouteListener-&amp;gt;attach($eventManager);&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; public function getConfig()&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return include __DIR__ . &#39;/config/module.config.php&#39;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; public function getAutoloaderConfig()&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return array(&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Zend\Loader\StandardAutoloader&#39; =&amp;gt; array(&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;namespaces&#39; =&amp;gt; array(&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __NAMESPACE__ =&amp;gt; __DIR__ . &#39;/src/&#39; . __NAMESPACE__,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; );&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.C:\xampp\htdocs\ZendFramework\module\Mysoap\src\Mysoap\Controller\IndexController.php&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;&amp;nbsp;* Zend Framework (http://framework.zend.com/)&lt;br /&gt;&amp;nbsp;*&lt;br /&gt;&amp;nbsp;* @link &amp;nbsp; &amp;nbsp; &amp;nbsp;http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository&lt;br /&gt;&amp;nbsp;* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)&lt;br /&gt;&amp;nbsp;* @license &amp;nbsp; http://framework.zend.com/license/new-bsd New BSD License&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;&lt;br /&gt;namespace Mysoap\Controller;&lt;br /&gt;&lt;br /&gt;use Zend\Mvc\Controller\AbstractActionController;&lt;br /&gt;use Zend\View\Model\ViewModel;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;use Zend\Soap\Client;&lt;br /&gt;use Zend\Soap\Server;&lt;br /&gt;use Zend\Soap\AutoDiscover;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;require_once &#39;C:\xampp\htdocs\ZendFramework\module\Mysoap\src\Services\servicesAPI.php&#39;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class IndexController extends AbstractActionController&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; public function init()&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Initialize action controller here */&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; public function indexAction()&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return new ViewModel();&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; public function soapAction()&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // initialize server and set URI&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $server = new Server(null,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; array(&#39;uri&#39; =&amp;gt; &#39;http://myzend.local/mysoap/wsdl&#39;));&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // set SOAP service class&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $server-&amp;gt;setClass(&#39;servicesAPI&#39;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // handle request&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $server-&amp;gt;handle();&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return $this-&amp;gt;getResponse();&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; public function wsdlAction()&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // set up WSDL auto-discovery&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $wsdl = new AutoDiscover();&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // attach SOAP service class&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $wsdl-&amp;gt;setClass(&#39;servicesAPI&#39;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // set SOAP action URI&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $wsdl-&amp;gt;setUri(&#39;http://myzend.local/mysoap/soap&#39;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // handle request&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $wsdl-&amp;gt;handle();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return $this-&amp;gt;getResponse();&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; public function clientAction()&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $url = &#39;http://myzend.local/mysoap/wsdl&#39;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $client = new Client($url);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print_r($client-&amp;gt;getProducts());&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return $this-&amp;gt;getResponse();&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3.&amp;nbsp;C:\xampp\htdocs\ZendFramework\module\Mysoap\config\module.config.php&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;return array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &#39;controllers&#39; =&amp;gt; array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;invokables&#39; =&amp;gt; array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Mysoap\Controller\Index&#39; =&amp;gt; &#39;Mysoap\Controller\IndexController&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; ),&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; // The following section is new and should be added to your file&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &#39;router&#39; =&amp;gt; array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;routes&#39; =&amp;gt; array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;album&#39; =&amp;gt; array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;type&#39; &amp;nbsp; &amp;nbsp;=&amp;gt; &#39;segment&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;options&#39; =&amp;gt; array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;route&#39; &amp;nbsp; &amp;nbsp;=&amp;gt; &#39;/mysoap[/:action][/:id]&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;constraints&#39; =&amp;gt; array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;action&#39; =&amp;gt; &#39;[a-zA-Z][a-zA-Z0-9_-]*&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;id&#39; &amp;nbsp; &amp;nbsp; =&amp;gt; &#39;[0-9]+&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;defaults&#39; =&amp;gt; array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;controller&#39; =&amp;gt; &#39;Mysoap\Controller\Index&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;action&#39; &amp;nbsp; &amp;nbsp; =&amp;gt; &#39;index&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; ),&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &#39;view_manager&#39; =&amp;gt; array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;template_path_stack&#39; =&amp;gt; array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;album&#39; =&amp;gt; __DIR__ . &#39;/../view&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; ),&lt;/div&gt;&lt;div&gt;);&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. create new folder call Service under SRC. This our web service code&lt;/div&gt;&lt;div&gt;C:\xampp\htdocs\ZendFramework\module\Mysoap\src\Services\servicesAPI.php&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;class servicesAPI {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* This method returns a string&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param String $value&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return String&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; // define filters and validators for input&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; private $_filters = array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;title&#39; &amp;nbsp; &amp;nbsp; =&amp;gt; array(&#39;HtmlEntities&#39;, &#39;StripTags&#39;, &#39;StringTrim&#39;),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;shortdesc&#39; =&amp;gt; array(&#39;HtmlEntities&#39;, &#39;StripTags&#39;, &#39;StringTrim&#39;),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;price&#39; &amp;nbsp; &amp;nbsp; =&amp;gt; array(&#39;HtmlEntities&#39;, &#39;StripTags&#39;, &#39;StringTrim&#39;),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;quantity&#39; &amp;nbsp;=&amp;gt; array(&#39;HtmlEntities&#39;, &#39;StripTags&#39;, &#39;StringTrim&#39;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; );&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; private $_validators = array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;title&#39; &amp;nbsp; &amp;nbsp; =&amp;gt; array(),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;shortdesc&#39; =&amp;gt; array(),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;price&#39; &amp;nbsp; &amp;nbsp; =&amp;gt; array(&#39;Float&#39;),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;quantity&#39; &amp;nbsp;=&amp;gt; array(&#39;Int&#39;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; );&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Returns list of all products in database&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return array&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; public function getProducts()&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $p = array(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;title&#39; &amp;nbsp; &amp;nbsp; =&amp;gt; &#39;Spinning Top&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;shortdesc&#39; =&amp;gt; &#39;Hours of fun await with this colorful spinning top.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Includes flashing colored lights.&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;price&#39; &amp;nbsp; &amp;nbsp; =&amp;gt; &#39;3.99&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;quantity&#39; &amp;nbsp;=&amp;gt; 57&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; );&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return $p;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Returns specified product in database&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param integer $id&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return array|Example_Exception&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; public function getProduct($id)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $content = &quot;some text here&quot;.$id;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $fp = fopen(&quot;myText.txt&quot;,&quot;wb&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fwrite($fp,$content);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fclose($fp);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return $id;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Adds new product to database&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param array $data array of data values with keys -&amp;gt; table fields&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return integer id of inserted product&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; public function addProduct($data)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Deletes product from database&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param integer $id&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return integer number of products deleted&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; public function deleteProduct($id)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Updates product in database&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param integer $id&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param array $data&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return integer number of products updated&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; public function updateProduct($id, $data)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/6046810407567174496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2013/11/simple-web-service-zend-framework-2-zf2.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/6046810407567174496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/6046810407567174496'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2013/11/simple-web-service-zend-framework-2-zf2.html' title='simple web service zend framework 2 |  zf2'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-avuK2f34UmQ/UnM30bVi-XI/AAAAAAAAEfA/jviYpYJiGxg/s72-c/zend.png" height="72" width="72"/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-1479940459210849836</id><published>2013-06-04T11:51:00.002+05:30</published><updated>2013-06-04T17:43:33.901+05:30</updated><title type='text'>Custom validation Symfony2 - form builder  </title><content type='html'>Adding custom validation for form builder&lt;br /&gt;Steps&lt;br /&gt;&lt;b&gt;1. create two new file - &amp;nbsp;Validator/Constraints&lt;/b&gt;&lt;br /&gt;YOURBundle\Validator\Constraints\ContainsAlphanumeric.php&lt;br /&gt;///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;namespace Acme\DemoBundle\Validator\Constraints;&lt;br /&gt;&lt;br /&gt;use Symfony\Component\Validator\Constraint;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;&amp;nbsp;* @Annotation&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;class ContainsAlphanumeric extends Constraint&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; public $message = &#39;The string &quot;%string%&quot; contains an illegal character: it can only contain letters or numbers.&#39;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;YOURBundle\Validator\Constraints\ContainsPhoneNumberValidator.php&lt;br /&gt;&lt;br /&gt;///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;// src/Acme/DemoBundle/Validator/Constraints/ContainsAlphanumericValidator.php&lt;br /&gt;namespace Acme\DemoBundle\Validator\Constraints;&lt;br /&gt;&lt;br /&gt;use Symfony\Component\Validator\Constraint;&lt;br /&gt;use Symfony\Component\Validator\ConstraintValidator;&lt;br /&gt;&lt;br /&gt;class ContainsAlphanumericValidator extends ConstraintValidator&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; public function validate($value, Constraint $constraint)&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $pattern = &quot;/^(\+d{2})\s?|\d{4}\s?\d{3}\s?\d{3}$/&quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $match = preg_match($pattern,$value);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!$match) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;context-&amp;gt;addViolation($constraint-&amp;gt;message, array(&#39;%string%&#39; =&amp;gt; $value));&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;&lt;b&gt;2. Call Validation class from the form builder __construct method&lt;/b&gt;&lt;br /&gt;$this-&amp;gt;contains_alphanumeric = new ContainsAlphanumeric();&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Add as array on constraints&lt;/b&gt;&lt;br /&gt;$builder-&amp;gt;add(&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;name&#39;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;text&#39;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; array(&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;label&#39; =&amp;gt; &#39;message&#39;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;attr&#39; =&amp;gt; array(&#39;placeholder&#39; =&amp;gt; &#39;message&#39;, &#39;class&#39; =&amp;gt; &#39;input-large&#39;),&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;constraints&#39; =&amp;gt; array($this-&amp;gt;contains_alphanumeric)&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;br /&gt;&amp;nbsp; &amp;nbsp; );&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. full code of form builder page&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;namespace Acme\DemoBundle\Form;&lt;br /&gt;&lt;br /&gt;use Symfony\Component\Form\AbstractType;&lt;br /&gt;use Symfony\Component\Form\FormBuilderInterface;&lt;br /&gt;use Symfony\Component\Validator\Constraints\Email;&lt;br /&gt;use Acme\DemoBundle\Validator\Constraints\ContainsAlphanumeric;&lt;br /&gt;use Acme\DemoBundle\Validator\Constraints\ContainsAlphanumericValidator;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class ContactType extends AbstractType&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; protected $validEmailConstrain;&lt;br /&gt;&amp;nbsp; &amp;nbsp; protected $notBlankConstrain;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; public function __construct()&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$this-&amp;gt;validEmailConstrain = new Email();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$this-&amp;gt;contains_alphanumeric = new ContainsAlphanumeric();&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; public function buildForm(FormBuilderInterface $builder, array $options)&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $builder-&amp;gt;add(&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;name&#39;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;text&#39;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; array(&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;label&#39; =&amp;gt; &#39;message&#39;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;attr&#39; =&amp;gt; array(&#39;placeholder&#39; =&amp;gt; &#39;message&#39;, &#39;class&#39; =&amp;gt; &#39;input-large&#39;),&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;constraints&#39; =&amp;gt; array($this-&amp;gt;contains_alphanumeric)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; );&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; public function getName()&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &#39;contact&#39;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/1479940459210849836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2013/06/custom-validation-symfony-2-form-builder.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/1479940459210849836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/1479940459210849836'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2013/06/custom-validation-symfony-2-form-builder.html' title='Custom validation Symfony2 - form builder  '/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-1027372773600644388</id><published>2011-05-11T21:52:00.001+05:30</published><updated>2011-05-11T21:56:00.604+05:30</updated><title type='text'>Security Release com_google</title><content type='html'>We are announcing the immediate install of new com_google&amp;nbsp;release.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://freejoomlacomponent.appspot.com/&quot;&gt;com_google_1_5_1&lt;/a&gt; for joomla 1.5 and &lt;a href=&quot;http://freejoomlacomponent.appspot.com/&quot;&gt;com_google_1_6_1 &lt;/a&gt;for joomla 1.6&lt;br /&gt;&lt;br /&gt;On Tuesday, May 09th, 2011 the &lt;a href=&quot;http://docs.joomla.org/Vulnerable_Extensions_List#com_google&quot;&gt;vel team of joomla team &lt;/a&gt;&amp;nbsp;contacted us regarding a potential security issue in the com_google. An attacker exploiting this attack vector could potentially  launch a Denial of Service attack on your site or gain information about  your site&#39;s folder structure. above release fixes this issue.</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/1027372773600644388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2011/05/security-release-comgoogle.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/1027372773600644388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/1027372773600644388'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2011/05/security-release-comgoogle.html' title='Security Release com_google'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-8958462896042383565</id><published>2011-04-28T21:51:00.001+05:30</published><updated>2011-04-28T22:28:26.879+05:30</updated><title type='text'>release com_google 1.6</title><content type='html'>We Are Proud To Announce The Release Of&amp;nbsp;&amp;nbsp;com_google 1.6 which compile with joomla 1.6.&lt;br /&gt;&lt;br /&gt;Now u can download it from&amp;nbsp;&lt;a href=&quot;http://freejoomlacomponent.appspot.com/&quot;&gt;http://freejoomlacomponent.appspot.com/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/8958462896042383565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2011/04/release-comgoogle-16.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/8958462896042383565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/8958462896042383565'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2011/04/release-comgoogle-16.html' title='release com_google 1.6'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-5215643256643455203</id><published>2011-04-24T07:13:00.002+05:30</published><updated>2011-04-24T07:15:32.737+05:30</updated><title type='text'>free google hosting - google app</title><content type='html'>&lt;a href=&quot;https://appengine.google.com/&quot;&gt;Google app engine&lt;/a&gt;&amp;nbsp;support to host ur own domain without any fees.&amp;nbsp;Sub domain [ &lt;a href=&quot;http://test.wapa.inetlanka.com/&quot;&gt;http://test.wapa.inetlanka.com/&lt;/a&gt;&amp;nbsp;] or any naked domains can map to google host. NS is the ghs.google.com.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to map&amp;nbsp;sub domain&amp;nbsp;to google host&lt;/b&gt;&lt;br /&gt;1.login to cPanel&lt;br /&gt;2.visit page - Simple DNS Zone Editor&lt;br /&gt;3.select ur domain from top drop down menu and set as Name [test] and cName as [&amp;nbsp;ghs.google.com&amp;nbsp;] under Add a CNAME Record&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-VD4kgv5NriE/TbLntAcNU7I/AAAAAAAAAKQ/tzPKzcPCwqs/s1600/cname.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-VD4kgv5NriE/TbLntAcNU7I/AAAAAAAAAKQ/tzPKzcPCwqs/s1600/cname.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;4. save the setting. It will take at least 1 Hour for map to google host&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;how to make google app&lt;/b&gt;&lt;/div&gt;Java and python are the main language which use in google host.&lt;br /&gt;1.Login to ur own gmail&lt;br /&gt;2.browse &lt;a href=&quot;https://appengine.google.com/&quot;&gt;https://appengine.google.com &lt;/a&gt;&lt;br /&gt;3.create your own sub domin by using&amp;nbsp;&amp;nbsp;create application [ &lt;a href=&quot;http://wapnishantha.appspot.com/&quot;&gt;http://wapnishantha.appspot.com/&lt;/a&gt;&amp;nbsp;&amp;nbsp;]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;join with &#39;Create first application&#39; - next lesson&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/5215643256643455203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2011/04/free-google-hosting-google-app.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/5215643256643455203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/5215643256643455203'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2011/04/free-google-hosting-google-app.html' title='free google hosting - google app'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-VD4kgv5NriE/TbLntAcNU7I/AAAAAAAAAKQ/tzPKzcPCwqs/s72-c/cname.jpg" height="72" width="72"/><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-5409179244673375174</id><published>2011-01-12T23:26:00.005+05:30</published><updated>2011-01-13T09:24:02.711+05:30</updated><title type='text'>Congratulations joomla 1.6 and issues</title><content type='html'>&lt;span id=&quot;wall-message-7804&quot;&gt;Congratulations to the Joomla team for making &lt;a href=&quot;http://www.joomla.org/announcements/general-news/5348-joomlar-16-has-arrived.html&quot;&gt;1.6 &lt;/a&gt;happen!&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span id=&quot;wall-message-7804&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Today I found following issue on the admin section. some time this not be a issue, but I am stuck on that point&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In joomla 1.5,when u install any component and once u add it as menu item, there is option to setup &quot;Parameters (Basic)&quot; but not like that on joomla 1.6. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And we confirm &lt;a href=&quot;http://extensions.joomla.org/extensions/maps-a-weather/maps-a-locations/map-directions/9264&quot;&gt;com_googl&lt;/a&gt;e is work fine with joomla 1.6&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/5409179244673375174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2011/01/congratulations-joomla-16-and-issues.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/5409179244673375174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/5409179244673375174'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2011/01/congratulations-joomla-16-and-issues.html' title='Congratulations joomla 1.6 and issues'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-966688906162205943</id><published>2010-08-29T18:58:00.008+05:30</published><updated>2010-08-30T09:42:18.514+05:30</updated><title type='text'>add custom field to com_google</title><content type='html'>Suppose that u need to add extra field call &quot;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  border-collapse: collapse; font-family:arial, sans-serif;font-size:13px;&quot;&gt;Phone number&lt;/span&gt;&quot; on your contact us page. Follow the steps bellow. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1.Open &lt;/div&gt;&lt;div&gt;components -&gt;com_google-&gt;views-&gt;google-&gt;tmpl-&gt;default.php - on the front end&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;see the line no 302 and add &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;user_tp&quot; id=&quot;user_tp&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;code to default.php file&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Java Script validation &lt;/div&gt;&lt;div&gt;see function comGoogleFrmValidate(comfrm) on default.php file&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;and add to following code&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;user_tp_val= document.comGoogleForm.user_tp;&lt;br /&gt;if(my_name.value == &#39;&#39;)&lt;br /&gt;{&lt;br /&gt;errorStr += &quot;Add Tp no\n&quot;;&lt;br /&gt;user_tp_val.style.borderColor  = &quot;#FF0000&quot;;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. Open controller.php file&lt;/div&gt;&lt;div&gt;components-&gt;com_google-&gt;controller.php&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4.see the line 29&lt;/div&gt;&lt;div&gt;and modify the &#39;function sendMail() &#39;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$user_tp= JRequest::getVar( &#39;user_tp&#39;, 0, &#39;&#39;, &#39;text&#39; );&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And aslo update&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$body = &quot;From &quot;.$friendEmail.&quot;\n&quot;.$messText.&quot;\n&quot;.$user_tp.&quot;\n&quot;;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;if not clear ple comment&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/966688906162205943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/08/add-custom-filed-to-comgoogle.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/966688906162205943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/966688906162205943'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/08/add-custom-filed-to-comgoogle.html' title='add custom field to com_google'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-3108825374062014447</id><published>2010-08-28T15:29:00.011+05:30</published><updated>2010-08-29T08:18:04.325+05:30</updated><title type='text'>joomla add edit delete record lesson 5</title><content type='html'>Ok today i am going to explain three tasks. Add / edit or delete records from joomla admin panel. we discussed about &#39;form&#39; on last &lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/07/content-of-formphp-joomla-part-4.html&quot;&gt;lesson&lt;/a&gt;. To do the management of above three task, use following files&lt;div&gt;&lt;br /&gt;&lt;div&gt;1.com_lanka1-&gt;views-&gt;lanka1-&gt;tmpl-&gt;form.php&lt;/div&gt;&lt;div&gt;2.com_lanka1-&gt;views-&gt;lanka1-&gt;view.html.php&lt;/div&gt;&lt;div&gt;3.com_lanka1-&gt;controllers-&gt;lanka.php&lt;/div&gt;&lt;div&gt;4.com_lanka1-&gt;models-&gt;lanka1.php&lt;/div&gt;&lt;div&gt;5.com_lanka1-&gt;tables-&gt;lanka1.php&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;let&#39;s review on by one&lt;/div&gt;&lt;br /&gt;&lt;div&gt;1.com_lanka1-&gt;views-&gt;lanka1-&gt;tmpl-&gt;form.php&lt;/div&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?php defined(&#39;_JEXEC&#39;) or die(&#39;Restricted access&#39;); ?&amp;gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Lanka Map default controller&lt;br /&gt;*&lt;br /&gt;* @package Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form action=&quot;index.php&quot; method=&quot;post&quot; name=&quot;adminForm&quot; id=&quot;adminForm&quot;&amp;gt;&lt;br /&gt;&amp;lt;div class=&quot;col100&quot;&amp;gt;&lt;br /&gt;&amp;lt;fieldset class=&quot;adminform&quot;&amp;gt;&lt;br /&gt;&amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_( &#39;Details&#39; ); ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;table class=&quot;admintable&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td width=&quot;100&quot; align=&quot;right&quot; class=&quot;key&quot;&amp;gt;&lt;br /&gt;&amp;lt;label for=&quot;greeting&quot;&amp;gt;&lt;br /&gt; &amp;lt;?php echo JText::_( &#39;Your name&#39;); ?&amp;gt;:&lt;br /&gt;&amp;lt;/label&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;input class=&quot;text_area&quot; type=&quot;text&quot; name=&quot;your_name&quot; id=&quot;your_name&quot; size=&quot;32&quot; maxlength=&quot;250&quot; value=&quot;&amp;lt;?php echo $this-&amp;gt;Lanka-&amp;gt;your_name;?&amp;gt;&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td width=&quot;100&quot; align=&quot;right&quot; class=&quot;key&quot;&amp;gt;&lt;br /&gt;&amp;lt;label for=&quot;greeting&quot;&amp;gt;&lt;br /&gt; &amp;lt;?php echo JText::_( &#39;Your email&#39;); ?&amp;gt;:&lt;br /&gt;&amp;lt;/label&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;input class=&quot;text_area&quot; type=&quot;text&quot; name=&quot;your_email&quot; id=&quot;your_email&quot; size=&quot;32&quot; maxlength=&quot;250&quot; value=&quot;&amp;lt;?php echo $this-&amp;gt;Lanka-&amp;gt;your_email;?&amp;gt;&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td width=&quot;100&quot; align=&quot;right&quot; class=&quot;key&quot;&amp;gt;&lt;br /&gt;&amp;lt;label for=&quot;greeting&quot;&amp;gt;&lt;br /&gt; &amp;lt;?php echo JText::_( &#39;Your TP&#39;); ?&amp;gt;:&lt;br /&gt;&amp;lt;/label&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;input class=&quot;text_area&quot; type=&quot;text&quot; name=&quot;your_tp&quot; id=&quot;your_tp&quot; size=&quot;32&quot; maxlength=&quot;250&quot; value=&quot;&amp;lt;?php echo $this-&amp;gt;Lanka-&amp;gt;your_tp;?&amp;gt;&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;/fieldset&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div class=&quot;clr&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;option&quot; value=&quot;com_lanka1&quot; /&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;&amp;lt;?php echo $this-&amp;gt;Lanka-&amp;gt;id; ?&amp;gt;&quot; /&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;task&quot; value=&quot;&quot; /&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;controller&quot; value=&quot;lanka&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.com_lanka1-&gt;views-&gt;lanka1-&gt;view.html.php&lt;br /&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Lanka1   default controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// No direct access&lt;br /&gt;defined( &#39;_JEXEC&#39; ) or die( &#39;Restricted access&#39; );&lt;br /&gt;&lt;br /&gt;jimport( &#39;joomla.application.component.view&#39; );&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* tp View&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.Tutorials&lt;br /&gt;* @subpackage Components&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;class Lanka1sViewLanka1 extends JView&lt;br /&gt;{&lt;br /&gt;/**&lt;br /&gt;* display method of Hello view&lt;br /&gt;* @return void&lt;br /&gt;**/&lt;br /&gt;function display($tpl = null)&lt;br /&gt;{&lt;br /&gt;//get the tp&lt;br /&gt;$Lanka  =&amp;amp; $this-&amp;gt;get(&#39;Data&#39;);&lt;br /&gt;&lt;br /&gt;$isNew  = ($Lanka-&amp;gt;id &amp;lt; 1);&lt;br /&gt;&lt;br /&gt;$text = $isNew ? JText::_( &#39;New&#39; ) : JText::_( &#39;Edit&#39; );&lt;br /&gt;JToolBarHelper::title(   JText::_( &#39;Lanka1 &#39; ).&#39;: &amp;lt;small&amp;gt;&amp;lt;small&amp;gt;[ &#39; . $text.&#39; ]&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&#39; );&lt;br /&gt;JToolBarHelper::save();&lt;br /&gt;if ($isNew)  {&lt;br /&gt;JToolBarHelper::cancel();&lt;br /&gt;} else {&lt;br /&gt;// for existing items the button is renamed `close`&lt;br /&gt;JToolBarHelper::cancel( &#39;cancel&#39;, &#39;Close&#39; );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$this-&amp;gt;assignRef(&#39;Lanka&#39;,  $Lanka);&lt;br /&gt;&lt;br /&gt;parent::display($tpl);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3.com_lanka1-&gt;controllers-&gt;lanka.php&lt;br /&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Lanka1   default controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// No direct access&lt;br /&gt;defined( &#39;_JEXEC&#39; ) or die( &#39;Restricted access&#39; );&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Lanka1  Controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;*/&lt;br /&gt;class Lanka1sControllerLanka extends Lanka1sController&lt;br /&gt;{&lt;br /&gt;/**&lt;br /&gt;* constructor (registers additional tasks to methods)&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function __construct()&lt;br /&gt;{&lt;br /&gt;parent::__construct();&lt;br /&gt;&lt;br /&gt;// Register Extra tasks&lt;br /&gt;$this-&amp;gt;registerTask( &#39;add&#39;  ,  &#39;edit&#39; );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* display the edit form&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function edit()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;JRequest::setVar( &#39;view&#39;, &#39;Lanka1&#39; );&lt;br /&gt;JRequest::setVar( &#39;layout&#39;, &#39;form&#39;  );&lt;br /&gt;JRequest::setVar(&#39;hidemainmenu&#39;, 1);&lt;br /&gt;&lt;br /&gt;parent::display();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* save a record (and redirect to main page)&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function save()&lt;br /&gt;{&lt;br /&gt;$model = $this-&amp;gt;getModel(&#39;Lanka1&#39;);&lt;br /&gt;&lt;br /&gt;if ($model-&amp;gt;store($post)) {&lt;br /&gt;$msg = JText::_( &#39;Lanka1 Saved!&#39; );&lt;br /&gt;} else {&lt;br /&gt;$msg = JText::_( &#39;Error Saving Lanka1 &#39; );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Check the table in so it can be edited.... we are done with it anyway&lt;br /&gt;$link = &#39;index.php?option=com_Lanka1&#39;;&lt;br /&gt;$this-&amp;gt;setRedirect($link, $msg);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* remove record(s)&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function remove()&lt;br /&gt;{&lt;br /&gt;$model = $this-&amp;gt;getModel(&#39;Lanka1&#39;);&lt;br /&gt;if(!$model-&amp;gt;delete()) {&lt;br /&gt;$msg = JText::_( &#39;Error: One or More Lanka1 map Could not be Deleted&#39; );&lt;br /&gt;} else {&lt;br /&gt;$msg = JText::_( &#39; Lanka1 Deleted&#39; );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$this-&amp;gt;setRedirect( &#39;index.php?option=com_Lanka1&#39;, $msg );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* cancel editing a record&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function cancel()&lt;br /&gt;{&lt;br /&gt;$msg = JText::_( &#39;Operation Cancelled&#39; );&lt;br /&gt;$this-&amp;gt;setRedirect( &#39;index.php?option=com_Lanka1&#39;, $msg );&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4.com_lanka1-&gt;models-&gt;lanka1.php&lt;br /&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Lanka1  Map default controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// No direct access&lt;br /&gt;defined( &#39;_JEXEC&#39; ) or die( &#39;Restricted access&#39; );&lt;br /&gt;&lt;br /&gt;jimport(&#39;joomla.application.component.model&#39;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class Lanka1sModelLanka1 extends JModel&lt;br /&gt;{&lt;br /&gt;/**&lt;br /&gt;* Constructor that retrieves the ID from the request&lt;br /&gt;*&lt;br /&gt;* @access public&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function __construct()&lt;br /&gt;{&lt;br /&gt;parent::__construct();&lt;br /&gt;&lt;br /&gt;$array = JRequest::getVar(&#39;cid&#39;,  0, &#39;&#39;, &#39;array&#39;);&lt;br /&gt;$this-&amp;gt;setId((int)$array[0]);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Method to set the hello identifier&lt;br /&gt;*&lt;br /&gt;* @access public&lt;br /&gt;* @param int Hello identifier&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function setId($id)&lt;br /&gt;{&lt;br /&gt;// Set id and wipe data&lt;br /&gt;$this-&amp;gt;_id  = $id;&lt;br /&gt;$this-&amp;gt;_data = null;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Method to get a hello&lt;br /&gt;* @return object with data&lt;br /&gt;*/&lt;br /&gt;function &amp;amp;getData()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// Load the data&lt;br /&gt;if (empty( $this-&amp;gt;_data )) {&lt;br /&gt;$query = &#39; SELECT * FROM #__contactus &#39;.&lt;br /&gt; &#39;  WHERE id = &#39;.$this-&amp;gt;_id;&lt;br /&gt;$this-&amp;gt;_db-&amp;gt;setQuery( $query );&lt;br /&gt;$this-&amp;gt;_data = $this-&amp;gt;_db-&amp;gt;loadObject();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (!$this-&amp;gt;_data) {&lt;br /&gt;$this-&amp;gt;_data = new stdClass();&lt;br /&gt;$this-&amp;gt;_data-&amp;gt;id = 0;&lt;br /&gt;$this-&amp;gt;_data-&amp;gt;your_name = null;&lt;br /&gt;$this-&amp;gt;_data-&amp;gt;your_email = null;&lt;br /&gt;$this-&amp;gt;_data-&amp;gt;your_tp = null;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return $this-&amp;gt;_data;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Method to store a record&lt;br /&gt;*&lt;br /&gt;* @access public&lt;br /&gt;* @return boolean True on success&lt;br /&gt;*/&lt;br /&gt;function store()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$row =&amp;amp; $this-&amp;gt;getTable();&lt;br /&gt;&lt;br /&gt;$data = JRequest::get( &#39;post&#39; );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// Bind the form fields to the hello table&lt;br /&gt;if (!$row-&amp;gt;bind($data)) {&lt;br /&gt;$this-&amp;gt;setError($this-&amp;gt;_db-&amp;gt;getErrorMsg());&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Make sure the hello record is valid&lt;br /&gt;if (!$row-&amp;gt;check()) {&lt;br /&gt;$this-&amp;gt;setError($this-&amp;gt;_db-&amp;gt;getErrorMsg());&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Store the web link table to the database&lt;br /&gt;if (!$row-&amp;gt;store()) {&lt;br /&gt;$this-&amp;gt;setError( $row-&amp;gt;getErrorMsg() );&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Method to delete record(s)&lt;br /&gt;*&lt;br /&gt;* @access public&lt;br /&gt;* @return boolean True on success&lt;br /&gt;*/&lt;br /&gt;function delete()&lt;br /&gt;{&lt;br /&gt;$cids = JRequest::getVar( &#39;cid&#39;, array(0), &#39;post&#39;, &#39;array&#39; );&lt;br /&gt;&lt;br /&gt;$row =&amp;amp; $this-&amp;gt;getTable();&lt;br /&gt;&lt;br /&gt;if (count( $cids )) {&lt;br /&gt;foreach($cids as $cid) {&lt;br /&gt;if (!$row-&amp;gt;delete( $cid )) {&lt;br /&gt; $this-&amp;gt;setError( $row-&amp;gt;getErrorMsg() );&lt;br /&gt; return false;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;return true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.com_lanka1-&gt;tables-&gt;lanka1.php&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Google  Map default controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// No direct access&lt;br /&gt;defined( &#39;_JEXEC&#39; ) or die( &#39;Restricted access&#39; );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class TableLanka1 extends JTable&lt;br /&gt;{&lt;br /&gt;/**&lt;br /&gt;* Primary Key&lt;br /&gt;*&lt;br /&gt;* @var int&lt;br /&gt;*/&lt;br /&gt;var $id = null;&lt;br /&gt;var $your_name = null;&lt;br /&gt;var $your_email = null;&lt;br /&gt;var $your_tp = null;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Constructor&lt;br /&gt;*&lt;br /&gt;* @param object Database connector object&lt;br /&gt;*/&lt;br /&gt;function TableLanka1(&amp;amp; $db) {&lt;br /&gt;parent::__construct(&#39;#__contactus&#39;, &#39;id&#39;, $db);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/3108825374062014447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/08/joomla-add-edit-delete-recode.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/3108825374062014447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/3108825374062014447'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/08/joomla-add-edit-delete-recode.html' title='joomla add edit delete record lesson 5'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-1551474833496505773</id><published>2010-08-24T17:50:00.002+05:30</published><updated>2010-08-24T18:21:21.601+05:30</updated><title type='text'>Easy to hack Joomla</title><content type='html'>Suppose your friends ask&lt;br /&gt;Hi &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Machan&amp;nbsp;&lt;/span&gt;[ = mate / buddy], Does it&amp;nbsp;easy&amp;nbsp;to hack Joomla? wt is your answer?. Actually your answer is yes. Today, I found hacking code of joomla web sites which can delete all the file and folder on joomla site. Do you know this hacking force to my web site and delete all the files and folders on today.&lt;br /&gt;&lt;br /&gt;Normally I backup all the thing on&amp;nbsp;daily&amp;nbsp;basis. So The site has been successfully&amp;nbsp;launch&amp;nbsp;again&amp;nbsp;within one hour. For the use of your&amp;nbsp;awareness,&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://joomlacomponent.inetlanka.com/comp/htaccess.zip&quot;&gt;here &lt;/a&gt;is the link of that&amp;nbsp;hanking&amp;nbsp;code.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[ Machan&amp;nbsp;= Mate/buddy ]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;wAp</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/1551474833496505773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/08/easy-to-hack-joomla.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/1551474833496505773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/1551474833496505773'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/08/easy-to-hack-joomla.html' title='Easy to hack Joomla'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-4482775877741465256</id><published>2010-07-25T07:36:00.004+05:30</published><updated>2010-07-25T07:44:00.184+05:30</updated><title type='text'>Joomla com_google - Translation to PORTUGUESE, BRASIL</title><content type='html'>&lt;div&gt;This is the translation file of PORTUGUESE, BRASIL on the com_google component. Translation  done by, one of the person who interest about com_google component.&lt;/div&gt;&lt;a href=&quot;http://joomlacomponent.inetlanka.com/comp/lang/pt-BR.com_google.ini&quot;&gt;pt-BR.com_google.ini&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/4482775877741465256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/joomla-comgoogle-translation-to.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/4482775877741465256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/4482775877741465256'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/joomla-comgoogle-translation-to.html' title='Joomla com_google - Translation to PORTUGUESE, BRASIL'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-3576224986627821529</id><published>2010-07-05T23:26:00.006+05:30</published><updated>2010-07-06T09:56:29.534+05:30</updated><title type='text'>com_google new release  2010 07 05</title><content type='html'>Today we release new version of com_google with following features &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. All front end text can handle  from admin panel&lt;/div&gt;&lt;div&gt;2. Easy to manage front end appearance &lt;/div&gt;&lt;div&gt;3. Language friendly &lt;/div&gt;&lt;div&gt;4. Popup box of  Google map consist with Image and brief details&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Download link&lt;a href=&quot;http://hotellanka.lk/com_google.zip&quot;&gt; com_google&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;wAp&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/3576224986627821529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/comgoogle-new-release-2010-07-05.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/3576224986627821529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/3576224986627821529'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/comgoogle-new-release-2010-07-05.html' title='com_google new release  2010 07 05'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-7797651929836899619</id><published>2010-07-04T13:39:00.011+05:30</published><updated>2010-08-28T15:50:21.344+05:30</updated><title type='text'>Content of form.php joomla part 4</title><content type='html'>&lt;span dir=&quot;ltr&quot; id=&quot;:1fr&quot;&gt;We already discussed the behaviours of  controllers in the &lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/07/add-new-recode-to-table-joomla.html&quot;&gt;last tutorial&lt;/a&gt;. Now it is time to learn the syntax of  ‘form.php’ and ‘view.html.php’&lt;wbr&gt;.&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;form.php use for both data insert and edit.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is the sample code of form.php&lt;/div&gt;&lt;div&gt;com_lanka1-&gt;views-&gt;lanka1-&gt;tmpl-&gt;form.php&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&amp;lt;?php defined(&#39;_JEXEC&#39;) or die(&#39;Restricted access&#39;); ?&amp;gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Lanka  Map default controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form action=&quot;index.php&quot; method=&quot;post&quot; name=&quot;adminForm&quot; id=&quot;adminForm&quot;&amp;gt;&lt;br /&gt;&amp;lt;div class=&quot;col100&quot;&amp;gt;&lt;br /&gt;&amp;lt;fieldset class=&quot;adminform&quot;&amp;gt;&lt;br /&gt;&amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_( &#39;Details&#39; ); ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;table class=&quot;admintable&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td width=&quot;100&quot; align=&quot;right&quot; class=&quot;key&quot;&amp;gt;&lt;br /&gt;&amp;lt;label for=&quot;greeting&quot;&amp;gt;&lt;br /&gt;&amp;lt;?php echo JText::_( &#39;Your name&#39;); ?&amp;gt;:&lt;br /&gt;&amp;lt;/label&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;input class=&quot;text_area&quot; type=&quot;text&quot; name=&quot;greeting&quot; id=&quot;greeting&quot; size=&quot;32&quot; maxlength=&quot;250&quot; value=&quot;&amp;lt;?php echo $this-&amp;gt;lanka1-&amp;gt;your_name;?&amp;gt;&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td width=&quot;100&quot; align=&quot;right&quot; class=&quot;key&quot;&amp;gt;&lt;br /&gt;&amp;lt;label for=&quot;greeting&quot;&amp;gt;&lt;br /&gt;&amp;lt;?php echo JText::_( &#39;Your email&#39;); ?&amp;gt;:&lt;br /&gt;&amp;lt;/label&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;input class=&quot;text_area&quot; type=&quot;text&quot; name=&quot;greeting&quot; id=&quot;greeting&quot; size=&quot;32&quot; maxlength=&quot;250&quot; value=&quot;&amp;lt;?php echo $this-&amp;gt;lanka1-&amp;gt;your_email;?&amp;gt;&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td width=&quot;100&quot; align=&quot;right&quot; class=&quot;key&quot;&amp;gt;&lt;br /&gt;&amp;lt;label for=&quot;greeting&quot;&amp;gt;&lt;br /&gt;&amp;lt;?php echo JText::_( &#39;Your TP&#39;); ?&amp;gt;:&lt;br /&gt;&amp;lt;/label&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;input class=&quot;text_area&quot; type=&quot;text&quot; name=&quot;greeting&quot; id=&quot;greeting&quot; size=&quot;32&quot; maxlength=&quot;250&quot; value=&quot;&amp;lt;?php echo $this-&amp;gt;lanka1-&amp;gt;your_tp;?&amp;gt;&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;/fieldset&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div class=&quot;clr&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;option&quot; value=&quot;com_lanka1&quot; /&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;&amp;lt;?php echo $this-&amp;gt;lanka1-&amp;gt;id; ?&amp;gt;&quot; /&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;task&quot; value=&quot;&quot; /&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;controller&quot; value=&quot;lanka&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Not only form.php but also view.html.php is essential to success this stage&lt;br /&gt;&lt;div&gt;com_lanka1-&gt;views-&gt;lanka1-&gt;view.html.php &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Lanka1   default controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// No direct access&lt;br /&gt;defined( &#39;_JEXEC&#39; ) or die( &#39;Restricted access&#39; );&lt;br /&gt;&lt;br /&gt;jimport( &#39;joomla.application.component.view&#39; );&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* tp View&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.Tutorials&lt;br /&gt;* @subpackage Components&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;class Lanka1sViewLanka1 extends JView&lt;br /&gt;{&lt;br /&gt;/**&lt;br /&gt;* display method of Hello view&lt;br /&gt;* @return void&lt;br /&gt;**/&lt;br /&gt;function display($tpl = null)&lt;br /&gt;{&lt;br /&gt;//get the tp&lt;br /&gt;$Lanka1  =&amp;amp; $this-&gt;get(&#39;Data&#39;);&lt;br /&gt;$isNew  = ($Lanka1-&gt;id &lt; text =&quot; $isNew&quot;&gt;&lt;small&gt;[ &#39; . $text.&#39; ]&lt;/small&gt;&#39; );&lt;br /&gt;JToolBarHelper::save();&lt;br /&gt;if ($isNew)  {&lt;br /&gt;JToolBarHelper::cancel();&lt;br /&gt;} else {&lt;br /&gt;// for existing items the button is renamed `close`&lt;br /&gt;JToolBarHelper::cancel( &#39;cancel&#39;, &#39;Close&#39; );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$this-&gt;assignRef(&#39;Lanka1&#39;,  $Lanka1);&lt;br /&gt;&lt;br /&gt;parent::display($tpl);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;once you click edit/new button, It will go to following page&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_IFvexGQVZbg/TDBJxScOj3I/AAAAAAAAAHk/Uwea3Tywgxs/s1600/form_joomla.jpg&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 320px; height: 90px;&quot; src=&quot;http://2.bp.blogspot.com/_IFvexGQVZbg/TDBJxScOj3I/AAAAAAAAAHk/Uwea3Tywgxs/s320/form_joomla.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5489969056877285234&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;join with &lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/08/joomla-add-edit-delete-recode.html&quot;&gt;next&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;wAp&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/7797651929836899619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/content-of-formphp-joomla-part-4.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/7797651929836899619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/7797651929836899619'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/content-of-formphp-joomla-part-4.html' title='Content of form.php joomla part 4'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_IFvexGQVZbg/TDBJxScOj3I/AAAAAAAAAHk/Uwea3Tywgxs/s72-c/form_joomla.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-930569098300803805</id><published>2010-07-04T09:55:00.008+05:30</published><updated>2010-07-04T12:07:29.289+05:30</updated><title type='text'>Enable spam checking - com_google joomla</title><content type='html'>How do you enable the spam checking on your com_google component?&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Steps&lt;/div&gt;&lt;div&gt;1. Log to joomla admin panel&lt;/div&gt;&lt;div&gt;2. Load com_google component &lt;/div&gt;&lt;div&gt;3. Select contact us link&lt;/div&gt;&lt;div&gt;4. Click Edit button&lt;/div&gt;&lt;div&gt;3. Select &quot;Yes&quot; from &quot;Do you need to add SPAM checking:&quot; drop down menu&lt;/div&gt;&lt;div&gt;4. Save it&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ple see the following img&lt;/div&gt;&lt;div&gt;&lt;img src=&quot;http://1.bp.blogspot.com/_IFvexGQVZbg/TDAOEA0WzKI/AAAAAAAAAHU/yMQF8p5rWjQ/s320/spam_1.jpg&quot; style=&quot;cursor:pointer; cursor:hand;width: 320px; height: 166px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5489903407866498210&quot; /&gt;&lt;/div&gt;&lt;div&gt;3. Now see the contact us page&lt;/div&gt;&lt;div&gt;&lt;img src=&quot;http://4.bp.blogspot.com/_IFvexGQVZbg/TDAOgkePrgI/AAAAAAAAAHc/-ykpviZc5aM/s320/spam_front.jpg&quot; style=&quot;cursor:pointer; cursor:hand;width: 304px; height: 320px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5489903898473770498&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:large;&quot;&gt;Why I cannot see the captcha image?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;The support of Hosting server for the GID Images will affect to load captcha image in proper way. So it&#39;s essential to enable GID extension on your web server&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;wAp&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/930569098300803805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/enable-spam-checking-comgoogle-joomla.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/930569098300803805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/930569098300803805'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/enable-spam-checking-comgoogle-joomla.html' title='Enable spam checking - com_google joomla'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_IFvexGQVZbg/TDAOEA0WzKI/AAAAAAAAAHU/yMQF8p5rWjQ/s72-c/spam_1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-2924943720343434652</id><published>2010-07-02T21:39:00.011+05:30</published><updated>2010-07-04T14:18:09.892+05:30</updated><title type='text'>Add new record to table Joomla component part 3</title><content type='html'>Lesson  &lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/07/advance-joomla-component-with-table.html&quot;&gt;part 2&lt;/a&gt;, used to Describe only displaying information from table. But do you know how to add recodes to table? Answer is Nop. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ok let&#39;s see how to insert data to table. Can u see there is button called &quot;New&quot;? Admin  panel will popup html form once you click &quot;New&quot; button. What are the place and which are the file we used in here?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:large;&quot;&gt;1.First Change&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;open - com_lanka1-&gt;views-&gt;lanka1s-&gt;tmpl-&gt;default.php&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;can u see there is code like,&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;controller&quot; value=&quot;lanka1&quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In above code, ple change &quot;lanka&quot; instead of&quot; lanka1&quot; where value of controller&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:large;&quot;&gt;2.Add new controller&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;add new folder  &quot;controllers&quot; to your component folder[com_lanka1] &lt;/div&gt;&lt;div&gt;make new file &quot;lanka.php&quot;&lt;/div&gt;&lt;div&gt;com_lanka1-&gt;controllers-&gt;lanka.php&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Lanka1   default controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// No direct access&lt;br /&gt;defined( &#39;_JEXEC&#39; ) or die( &#39;Restricted access&#39; );&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Lanka1  Controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;*/&lt;br /&gt;class Lanka1sControllerLanka extends Lanka1sController&lt;br /&gt;{&lt;br /&gt;/**&lt;br /&gt;* constructor (registers additional tasks to methods)&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function __construct()&lt;br /&gt;{&lt;br /&gt;parent::__construct();&lt;br /&gt;&lt;br /&gt;// Register Extra tasks&lt;br /&gt;$this-&gt;registerTask( &#39;add&#39;  ,  &#39;edit&#39; );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* display the edit form&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function edit()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;JRequest::setVar( &#39;view&#39;, &#39;Lanka1&#39; );&lt;br /&gt;JRequest::setVar( &#39;layout&#39;, &#39;form&#39;  );&lt;br /&gt;JRequest::setVar(&#39;hidemainmenu&#39;, 1);&lt;br /&gt;&lt;br /&gt;parent::display();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* save a record (and redirect to main page)&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function save()&lt;br /&gt;{&lt;br /&gt;$model = $this-&gt;getModel(&#39;Lanka1&#39;);&lt;br /&gt;&lt;br /&gt;if ($model-&gt;store($post)) {&lt;br /&gt;$msg = JText::_( &#39;Lanka1 map Saved!&#39; );&lt;br /&gt;} else {&lt;br /&gt;$msg = JText::_( &#39;Error Saving Lanka1 &#39; );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Check the table in so it can be edited.... we are done with it anyway&lt;br /&gt;$link = &#39;index.php?option=com_Lanka1&#39;;&lt;br /&gt;$this-&gt;setRedirect($link, $msg);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* remove record(s)&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function remove()&lt;br /&gt;{&lt;br /&gt;$model = $this-&gt;getModel(&#39;Lanka1&#39;);&lt;br /&gt;if(!$model-&gt;delete()) {&lt;br /&gt;$msg = JText::_( &#39;Error: One or More Lanka1 map Could not be Deleted&#39; );&lt;br /&gt;} else {&lt;br /&gt;$msg = JText::_( &#39; Lanka1 map(s) Deleted&#39; );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$this-&gt;setRedirect( &#39;index.php?option=com_Lanka1&#39;, $msg );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* cancel editing a record&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function cancel()&lt;br /&gt;{&lt;br /&gt;$msg = JText::_( &#39;Operation Cancelled&#39; );&lt;br /&gt;$this-&gt;setRedirect( &#39;index.php?option=com_Lanka1&#39;, $msg );&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Can u see wt are the code of function edit()&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;JRequest::setVar( &#39;view&#39;, &#39;Lanka1&#39; ); call Lanka1 folder under view folder&lt;/li&gt;&lt;li&gt;JRequest::setVar( &#39;layout&#39;, &#39;form&#39;  );  call form.php&lt;/li&gt;&lt;li&gt;JRequest::setVar(&#39;hidemainmenu&#39;, 1); hide main manu&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/07/content-of-formphp-joomla-part-4.html&quot;&gt;Next lesson&lt;/a&gt; will explain about  form.php&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;wAp&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/2924943720343434652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/add-new-recode-to-table-joomla.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/2924943720343434652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/2924943720343434652'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/add-new-recode-to-table-joomla.html' title='Add new record to table Joomla component part 3'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-8219048453276196058</id><published>2010-07-01T20:34:00.009+05:30</published><updated>2010-07-01T21:00:59.266+05:30</updated><title type='text'>Edit Color and Font on com_google</title><content type='html'>&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:large;&quot;&gt;[download 3d google map from &lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;http://joomlacomponent.inetlanka.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=58&amp;amp;Itemid=83&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:large;&quot;&gt;com_google&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:large;&quot;&gt;]&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Ple open default.php file from component folder&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;components-&gt;com_google-&gt;views-&gt;google-&gt;tmpl-&gt;default.php file&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;see line 241 to 260, &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&amp;lt;table border=&quot;0&quot; cellpadding=&quot;4&quot; cellspacing=&quot;5&quot;&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td valign=&quot;top&quot;&amp;gt;&lt;br /&gt;&amp;lt;div align=&quot;left&quot;&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;?php echo $conArr[0]-&amp;gt;greeting; ?&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;?php echo nl2br($conArr[0]-&amp;gt;mapAddress); ?&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;label id=&quot;contact_emailmsg&quot; for=&quot;contact_email&quot;&amp;gt;&lt;br /&gt;&amp;lt;?php echo JText::_( &#39;GOOGLE_CON_TP&#39; );?&amp;gt;&lt;br /&gt;&amp;lt;/label&amp;gt;: &amp;lt;?php echo $conArr[0]-&amp;gt;mapTp; ?&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;label id=&quot;contact_emailmsg&quot; for=&quot;contact_email&quot;&amp;gt;&lt;br /&gt;&amp;lt;?php echo JText::_( &#39;GOOGLE_CON_PHONE&#39; );?&amp;gt;&lt;br /&gt;&amp;lt;/label&amp;gt;: &amp;lt;?php echo $conArr[0]-&amp;gt;mapPhone; ?&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;label id=&quot;contact_emailmsg&quot; for=&quot;contact_email&quot;&amp;gt;&lt;br /&gt;&amp;lt;?php echo JText::_( &#39;GOOGLE_CON_FAX&#39; );?&amp;gt;&lt;br /&gt;&amp;lt;/label&amp;gt;: &amp;lt;?php echo $conArr[0]-&amp;gt;mapFax; ?&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;label id=&quot;contact_emailmsg&quot; for=&quot;contact_email&quot;&amp;gt;&lt;br /&gt;&amp;lt;?php echo JText::_( &#39;GOOGLE_CON_YOUR_EMAIL&#39; );?&amp;gt;&lt;br /&gt;&amp;lt;/label&amp;gt;:&amp;lt;a href=&quot;mailto:&amp;lt;?php echo $conArr[0]-&amp;gt;mapEmail; ?&amp;gt;&quot;&amp;gt; &amp;lt;?php echo $conArr[0]-&amp;gt;mapEmail; ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;you can style above part as per your web page css&lt;br /&gt;&lt;br /&gt;wAp</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/8219048453276196058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/edit-color-and-font-comgoogle.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/8219048453276196058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/8219048453276196058'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/edit-color-and-font-comgoogle.html' title='Edit Color and Font on com_google'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-2082152960730492132</id><published>2010-07-01T19:56:00.010+05:30</published><updated>2010-07-02T22:51:07.965+05:30</updated><title type='text'>Advance joomla component with table connection part 2</title><content type='html'>&lt;div&gt;After completing &lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/06/advance-joomla-component-with-table_30.html&quot;&gt;Part 1&lt;/a&gt;, your administration panel will appear as follows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_IFvexGQVZbg/TCyoJ28_F-I/AAAAAAAAAHM/04g-h3B5jTQ/s1600/part_2_joomla_modules.jpg&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 320px; height: 114px;&quot; src=&quot;http://1.bp.blogspot.com/_IFvexGQVZbg/TCyoJ28_F-I/AAAAAAAAAHM/04g-h3B5jTQ/s320/part_2_joomla_modules.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5488946933181388770&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This part is used to describe data which is loaded from tables.  As you already understand, modules are used to load table information. This part use to describe data loading from tables. You already know, modules used to load table information. In here we use two modules  &lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:large;&quot;&gt;administrator-&gt;components-&gt;com_lanka1-&gt;models-&gt;lanka1.php&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Use these four functions:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;setId()&lt;/li&gt;&lt;li&gt;getData()&lt;/li&gt;&lt;li&gt;store()&lt;/li&gt;&lt;li&gt;delete()&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Lanka1  default controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// No direct access&lt;br /&gt;defined( &#39;_JEXEC&#39; ) or die( &#39;Restricted access&#39; );&lt;br /&gt;&lt;br /&gt;jimport(&#39;joomla.application.component.model&#39;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class Lanka1sModelLanka1 extends JModel&lt;br /&gt;{&lt;br /&gt;/**&lt;br /&gt;* Constructor that retrieves the ID from the request&lt;br /&gt;*&lt;br /&gt;* @access public&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function __construct()&lt;br /&gt;{&lt;br /&gt;parent::__construct();&lt;br /&gt;&lt;br /&gt;$array = JRequest::getVar(&#39;cid&#39;,  0, &#39;&#39;, &#39;array&#39;);&lt;br /&gt;$this-&gt;setId((int)$array[0]);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Method to set the hello identifier&lt;br /&gt;*&lt;br /&gt;* @access public&lt;br /&gt;* @param int Hello identifier&lt;br /&gt;* @return void&lt;br /&gt;*/&lt;br /&gt;function setId($id)&lt;br /&gt;{&lt;br /&gt;// Set id and wipe data&lt;br /&gt;$this-&gt;_id  = $id;&lt;br /&gt;$this-&gt;_data = null;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Method to get a hello&lt;br /&gt;* @return object with data&lt;br /&gt;*/&lt;br /&gt;function &amp;amp;getData()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// Load the data&lt;br /&gt;if (empty( $this-&gt;_data )) {&lt;br /&gt;$query = &#39; SELECT * FROM #__contactus &#39;.&lt;br /&gt;&#39;  WHERE id = &#39;.$this-&gt;_id;&lt;br /&gt;$this-&gt;_db-&gt;setQuery( $query );&lt;br /&gt;$this-&gt;_data = $this-&gt;_db-&gt;loadObject();&lt;br /&gt;}&lt;br /&gt;if (!$this-&gt;_data) {&lt;br /&gt;$this-&gt;_data = new stdClass();&lt;br /&gt;$this-&gt;_data-&gt;id = 0;&lt;br /&gt;$this-&gt;_data-&gt;your_name = null;&lt;br /&gt;$this-&gt;_data-&gt;your_email = null;&lt;br /&gt;$this-&gt;_data-&gt;your_tp = null;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;return $this-&gt;_data;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Method to store a record&lt;br /&gt;*&lt;br /&gt;* @access public&lt;br /&gt;* @return boolean True on success&lt;br /&gt;*/&lt;br /&gt;function store()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$row =&amp;amp; $this-&gt;getTable();&lt;br /&gt;&lt;br /&gt;$data = JRequest::get( &#39;post&#39; );&lt;br /&gt;&lt;br /&gt;// Bind the form fields to the hello table&lt;br /&gt;if (!$row-&gt;bind($data)) {&lt;br /&gt;$this-&gt;setError($this-&gt;_db-&gt;getErrorMsg());&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Make sure the hello record is valid&lt;br /&gt;if (!$row-&gt;check()) {&lt;br /&gt;$this-&gt;setError($this-&gt;_db-&gt;getErrorMsg());&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Store the web link table to the database&lt;br /&gt;if (!$row-&gt;store()) {&lt;br /&gt;$this-&gt;setError( $row-&gt;getErrorMsg() );&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Method to delete record(s)&lt;br /&gt;*&lt;br /&gt;* @access public&lt;br /&gt;* @return boolean True on success&lt;br /&gt;*/&lt;br /&gt;function delete()&lt;br /&gt;{&lt;br /&gt;$cids = JRequest::getVar( &#39;cid&#39;, array(0), &#39;post&#39;, &#39;array&#39; );&lt;br /&gt;&lt;br /&gt;$row =&amp;amp; $this-&gt;getTable();&lt;br /&gt;&lt;br /&gt;if (count( $cids )) {&lt;br /&gt;foreach($cids as $cid) {&lt;br /&gt;if (!$row-&gt;delete( $cid )) {&lt;br /&gt;$this-&gt;setError( $row-&gt;getErrorMsg() );&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;return true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:large;&quot;&gt;&lt;b&gt;administrator-&gt;components-&gt;com_lanka1-&gt;models-&gt;lanka1s.php&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Use these two functions:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;_buildQuery()&lt;/li&gt;&lt;li&gt;getData()&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Lanka1   default controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// No direct access&lt;br /&gt;defined( &#39;_JEXEC&#39; ) or die( &#39;Restricted access&#39; );&lt;br /&gt;&lt;br /&gt;jimport( &#39;joomla.application.component.model&#39; );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class Lanka1sModelLanka1s extends JModel&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;var $_data;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Returns the query&lt;br /&gt;* @return string The query to be used to retrieve the rows from the database&lt;br /&gt;*/&lt;br /&gt;function _buildQuery()&lt;br /&gt;{&lt;br /&gt;$query = &#39; SELECT * &#39;&lt;br /&gt;. &#39; FROM #__contactus &#39;&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;return $query;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Retrieves the hello data&lt;br /&gt;* @return array Array of objects containing the data from the database&lt;br /&gt;*/&lt;br /&gt;function getData()&lt;br /&gt;{&lt;br /&gt;// Lets load the data if it doesn&#39;t already exist&lt;br /&gt;if (empty( $this-&gt;_data ))&lt;br /&gt;{&lt;br /&gt;$query = $this-&gt;_buildQuery();&lt;br /&gt;$this-&gt;_data = $this-&gt;_getList( $query );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return $this-&gt;_data;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;Table information is displayed row by row once you add these two files to your component.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/07/add-new-recode-to-table-joomla.html&quot;&gt;next lesson&lt;/a&gt;&lt;br /&gt;wAp&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/2082152960730492132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/advance-joomla-component-with-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/2082152960730492132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/2082152960730492132'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/07/advance-joomla-component-with-table.html' title='Advance joomla component with table connection part 2'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_IFvexGQVZbg/TCyoJ28_F-I/AAAAAAAAAHM/04g-h3B5jTQ/s72-c/part_2_joomla_modules.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-4321489458558801859</id><published>2010-06-30T19:36:00.024+05:30</published><updated>2010-07-04T14:12:15.676+05:30</updated><title type='text'>Advance joomla component with table connection part 1</title><content type='html'>&lt;div&gt;The following image shows the appearance  of the admin panel of our component.  Ok, let&#39;s try to load the table  data [jos_contactUs] to here. For that we need to modify default.php  form with the following code: -&lt;/div&gt;&lt;div id=&quot;:25c&quot; dir=&quot;ltr&quot; class=&quot;kl&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_IFvexGQVZbg/S_c_7hctZyI/AAAAAAAAAHE/aE0RPQq8N9Q/s320/finalaoutput.png&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 320px; height: 144px;&quot; src=&quot;http://1.bp.blogspot.com/_IFvexGQVZbg/S_c_7hctZyI/AAAAAAAAAHE/aE0RPQq8N9Q/s320/finalaoutput.png&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;com_lanka1-&gt;views-&gt;lanka1s-&gt;tmpl-&gt;default.php&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&amp;lt;?php defined(&#39;_JEXEC&#39;) or die(&#39;Restricted access&#39;); ?&amp;gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Google  Map default controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;?&amp;gt;&lt;br /&gt;&amp;lt;form action=&quot;index.php&quot; method=&quot;post&quot; name=&quot;adminForm&quot;&amp;gt;&lt;br /&gt;&amp;lt;div id=&quot;editcell&quot;&amp;gt;&lt;br /&gt;&amp;lt;table class=&quot;adminlist&quot;&amp;gt;&lt;br /&gt;&amp;lt;thead&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;th width=&quot;5&quot;&amp;gt;&lt;br /&gt;&amp;lt;?php echo JText::_( &#39;ID&#39; ); ?&amp;gt;&lt;br /&gt;&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;th width=&quot;20&quot;&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;toggle&quot; value=&quot;&quot; onclick=&quot;checkAll(&amp;lt;?php echo count( $this-&amp;gt;items ); ?&amp;gt;);&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;th&amp;gt;&lt;br /&gt;&amp;lt;?php echo JText::_( &#39;Telephone List&#39; ); ?&amp;gt;&lt;br /&gt;&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/thead&amp;gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;$k = 0;&lt;br /&gt;for ($i=0, $n=count( $this-&amp;gt;items ); $i &amp;lt; $n; $i++) {&lt;br /&gt;$row = &amp;amp;$this-&amp;gt;items[$i];&lt;br /&gt;$checked  = JHTML::_(&#39;grid.id&#39;,   $i, $row-&amp;gt;id );&lt;br /&gt;$link   = JRoute::_( &#39;index.php?option=com_lanka1&amp;amp;controller=lanka1&amp;amp;task=edit&amp;amp;cid[]=&#39;. $row-&amp;gt;id );&lt;br /&gt;?&amp;gt;&lt;br /&gt;&amp;lt;tr class=&quot;&amp;lt;?php echo &quot;row$k&quot;; ?&amp;gt;&quot;&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;?php echo $checked; ?&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;a href=&quot;&amp;lt;?php echo $link; ?&amp;gt;&quot;&amp;gt;&amp;lt;?php echo $row-&amp;gt;your_name; ?&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;$k = 1 - $k;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;option&quot; value=&quot;com_lanka1&quot; /&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;task&quot; value=&quot;&quot; /&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;boxchecked&quot; value=&quot;0&quot; /&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;controller&quot; value=&quot;lanka1&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;kk&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;:263&quot; dir=&quot;ltr&quot; class=&quot;kl&quot;&gt;The last part of above code is very  important, from the&lt;/div&gt;&lt;div id=&quot;:264&quot; dir=&quot;ltr&quot; class=&quot;kl&quot;&gt;&amp;lt;input type=&quot;hidden&quot; name=&quot;option&quot; value=&quot;&quot;&gt;a1&quot; /&amp;gt;&lt;/div&gt;&lt;div id=&quot;:265&quot; dir=&quot;ltr&quot; class=&quot;kl&quot;&gt;to the&lt;/div&gt;&lt;div id=&quot;:265&quot; dir=&quot;ltr&quot; class=&quot;kl&quot;&gt;&lt;span&gt;&amp;lt;/form&amp;gt; &lt;/span&gt;&lt;/div&gt;&lt;div id=&quot;:266&quot; dir=&quot;ltr&quot; class=&quot;kl&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Note only default.php but also view.html.php is essential to success this stage&lt;br /&gt;&lt;div&gt;&lt;br /&gt;com_lanka1-&gt;views-&gt;lanka1s-&gt;view.html.php&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Lanka1   default controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// No direct access&lt;br /&gt;defined( &#39;_JEXEC&#39; ) or die( &#39;Restricted access&#39; );&lt;br /&gt;&lt;br /&gt;jimport( &#39;joomla.application.component.view&#39; );&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* lanka1 View&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;*/&lt;br /&gt;class Lanka1sViewLanka1s extends JView&lt;br /&gt;{&lt;br /&gt;/**&lt;br /&gt;* lanka1 view display method&lt;br /&gt;* @return void&lt;br /&gt;**/&lt;br /&gt;function display($tpl = null)&lt;br /&gt;{&lt;br /&gt;JToolBarHelper::title(   JText::_( &#39;Lanka1&#39; ), &#39;generic.png&#39; );&lt;br /&gt;JToolBarHelper::deleteList();&lt;br /&gt;JToolBarHelper::editListX();&lt;br /&gt;JToolBarHelper::addNewX();&lt;br /&gt;&lt;br /&gt;// Get data from the model&lt;br /&gt;$items  = &amp;amp; $this-&gt;get( &#39;Data&#39;);&lt;br /&gt;&lt;br /&gt;$this-&gt;assignRef(&#39;items&#39;,  $items);&lt;br /&gt;&lt;br /&gt;parent::display($tpl);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span dir=&quot;ltr&quot; id=&quot;:26k&quot;&gt;This is first time we&#39;ve used a module . On an MVC system, module is used to make a relationship between a table and a component.&lt;br /&gt;&lt;br /&gt;In our example, we use two modules, lanka1.php and lanka1s.php as follows&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;com_lanka1-&gt;models-&gt;lanka1.php&lt;/div&gt;&lt;div&gt;com_lanka1-&gt;models-&gt;lanka1s.php&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span dir=&quot;ltr&quot; id=&quot;:26n&quot;&gt;Click on the following link to go to the &lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/07/advance-joomla-component-with-table.html&quot;&gt;next lesson&lt;/a&gt;:&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;wAp&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/4321489458558801859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/06/advance-joomla-component-with-table_30.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/4321489458558801859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/4321489458558801859'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/06/advance-joomla-component-with-table_30.html' title='Advance joomla component with table connection part 1'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_IFvexGQVZbg/S_c_7hctZyI/AAAAAAAAAHE/aE0RPQq8N9Q/s72-c/finalaoutput.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-602653766794720024</id><published>2010-06-25T13:57:00.007+05:30</published><updated>2010-06-25T14:29:53.066+05:30</updated><title type='text'>Advance joomla component with table connection</title><content type='html'>You already know basic concept of joomla component. From today, we can study advance level of example  which cover table connection and proper management of admin panel. Before start this lesson, ple download previous &lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 19px; font-family:Verdana, sans-serif;font-size:13px;&quot;&gt;&quot;&lt;a href=&quot;http://joomlacomponent.inetlanka.com/Tute/com_lanka1.zip&quot; style=&quot;color: rgb(0, 123, 164); text-decoration: none; &quot;&gt;simple example joomla component&lt;/a&gt;&quot;.&lt;/span&gt; and install it. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ok now we are ready to going forward with this lesson. have u any target? or have u any thing which need to apply joomla? Yes as a Example we can define our requirement as follows.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Target - telephone number storing system&lt;/div&gt;&lt;div&gt;Table attributes - Your name / Your Email / Your Tp&lt;/div&gt;&lt;div&gt;Sql -  &lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  ;font-family:Arial;font-size:12px;&quot;&gt;&lt;span class=&quot;syntax_alpha syntax_alpha_reservedWord&quot; style=&quot;color: rgb(153, 0, 153); text-transform: uppercase; font-weight: bold; &quot;&gt;CREATE&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_reservedWord&quot; style=&quot;color: rgb(153, 0, 153); text-transform: uppercase; font-weight: bold; &quot;&gt;TABLE&lt;/span&gt; &lt;span class=&quot;syntax_quote syntax_quote_backtick&quot; style=&quot;color: rgb(0, 128, 0); white-space: pre; &quot;&gt;`jos_contactUs`&lt;/span&gt; &lt;span class=&quot;syntax_punct syntax_punct_bracket_open_round&quot;  style=&quot; ;color:fuchsia;&quot;&gt;(&lt;/span&gt;&lt;div class=&quot;syntax_indent1&quot; style=&quot;margin-left: 1em; &quot;&gt;&lt;span class=&quot;syntax_white syntax_white_newline&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax_quote syntax_quote_backtick&quot; style=&quot;color: rgb(0, 128, 0); white-space: pre; &quot;&gt;`id`&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_columnType&quot; style=&quot;color: rgb(255, 153, 0); text-transform: uppercase; &quot;&gt;INT&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_reservedWord&quot; style=&quot;color: rgb(153, 0, 153); text-transform: uppercase; font-weight: bold; &quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_reservedWord&quot; style=&quot;color: rgb(153, 0, 153); text-transform: uppercase; font-weight: bold; &quot;&gt;NULL&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_reservedWord&quot; style=&quot;color: rgb(153, 0, 153); text-transform: uppercase; font-weight: bold; &quot;&gt;AUTO_INCREMENT&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_reservedWord&quot; style=&quot;color: rgb(153, 0, 153); text-transform: uppercase; font-weight: bold; &quot;&gt;PRIMARY&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_reservedWord&quot; style=&quot;color: rgb(153, 0, 153); text-transform: uppercase; font-weight: bold; &quot;&gt;KEY&lt;/span&gt; &lt;span class=&quot;syntax_punct syntax_punct_listsep&quot;  style=&quot; ;color:fuchsia;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;syntax_white syntax_white_newline&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax_quote syntax_quote_backtick&quot; style=&quot;color: rgb(0, 128, 0); white-space: pre; &quot;&gt;`your_name`&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_columnType&quot; style=&quot;color: rgb(255, 153, 0); text-transform: uppercase; &quot;&gt;VARCHAR&lt;/span&gt;&lt;span class=&quot;syntax_punct syntax_punct_bracket_open_round&quot;  style=&quot; ;color:fuchsia;&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;syntax_digit syntax_digit_integer&quot;  style=&quot; ;color:teal;&quot;&gt;100&lt;/span&gt; &lt;span class=&quot;syntax_punct syntax_punct_bracket_close_round&quot;  style=&quot; ;color:fuchsia;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_reservedWord&quot; style=&quot;color: rgb(153, 0, 153); text-transform: uppercase; font-weight: bold; &quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_reservedWord&quot; style=&quot;color: rgb(153, 0, 153); text-transform: uppercase; font-weight: bold; &quot;&gt;NULL&lt;/span&gt; &lt;span class=&quot;syntax_punct syntax_punct_listsep&quot;  style=&quot; ;color:fuchsia;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;syntax_white syntax_white_newline&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax_quote syntax_quote_backtick&quot; style=&quot;color: rgb(0, 128, 0); white-space: pre; &quot;&gt;`your_email`&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_columnType&quot; style=&quot;color: rgb(255, 153, 0); text-transform: uppercase; &quot;&gt;VARCHAR&lt;/span&gt;&lt;span class=&quot;syntax_punct syntax_punct_bracket_open_round&quot;  style=&quot; ;color:fuchsia;&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;syntax_digit syntax_digit_integer&quot;  style=&quot; ;color:teal;&quot;&gt;100&lt;/span&gt; &lt;span class=&quot;syntax_punct syntax_punct_bracket_close_round&quot;  style=&quot; ;color:fuchsia;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_reservedWord&quot; style=&quot;color: rgb(153, 0, 153); text-transform: uppercase; font-weight: bold; &quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_reservedWord&quot; style=&quot;color: rgb(153, 0, 153); text-transform: uppercase; font-weight: bold; &quot;&gt;NULL&lt;/span&gt; &lt;span class=&quot;syntax_punct syntax_punct_listsep&quot;  style=&quot; ;color:fuchsia;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;syntax_white syntax_white_newline&quot;&gt;&lt;/span&gt;&lt;span class=&quot;syntax_quote syntax_quote_backtick&quot; style=&quot;color: rgb(0, 128, 0); white-space: pre; &quot;&gt;`your_tp`&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_columnType&quot; style=&quot;color: rgb(255, 153, 0); text-transform: uppercase; &quot;&gt;VARCHAR&lt;/span&gt;&lt;span class=&quot;syntax_punct syntax_punct_bracket_open_round&quot;  style=&quot; ;color:fuchsia;&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;syntax_digit syntax_digit_integer&quot;  style=&quot; ;color:teal;&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;syntax_punct syntax_punct_bracket_close_round&quot;  style=&quot; ;color:fuchsia;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_reservedWord&quot; style=&quot;color: rgb(153, 0, 153); text-transform: uppercase; font-weight: bold; &quot;&gt;NOT&lt;/span&gt; &lt;span class=&quot;syntax_alpha syntax_alpha_reservedWord&quot; style=&quot;color: rgb(153, 0, 153); text-transform: uppercase; font-weight: bold; &quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;syntax_white syntax_white_newline&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;syntax_punct syntax_punct_bracket_close_round&quot;  style=&quot; ;color:fuchsia;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;step 01&lt;/b&gt;&lt;/div&gt;&lt;div&gt;manually run above sql on your DB&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;join with next lesson&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;wAp&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://joomlasrilanka.blogspot.com/&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#FFFFFF;&quot;&gt; joomla component with table joomla module view control &lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/602653766794720024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/06/advance-joomla-component-with-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/602653766794720024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/602653766794720024'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/06/advance-joomla-component-with-table.html' title='Advance joomla component with table connection'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-5546808221015783048</id><published>2010-05-25T22:52:00.005+05:30</published><updated>2010-08-01T16:33:20.768+05:30</updated><title type='text'>com_google manage mail from contact form joomla</title><content type='html'>currently there is no way to manage this from admin panel. All out going mail send through  the info@xxxx.yyy address.&lt;br /&gt;&lt;br /&gt;How ever u can follow following step to solve this issue&lt;br /&gt;&lt;br /&gt;Steps&lt;br /&gt;1.find components/com_google/controller.php - from fron end&lt;br /&gt;2.see line no 46 - $from  =&quot;info@&quot;.$_SERVER[&#39;HTTP_HOST&#39;];&lt;br /&gt;3. change it as per your desire&lt;br /&gt;&lt;br /&gt;$from  =&quot;info@mydesire.com&quot;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if u have any ques ple comment here&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #660000;&quot;&gt;new release can change &#39;from Email address&#39;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #660000;&quot;&gt;&lt;a href=&quot;http://extensions.joomla.org/extensions/contacts-and-feedback/contact-details/9264&quot;&gt;http://extensions.joomla.org/extensions/contacts-and-feedback/contact-details/9264&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;wAp</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/5546808221015783048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/05/comgoogle-manage-mail-from-contact-form.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/5546808221015783048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/5546808221015783048'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/05/comgoogle-manage-mail-from-contact-form.html' title='com_google manage mail from contact form joomla'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-5233090148017948416</id><published>2010-05-23T06:38:00.000+05:30</published><updated>2010-05-23T07:14:08.636+05:30</updated><title type='text'>1 simple example joomla component</title><content type='html'>Already we have discussed about &quot;How to make a Joomla component&quot;. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For that follows 5 stages as below&lt;/div&gt;&lt;div&gt;1. &lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/01/make-simple-one.html&quot;&gt;make simple one&lt;/a&gt;&lt;/div&gt;&lt;div&gt;2. &lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/04/fixing-component-not-found.html&quot;&gt;Fixing &quot;Component Not Found&quot; - joomla&lt;/a&gt;&lt;/div&gt;&lt;div&gt;3. &lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/04/failed-to-open-stream-joomla.html&quot;&gt;failed to open stream - joomla&lt;/a&gt;&lt;/div&gt;&lt;div&gt;4. &lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/05/500-error-has-occurred-joomla.html&quot;&gt;500 - An error has occurred - joomla&lt;/a&gt;&lt;/div&gt;&lt;div&gt;5. &lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/05/layout-default-not-found-joomla.html&quot;&gt;Layout &quot;default&quot; not found - joomla&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Download all above step as once component , &quot;&lt;a href=&quot;http://joomlacomponent.inetlanka.com/Tute/com_lanka1.zip&quot;&gt;simple example joomla component&lt;/a&gt; &quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is simple     variation on the &quot;install.xml&quot;. Added new 4 line to it as below &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;&lt;filename&gt;lanka1.php&lt;/filename&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;&lt;filename&gt;index.html&lt;/filename&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;&lt;filename&gt;controller.php&lt;/filename&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;&lt;filename&gt;views/lanka1s/view.html.php&lt;/filename&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;&lt;filename&gt;views/lanka1s/tmpl/default.php&lt;/filename&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;New install.xml file&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE install SYSTEM &quot;http://dev.joomla.org/xml/1.5/component-install.dtd&quot;&amp;gt;&lt;br /&gt;&amp;lt;install type=&quot;component&quot; version=&quot;1.5.0&quot;&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;lanka1&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;!-- The following elements are optional and free of formatting conttraints --&amp;gt;&lt;br /&gt;&amp;lt;creationDate&amp;gt;2009/10/24 &amp;lt;/creationDate&amp;gt;&lt;br /&gt;&amp;lt;author&amp;gt;wapnishantha&amp;lt;/author&amp;gt;&lt;br /&gt;&amp;lt;authorEmail&amp;gt;info@inetlanka.com&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;&amp;lt;authorUrl&amp;gt;http://www.inetlanka.com&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;&amp;lt;copyright&amp;gt;com_lanka1 2009&amp;lt;/copyright&amp;gt;&lt;br /&gt;&amp;lt;license&amp;gt;GNU/GPL&amp;lt;/license&amp;gt;&lt;br /&gt;&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.0.0&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;&amp;lt;description&amp;gt;&lt;br /&gt;&amp;lt;![CDATA[&lt;br /&gt;This component is a Flight System. &amp;lt;br /&amp;gt;&lt;br /&gt;]]&amp;gt;&lt;br /&gt;&amp;lt;/description&amp;gt;&lt;br /&gt;&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;&amp;lt;files folder=&quot;site&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/files&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;administration&amp;gt;&lt;br /&gt;&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;&amp;lt;menu&amp;gt;com_lanka&amp;lt;/menu&amp;gt;&lt;br /&gt;&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;to copy FROM in the package to install therefore files copied&lt;br /&gt;in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;&amp;lt;files folder=&quot;admin&quot;&amp;gt;&lt;br /&gt;&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;filename&amp;gt;lanka1.html&amp;lt;/filename&amp;gt;&lt;br /&gt;&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;&amp;lt;filename&amp;gt;controller.html&amp;lt;/filename&amp;gt;&lt;br /&gt;&amp;lt;filename&amp;gt;views/lanka1s/view.html.php&amp;lt;/filename&amp;gt;&lt;br /&gt;&amp;lt;filename&amp;gt;views/lanka1s/tmpl/default.php&amp;lt;/filename&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/files&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/administration&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/install&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;wAp</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/5233090148017948416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/05/1-simple-example-joomla-component.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/5233090148017948416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/5233090148017948416'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/05/1-simple-example-joomla-component.html' title='1 simple example joomla component'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-8841850270600778200</id><published>2010-05-22T07:57:00.000+05:30</published><updated>2010-05-22T08:11:52.451+05:30</updated><title type='text'>change com_google Thanks for you !</title><content type='html'>Do u know how to change the text[Thanks for you !] of &lt;a href=&quot;http://extensions.joomla.org/extensions/contacts-and-feedback/contact-details/9264&quot;&gt;com_google component&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;yes it&#39;s very easy&lt;br /&gt;&lt;br /&gt;there are 2 method&lt;br /&gt;&lt;br /&gt;1. This is right way&lt;br /&gt;find the &quot;en-GB.com_google.ini&quot; from&lt;br /&gt;&lt;br /&gt;language-&gt;en-GB-&gt;en-GB.com_google.ini&lt;br /&gt;&lt;br /&gt;And change &quot;Thanks for you !&quot; with ur desire ...........&lt;br /&gt;&lt;br /&gt;2. Easy way to developers&lt;br /&gt;&lt;br /&gt;find the file &quot;controller.php&quot; from&lt;br /&gt;&lt;br /&gt;components-&gt;com_google-&gt;controller.php&lt;br /&gt;&lt;br /&gt;go to line No 60 or find out this code &quot;$msg = JText::_(&#39;GOOGLE_THANKS&#39;); &quot;&lt;br /&gt;&lt;br /&gt;on there u can put any text instead of &quot;GOOGLE_THANKS&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Enjoy with joomla .............&lt;br /&gt;&lt;br /&gt;wAp</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/8841850270600778200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/05/change-comgoogle-thanks-for-you.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/8841850270600778200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/8841850270600778200'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/05/change-comgoogle-thanks-for-you.html' title='change com_google Thanks for you !'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-5472890745431911946</id><published>2010-05-22T07:41:00.000+05:30</published><updated>2010-05-22T08:03:59.671+05:30</updated><title type='text'>Layout &quot;default&quot; not found - joomla</title><content type='html'>last time we reach up to view stage. But there also we face &#39;Layout &quot;default&quot; not found&#39; error.&lt;br /&gt;let see to solve this&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;see our folder structure&lt;br /&gt;administrator-&gt;components-&gt;com_lanka1-&gt;views-&gt;lanka1s-&gt;&lt;br /&gt;&lt;br /&gt;On here u need to make a new folder call &quot;tmpl&quot; and also make new file &quot;default.php&quot;&lt;br /&gt;&lt;br /&gt;then it show as follows&lt;br /&gt;administrator-&gt;components-&gt;com_lanka1-&gt;views-&gt;lanka1s-&gt;tmpl-&gt;default.php&lt;br /&gt;&lt;br /&gt;can u think wt are the codes need to store &quot;default.php&quot;?&lt;br /&gt;&lt;br /&gt;yes see following code&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:monospace;font-size:100%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; white-space: pre;font-size:13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:Georgia, serif;font-size:130%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; white-space: normal;font-size:16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;No need any code to here to see our final out put ................ he he he&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;see the final out put............ and enjoy with it. First step is successfully finished &lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_IFvexGQVZbg/S_c_7hctZyI/AAAAAAAAAHE/aE0RPQq8N9Q/s1600/finalaoutput.png&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 520px; height: 244px;&quot; src=&quot;http://1.bp.blogspot.com/_IFvexGQVZbg/S_c_7hctZyI/AAAAAAAAAHE/aE0RPQq8N9Q/s320/finalaoutput.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5473914163915745058&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;wAp</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/5472890745431911946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/05/layout-default-not-found-joomla.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/5472890745431911946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/5472890745431911946'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/05/layout-default-not-found-joomla.html' title='Layout &quot;default&quot; not found - joomla'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_IFvexGQVZbg/S_c_7hctZyI/AAAAAAAAAHE/aE0RPQq8N9Q/s72-c/finalaoutput.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-5873824523744484868</id><published>2010-05-22T07:10:00.000+05:30</published><updated>2010-05-22T08:04:12.495+05:30</updated><title type='text'>500 - An error has occurred - joomla</title><content type='html'>Do u remember last time error? if not ple go &lt;a href=&quot;http://joomlasrilanka.blogspot.com/2010/04/failed-to-open-stream-joomla.html&quot;&gt;here&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&quot;View not found [name, type, prefix]: lanka1s,html,lanka1sView&quot; wt is this? this say, there is not &#39;view&#39; page on this component. So today we can lean about &#39;how to make a view pages&#39;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;MVC or module view component, Now we are in view stage, For this we need new folder to store template files or view pages.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ple make a new folder call &quot;views&quot; under that&quot;, again make a new folder call &quot;lanka1s&quot; and &quot;view.html.php&quot; file on there&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;see our folder structure &lt;/div&gt;&lt;div&gt;administrator-&gt;components-&gt;com_lanka1-&gt;views-&gt;lanka1s-&gt;view.html.php&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;see the content of  &quot;view.html.php&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Lanka1   default controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// No direct access&lt;br /&gt;defined( &#39;_JEXEC&#39; ) or die( &#39;Restricted access&#39; );&lt;br /&gt;&lt;br /&gt;jimport( &#39;joomla.application.component.view&#39; );&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* lanka1 View&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;*/&lt;br /&gt;class Lanka1sViewLanka1s extends JView&lt;br /&gt;{&lt;br /&gt;/**&lt;br /&gt;* lanka1 view display method&lt;br /&gt;* @return void&lt;br /&gt;**/&lt;br /&gt;function display($tpl = null)&lt;br /&gt;{&lt;br /&gt;JToolBarHelper::title(   JText::_( &#39;Lanka1&#39; ), &#39;generic.png&#39; );&lt;br /&gt;JToolBarHelper::deleteList();&lt;br /&gt;JToolBarHelper::editListX();&lt;br /&gt;JToolBarHelper::addNewX();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;parent::display($tpl);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ooooop&#39;s he he ................ can u see there is another error&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_IFvexGQVZbg/S_c7Y-gU8eI/AAAAAAAAAG8/-TIuH6ZsS5E/s1600/Layout.png&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 320px; height: 68px;&quot; src=&quot;http://1.bp.blogspot.com/_IFvexGQVZbg/S_c7Y-gU8eI/AAAAAAAAAG8/-TIuH6ZsS5E/s320/Layout.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5473909172373615074&quot; /&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;wt are the new things of this code&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:monospace;font-size:100%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; white-space: pre;font-size:13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:Georgia, serif;font-size:130%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; white-space: normal;font-size:16px;&quot;&gt;&lt;div&gt;1.JToolBarHelper::title(   JText::_( &#39;Lanka1&#39; ), &#39;generic.png&#39; );&lt;/div&gt;&lt;div&gt;this is use to set the TITLE of the page and can use existing image to take a handy look :D&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2.JToolBarHelper::deleteList();&lt;/div&gt;&lt;div&gt;On this stage we do not need this but in future we need to delete items&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3.JToolBarHelper::editListX();&lt;/div&gt;&lt;div&gt;On this stage we do not need this but in future we need to edit items&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. JToolBarHelper::addNewX()&lt;/div&gt;&lt;div&gt;On this stage we do not need this but in future we need to add items&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;ple connect with next lesson to solve above issue&lt;br /&gt;&lt;br /&gt;wAp</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/5873824523744484868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/05/500-error-has-occurred-joomla.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/5873824523744484868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/5873824523744484868'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/05/500-error-has-occurred-joomla.html' title='500 - An error has occurred - joomla'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_IFvexGQVZbg/S_c7Y-gU8eI/AAAAAAAAAG8/-TIuH6ZsS5E/s72-c/Layout.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917934279436344995.post-4374881635361220570</id><published>2010-04-28T08:20:00.000+05:30</published><updated>2010-04-28T08:40:16.876+05:30</updated><title type='text'>failed to open stream - joomla</title><content type='html'>Following error occur on last time article. Now we try to solve this issue ...............&lt;br /&gt;&quot;&lt;br /&gt;&lt;span style=&quot;color: rgb(153, 0, 0);&quot;&gt;Warning: require_once(C:\AppServ\www\Joomla\administrator\components\com_lanka1\controller.php) [function.require-once]: failed to open stream: No such file or directory in C:\AppServ\www\Joomla\administrator\components\com_lanka1\lanka1.php  on line 17&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(153, 0, 0);&quot;&gt;Fatal error: require_once() [function.require]: Failed opening required &#39;C:\AppServ\www\Joomla\administrator\components\com_lanka1\controller.php&#39; (include_path=&#39;.;C:\php5\pear&#39;) in C:\AppServ\www\Joomla\administrator\components\com_lanka1\lanka1.php on line 17&lt;/span&gt;&lt;br /&gt;&quot;&lt;br /&gt;&lt;br /&gt;Wt is this error? Yes this is arising due to MVC. Base on MVC structure, our component automatically find &quot;&lt;span style=&quot;color: rgb(153, 0, 0);&quot;&gt;controller.php&lt;/span&gt;&quot; file. But at the moment it is not in our com_lanka1 folder.&lt;br /&gt;&lt;br /&gt;we can use any name for this. But standard naming is important. see the code of &quot;lanka1.php&quot; can u see&lt;br /&gt;&lt;br /&gt;&quot;require_once( JPATH_COMPONENT.DS.&#39;&lt;span style=&quot;color: rgb(102, 0, 0);&quot;&gt;controller.php&lt;/span&gt;&#39; );&quot;&lt;br /&gt;&lt;br /&gt;code on their? Mmm ... this is the reason arrising above file not found issue.&lt;br /&gt;&lt;br /&gt;Following code show the simple syntax of controller.php file&lt;br /&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Lanka1  default controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;* @link http://inetlanka.com&lt;br /&gt;* @license  GNU/GPL&lt;br /&gt;* @auth inetlanka web team - [ info@inetlanka.com / wapnishantha@gmail.com ]&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// No direct access&lt;br /&gt;defined( &#39;_JEXEC&#39; ) or die( &#39;Restricted access&#39; );&lt;br /&gt;&lt;br /&gt;jimport(&#39;joomla.application.component.controller&#39;);&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Lanka1  Component Controller&lt;br /&gt;*&lt;br /&gt;* @package    Joomla.component&lt;br /&gt;* @subpackage Components&lt;br /&gt;*/&lt;br /&gt;class Lanka1sController extends JController&lt;br /&gt;{&lt;br /&gt;/**&lt;br /&gt;* Method to display the view&lt;br /&gt;*&lt;br /&gt;* @access public&lt;br /&gt;*/&lt;br /&gt;function display()&lt;br /&gt;{&lt;br /&gt;parent::display();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Can u guess the essential part of this code? Mmm ...........&lt;br /&gt;&lt;br /&gt;yes it is &quot;class Lanka1sController extends JController&quot;. Look wt is the text it use. &quot;Lanka1sController&quot; In this word, [ Did u remeber?our component name is com_&lt;span style=&quot;color: rgb(153, 0, 0);&quot;&gt;lanka1&lt;/span&gt; ]. Here we take it as lanka1&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;color: rgb(153, 0, 0);&quot;&gt;s&lt;/span&gt;&lt;/span&gt;. must remember this &quot;S&quot; is very importent. And also our class extend to core joomla class through the &quot;JController&quot;&lt;br /&gt;&lt;br /&gt;ok when after adding &quot;&lt;span style=&quot;color: rgb(153, 0, 0);&quot;&gt;controller.php&lt;/span&gt;&quot; to our testing  component [administrator -&gt;components-&gt;com_lanka1-&gt;&lt;span style=&quot;color: rgb(153, 0, 0);&quot;&gt;controller.php&lt;/span&gt;]. again visit following link, from joomla admin [ &lt;a href=&quot;http://your%20joomla%20path/administrator/index.php?option=com_lanka1&quot;&gt;http://YOUR JOOMLA PATH/administrator/index.php?option=com_lanka1&lt;/a&gt; ]&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_IFvexGQVZbg/S9ejtUO24YI/AAAAAAAAAFs/QBvCzjAV11c/s1600/view.png&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 72px;&quot; src=&quot;http://1.bp.blogspot.com/_IFvexGQVZbg/S9ejtUO24YI/AAAAAAAAAFs/QBvCzjAV11c/s320/view.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5465016671757853058&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Is this the error? yes this is the error we face on this stage.&lt;br /&gt;&lt;br /&gt;continue with next lesson&lt;br /&gt;&lt;br /&gt;wAp</content><link rel='replies' type='application/atom+xml' href='http://joomlasrilanka.blogspot.com/feeds/4374881635361220570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/04/failed-to-open-stream-joomla.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/4374881635361220570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917934279436344995/posts/default/4374881635361220570'/><link rel='alternate' type='text/html' href='http://joomlasrilanka.blogspot.com/2010/04/failed-to-open-stream-joomla.html' title='failed to open stream - joomla'/><author><name>වැප්</name><uri>http://www.blogger.com/profile/10916923494645749137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_IFvexGQVZbg/TDQC_QWDp-I/AAAAAAAAAIM/-qoizr5UVwI/s1600-R/36703_1518553126750_1322169573_31416052_7194547_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_IFvexGQVZbg/S9ejtUO24YI/AAAAAAAAAFs/QBvCzjAV11c/s72-c/view.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>