For example I have added to keywords to some picture (separate with spaces) as gallery says.
And when I look at HTML source I see this one:
<meta name="keywords" content="help tree"/>
But meta name="keywords" must be separated with commas like:
<meta name="keywords" content="help,tree"/>
For example you can look at this page's HTML code:
<meta name="keywords" content="coppermine,gallery,picture,forum" />
Open:
displayimage.php
Find:
if ($CURRENT_PIC_DATA['keywords']) { $meta_keywords = "<meta name=\"keywords\" content=\"".$CURRENT_PIC_DATA['keywords']."\"/>"; }
Replace with:
if ($CURRENT_PIC_DATA['keywords']) { $meta_keywords = "<meta name=\"keywords\" content=\"".preg_replace('/\s+/', ',', $CURRENT_PIC_DATA['keywords'])."\"/>"; }
Done for 1.5.
but i think meta tags are no more useful. from SEO point of view content is the main thing.
Really? Great to hear that. Welcome to the bugs board, where we talk about bugs and not about usefullness of features. Please keep out of the discussion here.
The resources-consuming preg_replace should not be used if you can use the straightforward str_replace
I have replaced if ($CURRENT_PIC_DATA['keywords']) { $meta_keywords = "<meta name=\"keywords\" content=\"".$CURRENT_PIC_DATA['keywords']."\"/>"; }
with if ($CURRENT_PIC_DATA['keywords']) {
$meta_keywords = "<meta name=\"keywords\" content=\"".rtrim(str_replace(' ', ',', $CURRENT_PIC_DATA['keywords']),',')."\"/>";
}
in the SVN repository for cpg1.4.x. Marking thread as "fixed" and moving accordingly.