### 1. How does the `<update>` tag locate the directory?
The `<update>` element within the Joomla! extension manifest file is used to define the schema update files for your extension. The path you specify in `<schemapath>` is relative to the root of the extension directory.
When you specify:
โค้ด: เลือกทั้งหมด
xml
<schemapath type="mysql">install/updates/</schemapath>
### 2. Why doesn't it work when added inside the `<administration>` tag?
In Joomla!, the `<administration>` tag is used to define files and settings specific to the administrator part of a component. Elements such as `<files>`, `<menu>`, and `<submenu>` are typically included within this tag to add administrative features and files.
However, the `<install>`, `<uninstall>`, and `<update>` tags should not be placed inside `<administration>` because they are not part of the administrator-specific configuration. Instead, they are part of the overall extension installation and update process, which applies to both the frontend and backend of the component.
Placing them inside `<administration>` can cause Joomla! to not recognize or execute these tasks, leading to issues with installation, updates, or uninstallation processes of the component.
### Summary
- **Location of Directories**: The paths in `<update>` and similar tags are relative to the root of the extension's directory structure, not specifically to any subdirectory like `administrator/`.
- **Tag Placement**: `<install>`, `<uninstall>`, and `<update>` are global to the extension and should remain outside of the `<administration>` section to function correctly.
By ensuring that these tags are correctly placed at the top level of the manifest file, Joomla! can handle the installation, updating, and uninstallation of your component effectively.