Home > Backend Development > PHP Tutorial > Joomla secondary development study notes, joomla study notes_PHP tutorial

Joomla secondary development study notes, joomla study notes_PHP tutorial

WBOY
Release: 2016-07-13 10:10:18
Original
1015 people have browsed it

Joomla secondary development study notes, joomla study notes

  • Joomla Directory Structure

/administrator is the path to the management background.
/cache is the cache directory.
/components is the component directory.
/includes is an important directory, which contains various scripts required for Joomla to run. , functions, etc.
/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, all important class files
/logs Log directory, stores generated log script files
/images pictures Directory
/media directory is 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

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 named 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, directory com_books, 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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/937012.htmlTechArticleJoomla secondary development study notes, joomla study notes Joomla directory structure/administrator management background path/cache is the cache directory /components is the component directory/inc...
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