Showing posts with label joomla component. Show all posts
Showing posts with label joomla component. Show all posts

Saturday, February 11, 2012

[Joomla] Hello World Component ver 5

For this version, I'll add the template in our View

First, create the xml file and name it jchelloworld.xml
<?xml version="1.0" encoding="utf-8"?>
<install type="component" version="1.5" method="upgrade">
  <name>JC Hello World</name>
  <creationDate>February 2012</creationDate>
  <author>Joef Clarin</author>
  <version>3.0.0</version>
  <description>JC Hello World</description>
  
  <files>
    <filename>jchelloworld.php</filename>
    <filename>controller.php</filename>
    <folder>views</folder>
    <folder>models</folder>
  </files>
  
  <administration/>
</install>

[Joomla] Hello World Component ver 4

For this version, I'll add the template in our View

First, create the xml file and name it jchelloworld.xml
<?xml version="1.0" encoding="utf-8"?>
<install type="component" version="1.5" method="upgrade">
  <name>JC Hello World</name>
  <creationDate>February 2012</creationDate>
  <author>Joef Clarin</author>
  <version>3.0.0</version>
  <description>JC Hello World</description>
  
  <files>
    <filename>jchelloworld.php</filename>
    <filename>controller.php</filename>
    <folder>views</folder>
  </files>
  
  <administration/>
</install>

[Joomla] Hello World Component ver 3

For this version, I'll add the "V" in MVC

First, create the xml file and name it jchelloworld.xml
<?xml version="1.0" encoding="utf-8"?>
<install type="component" version="1.5" method="upgrade">
  <name>JC Hello World</name>
  <creationDate>February 2012</creationDate>
  <author>Joef Clarin</author>
  <version>3.0.0</version>
  <description>JC Hello World</description>
  
  <files>
    <filename>jchelloworld.php</filename>
    <filename>controller.php</filename>
    <folder>views</folder>
  </files>
  
  <administration/>
</install>

[Joomla] Hello World Component ver 2

For this version, we will be using the "C" in MVC.

First, create the xml file and name it jchelloworld.xml
<?xml version="1.0" encoding="utf-8"?>
<install type="component" version="1.5" method="upgrade">
  <name>JC Hello World</name>
  <creationDate>February 2012</creationDate>
  <author>Joef Clarin</author>
  <version>2.0.0</version>
  <description>JC Hello World</description>
  
  <files>
    <filename>jchelloworld.php</filename>
    <filename>controller.php</filename>
  </files>
  
  <administration/>
</install>

[Joomla] Hello World Component ver 1

Whenever a developer want to learn a new language or framework, it always starts on creating on what we call "Hello World" application or program. So in this post (and on the next ones), I'll teach you on how to create a "Hello World" in Joomla component. This will also let you have an overview of how the MVC structure works in Joomla.

I won't explain every code in this post because this post will be about the codes. Maybe in other post, I will.

[Joomla 1.5 Extension] JC Random Facts 1.0.0

I created a simple Joomla component and module. If you're new to Joomla, then you'd find the said extensions easy to read and study the codes.

JCRandomFacts component let's you add, edit and remove a fact.

JCRandomFacts module displays one fact save from the component.

Download component and module.

Wednesday, January 25, 2012

[Joomla] Copy Backend Pagination Style to Frontend

Using Pagination in frontend have a different look compared from the backend


Frontend


Backend

If you compare the two, of course the backend pagination style is much better. So I will discuss on how to override the frontend pagination so that it will be the same with the backend.

First, look for /administrator/templates/khepri/html/pagination.php and copy the contents of pagination_list_footer($list) and pagination_list_render($list) functions.

Second, look for /templates//html/pagination.php and remove the contents of pagination_list_footer($list) and pagination_list_render($list) functions then paste those codes you copied from the first step.

Third, copy the /administrator/templates/khepri/css /general.css file to your /templates//css/. Of course you could manually copy the css scripts you only needed for the pagination but you may miss to copy some to it’s better to just copy the whole css file.

Fourth, go to /administrator/templates/khepri/images/ and copy all images that its filename starts with j_button2. Then paste them to /templates//images/

There you have it! Backend pagination style now on your frontend. enjoy learning. =D

Tuesday, January 24, 2012

[Joomla] JLIB_APPLICATION_ERROR_VIEW_NOT_FOUND

I always hate tracing an error. How, where, when did the error occur? Arrg, I hate that. I'd rather start from scratch than trace an error.

Anyways, enough of my rambling. I encountered this error while creating a component:

500 - JLIB_APPLICATION_ERROR_VIEW_NOT_FOUND

Possible problem with this type of error is incorrect link to view or misspelled view name. Or the worst, you forgot to create the view (hahaha...)

[Joomla] Error: View cannot be found

You created a component, everything was perfect. It runs in your local drive the way you expect it to be, but once you installed it on live server, it says "View Cannot Be Found"

What's wrong, it's running just in fine in my local? Did I misspelled a file or a folder? Did I forgot to assign the view? The model?

If your answers to those questions are NO and you know it yourself that nothing's wrong, then maybe you got the problem in how you capitalized the letters in your file names or folders names.

In Windows, "myComponent" is equal with "mycomponent" while in Linux, "myComponent" is "myComponent" not "mycomponent".

Got it?

So it's better to not use PascalCasing or camelCasing in your file names and folder names just to be safe.

It's just one small mistake but believe me, I've been figuring out the error for hours without knowing that I just need to convert to small letters my component's folder names.
Related Posts Plugin for WordPress, Blogger...