: This article mainly introduces the secondary development study notes of Joomla. if you are interested in the PHP Tutorial, refer to it.
- Joomla directory structure
/Administrator management background path
/Cache is the cache Directory
/Components is the component directory.
/Des des is an important directory, which contains various scripts and functions required to run Joomla.
/Language is the website language directory.
/Plugins is the extension (trigger) directory.
The/modules Directory is where the module program is stored. Joomla has defined more than 10 module locations, such as header, footer, left, right, debug, user1, and advert2.
/Templates Template directory, where each subdirectory corresponds to a template
/Libraries class package directories are important class files
/Logs log directory to store generated log script files
/Images image directory
/Media directory is the place where various media files are stored.
/Xmlrpc xml remote method call, using xml as the medium for calling remote methods
/Tmp temporary directory
- Joomla! Component Structure
Joomla! All components follow a specific naming scheme. Each system component has a unique name, which cannot contain spaces.
The code is divided into two folders. the folder starts with com _, followed by the component name. Eg: the component name is books. Therefore, you must create two com_books folders with the same name.
Joomla! The file component name. php will be searched
The com_books directory under components at the front end is the file books. php.
Put it in the admin/components Directory, com_books, and the file admin. books. php.
- Joomla! Interface introduction
Database operations: connect to the database -- execute SQL statements -- query data
1) database operations connect to the database
$ Db = & JFactory: getDBO ();
2) execute SQL statements
$ 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 the Session
1) get the Session value
$ Session = & JFactory: getSession ();
$ Name = "session_name ";
$ SValue = $ session-> get ($ name );
2) set the Session value
$ Session = JApplication: _ createSession ();
$ Name = "session_name ";
$ Value = "alex ";
$ Session-> set ($ name, $ value );
Joomla! Common database tables
Document category
Jos_categories
Jos_sections
Joomla! Components, modules, and plug-ins
Jos_components
Jos_modules
Jos_plugins
Article
Jos_content
Menu
Jos_menu
User and login
Jos_groups
Jos_session
Jos_users
The above introduces the secondary development study notes of Joomla, including some content. I hope my friends who are interested in PHP tutorials can help me.