ausgehend von diesem tutorial
https://docs.joomla.org/J3.x:Creating_a_content_plugin
konnte ich folgenden helper.php code erstellen:
$regex_cat = '/{fotorama:(.*?)}/i';
preg_match_all($regex_cat, $article->text, $matches);
if ($matches)
{
$path = JPluginHelper::getLayoutPath('content', 'fotorama');
foreach ($matches[1] as $catid)
{
$image = new images();
$image ->categoryid = $catid;
$allimages = $image ->getImages();
ob_start();
include $path;
$html = ob_get_contents();
ob_end_clean();
$regex_cat = '/{fotorama:' . str_replace('.', '\.', str_replace('/', '\/', $catid)) . '}/is';
$article->text = preg_replace($regex_cat, $html, $article->text);
}
}
der code übernimmt die catid von meiner plugin syntax {fotoama:"catid"} dabei ist "catid" eine Zahl. Das funktioniert auch prima.
Jetzt möchte ich noch zwei weiter Parameter auslesen. Zum einen "navigation"(charset) und "title"(number). Der gewünschet syntax code würde dann so aussehen {fotorama:5/dots/1}.
Wie gelingt es mir noch die beiden anderen Parameter auszulesen und an die default.php tmpl zu übergeben?