Bonjour
j essaye un plugin pour remplir automatiquement article introtext (Joomla 4.2 rc2)
le plugin s installe mais quand je l active j ai l erreur syntax error, unexpected variable "$article"
un coup de main ?
merci
j essaye un plugin pour remplir automatiquement article introtext (Joomla 4.2 rc2)
le plugin s installe mais quand je l active j ai l erreur syntax error, unexpected variable "$article"
un coup de main ?
merci
Code HTML:
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Plugin\PluginHelper
use Joomla\Database\DatabaseDriver
use Joomla\Database\ParameterType;
class PlgContentText extends CMSPlugin
{
public function onContentAfterSave($context, &$article, $isNew): void
{
if ($context !== 'com_content.form') {
return;
}
if (!$isNew) {
return;
}
$tag = $tags = $tags_ = '';
$db = $this->db;
$q_cat = 'SELECT CONCAT(" #" . a.title) FROM #__tags a INNER JOIN #__contentitem_tag_map b ON a.id = b.tag_id WHERE b.
content_item_id =' $article->catid .';';
ect....

Commentaire