SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 212 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

php
base
foo



This will create two folders, base and foo, in the plugin folder mylibrary.
Chapter 6
[ 157 ]
Note that we have to include a file with a plugin
element, base.php.
To import elements from this pseudo-library we can use the JLoader class. This class
is what sits behind the regularly used jimport() function, which we use to import
parts of the Joomla! library.
Let's create a function called myimport() to import library elements from the plugin
group mylibrary.
function myimport($path)
{
return JLoader::import($path, JPATH_PLUGINS . DS . 'mylibrary');
}
A good place to create this function is in the base.php file. So, bearing in mind our
folder structure looks something like this:
how do we use the myimport() function? This example demonstrates how we would
import all of the files in mylibrary/foo/bar:
JPluginHelper::importPlugin('mylibrary', 'base');
myimport('foo.bar.*');
The first line of the example only needs to be used once.


Pages:
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6