meta, keywords meta, keywords
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

meta, keywords

Started by infamousnomie, April 16, 2004, 07:58:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

infamousnomie

i saw in the theme file that it says in the header {meta} or similar to that i wonder does how to put key words there or does coppermine does itself?? i add the images in using batch add so i dont put any description or keywords do i have to put the keywords for the website manually??
Hot Wallpapers 3D-Celebrites-Animals-& More
                  http://marketdot.com

Joachim Müller

next time, please post only one question per thread!
Keywords in meta-tags will be in cpg1.3.0 (which is still beta). To add them for cpg1.2.x, edit displayimage.php and find$comments = html_comments($CURRENT_PIC_DATA['pid']);and add after itif ($CURRENT_PIC_DATA['keywords']) { $meta_keywords = "<meta name=\"keywords\" content=\"".$CURRENT_PIC_DATA['keywords']."\">"; }
Findpageheader($album_name . '/' . $picture_title, '', false);and replace withpageheader($album_name . '/' . $picture_title, $meta_keywords, false);
Haven't tested, but this should be it...
You can add/modify keywords using the "Edit pics" button next to each album when in admin mode.

GauGau

arne

Hi this works fine for the displayed picture, but not for what I was looking for...

I want all keywords displayed on the index.php as well.
Is that possible by any chance?

http://ww1.australien.shellmaster.de/galerie/index.php

Casper

There was a hack/mod posted to do what you want, but it was many months ago, and I have no idea who by.
A search of the mods board should find it eventually.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

OK, done it as you want, keywords on front page.

You do this by adding the following code to your anycontent.php, and then adding anycontent to the 'contents of main page' in config;

// Select all keywords
starttable("100%", "Keywords used in this gallery", 1);

$result = mysql_query("select keywords from {$CONFIG['TABLE_PICTURES']}");
if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap']);

// Find unique keywords
$keywords_array = array();

while (list($keywords) = mysql_fetch_row($result)) {
       $array = explode(" ",$keywords);

       foreach($array as $word)
       {
       if (!in_array($word,$keywords_array)) $keywords_array[] = $word;
      }
}

sort($keywords_array);
$count = count($keywords_array);

// Result to table
echo "<tr><td>" ;
for ($i = 0; $i < $count; $i++) {
 echo "<a href=\"thumbnails.php?album=search&search=$keywords_array[$i]\">$keywords_array[$i]</a> " ;

}
echo "</td></tr>" ;
endtable();


I have attached an example anycontent.php to this post.

Note;  credit for this code to fotofreek, who submitted this as a mod to the search page, on this thread, http://forum.coppermine-gallery.net/index.php?topic=4768.0
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here