I wrote a Joomla plugin which will eventually load a library.
The path to library is a plugin parameter, as such when the path is incorrect, a message pops up in the backend, together with a link to edit the plugin parameters:
/administrator/index.php?option=com_plugins&view=plugin&client=site&task=edit&cid[]=36
See the 36 at the end? That's my plugin's id in the database (table jos_plugins).
My issue is that this id changes on installation, ie, on different installs, it would be something else.
So I need to find this id programmatically.
The problem is that I couldn't find this id from the plugin object itself (as to why not, that would be joomla's arguably short-sighted design decision).
So unless you know about some neat trick, (I've checked and double checked JPlugin and JPluginHelper classes), I'll be using the DB.
Edit; Some useful links:
http://docs.joomla.org/Plugin_Developer_Overview
http://api.joomla.org/Joomla-Framework/Plugin/JPlugin.html
http://api.joomla.org/Joomla-Framework/Plugin/JPluginHelper.html
http://forum.joomla.org/viewtopic.php?p=2227737
Guess I'll be using the wisdom from that last link...