Home > Backend Development > PHP Tutorial > Joomla secondary development study notes

Joomla secondary development study notes

WBOY
Release: 2016-08-08 09:31:45
Original
1419 people have browsed it
  • Joomla directory structure

/administrator is the path to the management backend
/cache is the cache directory
/components is the component directory
/includes is an important directory, which contains various scripts, functions, etc. required for Joomla to run.
/language is the website language directory.
/plugins is the extension (trigger) directory. The
/modules directory is where module programs are stored. Joomla has defined more than ten module locations, such as header, footer, left, right, debug, user1, advert2, etc.
/templates template directory, each subdirectory inside corresponds to a template
/libraries class package directory, which are all important class files
/logs log directory, which stores the generated log script files
/images picture directory
/media directory is where various files are stored A place for media files.
/xmlrpc xml remote method call, using xml as the medium for calling remote methods
/tmp temporary directory

  • Joomla! Component Structure

All components of Joomla! follow a specific naming scheme. Each system component has a unique name, and the name cannot include spaces.
The code is divided into two folders. The folder starts with com_, followed by the name of the component. eg: The component is called books. Therefore, you have to create two com_books folders with the same name
When the component is loaded in the foreground, Joomla! will look for the file componentname.php

Under the front components, the directory com_books and the file books.php.
Put it in the background administrator/components, directory com_books, file admin.books.php.

  • Joomla! Interface introduction

Database operations: connect to the database - execute SQL statements - query data

1) Database operation to connect to the database
$db=& JFactory::getDBO();
2) Execute SQL statement
$sql="select * from #_tags";
$db->execute($sql);
3) Query data
$sql="select * from #_tags";
$db->setQuery($sql);
$rows=$db->loadObjectList();
foreach($rows as $row) {
echo $row->tag;
}

Session operation: Call Session

1) Get the value of Session
$session=&JFactory::getSession();
$name="session_name";
$sValue=$session->get($name);
2) Set the value of Session
$ session=JApplication::_createSession();
$name="session_name";
$value="alex";
$session->set($name,$value);

Joomla! Common database tables

Article categories
jos_categories
jos_sections

Joomla! Components, modules, plug-ins
jos_components
jos_modules
jos_plugins

Article
jos_content

Menu
jos_menu

Users and logins
jos_groups
jos_session
jos_users

The above introduces the Joomla secondary development study notes, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template