Is there some method to get components version by it's name? I tried a lot of examples but didn't find any that would work. The thing like JComponentHelper::getParams('com_mycomponent')->get('version')
doesn't work as it retrieves values from jos_extensions.params
row. My components version is only in jos_extensions.manifest_cache
row...
相关问题
- How can I change the Joomla administrator URL By P
- Joomla >1.7 hide log messages from browser
- Joomla 2.5 creating component and saving data
- Joomla - how to hightlight the menu item for activ
- Joomla! - How to add extra information for user re
相关文章
- Fatal error: Call to a member function getKeyName(
- How to import Joomla to Azure?
- How to center images in a responsive grid with CSS
- offcanvas menu link broken
- access joomla session in php - codeigniter
- How to get article intro Image by Id Joomla 3
- Internal article links in Joomla
- Best way to prevent SQL injections in Joomla
Based on the answer of CoalaWeb, but with less code (more code use from the framework):
You can use the following:
Joomla 2.5:
Joomla 3.x (Platform 13.3 and below)
Joomla 3.2+:
getXML
was made deprecated as of 2 weeks after this answer. Instead, use SimpleXMLObviously this is an example for the Wrapper component so change the paths to whatever suits your needs.
Hope this helps
Hi I use this function to return versions from the extensions table based on element (I find its more reliable than name) but you could easily substitute element for name.
I have this in a plugin and the function only needs the element($ext) to check against the current extension in the table.
Joomla 1.5, 2.5, 3.X.
We are using different XML files for Joomla 1.5 (com_ponent.xml) and for 2.5, 3.X (_manifest.xml) versions. Using SimpleXML :
To fully leverage the Joomla API, use the JComponentHelper, \Joomla\Registry\Registry and JTable classes:
This applies mainly to newer 3.x versions of Joomla; 3.6+ probably.
If you are looking for a listing of all components within your Joomla site, you can find them by using the Extension Manager -> Manage and select type filter "Components". This will give you a listing with a Version column showing the versions of all the Components. That's an answer to your original question without coding.