Forum Subscriber Support - Joomla Extension - Erweiterungen SEOFLI - SEO Friendly Links and Images Images alt tag not coming from Article title Images alt tag not coming from Article title
1 Jahr 10 Monate her #16035 von gdadmin Hi
Using the SEOFLI - SEO Friendly Links and Images to add alt text on the images.
On category blog pages in Joomla the intro image if missing the alt text its adding the image name instead of article title.
I did some customizations in the plugin code below to pick article title instead. If it could be an improvement in next update
if (preg_match('@title\s*=\s*[\"\'](.*)[\"\']@Uis', $imageNew, $titleText)) {
if (preg_match('@alt\s*=\s*[\"\'](.*)[\"\']@Uis', $imageNew, $altText)) {
if (empty($altText[1]) || $this->params->get('overwriteImages', 0)) {
$imageName = $titleText[1];
$imageNew = str_replace($altText[0], 'alt="' . $imageName . '"', $imageNew);
$images[1][$count] = str_replace($altText[0], 'alt="' . $imageName . '"', $images[1][$count]);
}
}else{
$imageWithAlt = $images[1][$count] . ' alt="' . $titleText[1] . '"';
$imageNew = str_replace($images[1][$count], $imageWithAlt, $imageNew);
$images[1][$count] = $imageWithAlt;
}
return;
}
Dieses Thema wurde gesperrt.
gdadmin Autor Offline Junior Boarder Weniger Mehr Beiträge: 29 Dank erhalten: 0 1 Jahr 10 Monate her #16038 von Viktor Bitte anmelden, um die Antwort zu sehen. Achtung: Eine gültige
Subscription wird benötigt, um einen Account zu aktivieren.
Dieses Thema wurde gesperrt.
Weniger Mehr Beiträge: 8474 Dank erhalten: 938
Forum Subscriber Support - Joomla Extension - Erweiterungen SEOFLI - SEO Friendly Links and Images Images alt tag not coming from Article title
Ladezeit der Seite: 0.118 Sekunden