I tried to use Joomla JED Checker to check my plugin, but got the warning – PHP Headers missing GPL License Notice. How to fix it
You need to add license info to all your php files like following
// Licensed under the GPL v3
I tried to use Joomla JED Checker to check my plugin, but got the warning – PHP Headers missing GPL License Notice. How to fix it
You need to add license info to all your php files like following
// Licensed under the GPL v3
If I woiuld like to run custom SQL query from Joomla 3 plugin, what Joomla function or method should I call
You can call methods “setQuery” and “exec” to execute your custom sql query from your Joomla 3 plugin
$db = &JFactory::getDBO(); $query = "SELECT ..."; $db->setQuery($query); $db->exec($query); or $rows = $db->objectList();
How can I print out the Joomla sql query
You can use toString method of print out the sql
echo $query->__toString();
I wrote Joomla plugin and when I tried to install via Joomla admin panel, I got error like JInstaller: :Install: Cannot Find Joomla XML Setup File. How can I fix this issue
1. double check your XML setup file of your Joomla plugin and make sure its valid.
2. Make sure your XML setup file is matching the version of Joomla
Here is an example of XML file for Joomla 3 plugin
<?xml version="1.0" encoding="utf-8"?> <extension type="plugin" version="1.0" method="upgrade" group="Plugins"> <name>Softwarehtec.com Example Plugin</name> <creationDate>{__DAY__} {__MONTH__} {__YEAR__}</creationDate> <version>{__PLUGIN_VERSION__}</version> <author>SoftwareHtec</author> <authorEmail>wp@softwarehtec.com</authorEmail> <authorUrl>http://softwarehtec.com</authorUrl> <copyright>(C) 2010-{__YEAR__} SoftwareHtec.com. All rights reserved.</copyright> <license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license> <description>This plugin enables you to setup your Example plugin</description> <files> <filename plugin="softwarehtec">softwarehtec.php</filename> <filename>softwarehtec_end.php</filename> </files> </extension>