Archive for June, 2008

Basic Reminder of how to create Joomla Component

Front End : Lets assume our component is called gold

1- Create a sub folder for the component folder call it com_gold

2- Create a file called gold.php inside of it (Known as Entry Point)

<?php
defined(‘_JEXEC’) or die(‘Restricted access’);

require_once( JPATH_COMPONENT.DS.‘controller.php’ );

if($controller = JRequest::getWord(‘controller’)) {

$path = JPATH_COMPONENT.DS.‘controllers’.DS.$controller.‘.php’;

if (file_exists($path)) {

require_once $path;

} else {

$controller = ;

}

}

$classname = ‘goldController’.$controller;

$controller = new $classname( );

$controller->execute( JRequest::getVar( ‘task’ ) );

$controller->redirect();

?>
?>

Back End :

1- Create a sub folder for the administrator/components folder call it com_gold

2- Create a file called admin.gold.php inside of it

Now you can Access the Component

http://localhost/joomla/index.php?option=com_gold

——————

Adding :

1- Controller to Front End : The controller is responsible for responding to user actions

create a file called controller.php inside com_gold

<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.controller');
class GoldController extends JController
{
    function display()
    {
        parent::display();
    }

}
?>

2- View to Front End : part of the component that is used to render the data from the model in a manner that is suitable for interaction

create views/gold/gold.html.php inside com_gold

<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.view');
class GoldView extends JView
{
    function display($tpl = null)
    {
        $sentence = "Gold Component";
        $this->assignRef( 'sentence', $sentence );

        parent::display($tpl);
    }
}
?>

2- Template to Front End :

create views/gold/tmpl/default.php inside com_gold

<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<h1><?php echo $this->greeting; ?></h1>


Writing Arabic in Flash, and Fixing Multiline Issue!

Yes Finally. Writing Arabic in Flash and using XML!! Weheeeeeee.

I’m excited about it because this was my concern for years and years and yesterday taraaa! I found the extension that worked perfectly!

The main feature of this extension is the ability to embed fonts and the ability to have multiple lines.

its made for Flash 8 and works for ActionScript2. I have flash CS3 and it worked fine too (>.>; since I still use ActionScript *coughs coughts*) anyways the extension is called Flaraby3 there is a lite version for free and a paid version for 30$.

So far the Lite version works perfectly for me and you can download it and see the video tutorial from here.

http://www.arabicode.com/flaraby/flash_arabic_support.php#license

Hope this will help you.
Good Luck!

Return top

INFORMATION

Change this sentence and title from admin Theme option page.