coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Installation & Setup => Topic started by: gmcms on October 08, 2004, 07:02:50 AM

Title: Change Metas
Post by: gmcms on October 08, 2004, 07:02:50 AM
Hi, How and where can I change the meta to add meta description and some Dublin Core Metas ?
I've seen that the meta keywords is made of picture description, but I can't find where to properly modify the code.
Thanks
Title: Re: Change Metas
Post by: Joachim Müller on October 08, 2004, 07:46:12 AM
if you want static meta tags, just put them into themes/yourtheme/template.html right next to (in front or after) {META}
More recent versions of coppermine put the keywords your specified for a pic  into the keywords meta tag. You can add other info as well - take a look at displayimage.php, find     if ($CURRENT_PIC_DATA['keywords']) { $meta_keywords = "<meta name=\"keywords\" content=\"".$CURRENT_PIC_DATA['keywords']."\">"; }

    pageheader($album_name . '/' . $picture_title, $meta_keywords, false);
In fact, you can add dynamic meta tags this way on nearly every coppermine page by modifying the call for the pageheader function.

To tell you more, post what you actually want to accomplish.

Joachim
Title: Re: Change Metas
Post by: gmcms on October 08, 2004, 03:54:56 PM
In fact I want to add some keywords to those taken from pics and add a meta description to each page. The meta description can be the same for each page.
Thanks
Title: Re: Change Metas
Post by: Joachim Müller on October 09, 2004, 04:45:47 AM
if the meta descripton is to be the same for all coppermine pages, do as suggested and edit themes/yourtheme/template.html and add whatever meta tags you like right after {META}.

Joachim
Title: Re: Change Metas
Post by: gmcms on October 09, 2004, 10:22:32 PM
All right.
I modify template.html and put the meta description fixed in it.
And I modify displayimahe.php, to add somme fixed keywords in addition to those dynamicaly taken from the pic.
Good
Thanks
Title: Re: Change Metas
Post by: jriba on December 20, 2004, 04:01:19 PM
Hi GauGau,

You said to put our static meta tags before or after {META}.

Do we use the <meta name="keywords" content="pictures"> format there?

If so, isn't this format limited to tags INSIDE the <HEAD> </HEAD>?
Title: Re: Change Metas
Post by: Casper on December 20, 2004, 07:05:16 PM
The {META} tag is in the head, and yes that is where they should go., after the above tag.

note, you should stop using uppercase for tags now, that is deprecated.  <HEAD> bad, <head> good.
Title: Re: Change Metas
Post by: jriba on January 13, 2005, 03:40:47 AM
{META} in template.html is in the body, not the head; that's what I was reffering to on my previous post.
Title: Re: Change Metas
Post by: donnoman on January 13, 2005, 03:47:47 AM
then your template file is incorrect, {META} should appear between <head> and </head>.

Nowhere else does any good.
Title: Re: Change Metas
Post by: jriba on January 13, 2005, 04:08:03 AM
Then you guys should check the template.html file that is being distributed in the Hardwired theme, because that's how it is there.
...
</head>
<body>{META}
...
...
..
</body>
Title: Re: Change Metas
Post by: donnoman on January 13, 2005, 08:27:32 AM
What version of coppermine are you using?

I went all the way back to rev 1.1 in cvs on stable and hardwired's {META} tag is in the right place.

<head>
<title>{TITLE}</title>
<meta http-equiv="content-type" content="text/html; charset={charset}" />
{META}
<link rel="stylesheet" href="themes/hardwired/style.css" />
<script type="text/javascript" src="scripts.js"></script>
</head>


latest

<head>
<title>{TITLE}</title>
<meta http-equiv="content-type" content="text/html; charset={charset}" />
<meta http-equiv="Pragma" content="no-cache" />
{META}
<link rel="stylesheet" href="themes/hardwired/style.css" />
<script type="text/javascript" src="scripts.js"></script>
<!--
$Id: template.html,v 1.5 2004/08/16 20:58:51 gaugau Exp $
-->
</head>


If you are not running 1.3.2 upgrade. If you are, I would regrab the theme files, looks like something has edited yours.
Title: Re: Change Metas
Post by: Joachim Müller on January 13, 2005, 10:14:42 AM
also, if you're sure the original file had the {META} tag in the wrong place, could you tell us where you got the file from?

Joachim
Title: Re: Change Metas
Post by: jriba on January 13, 2005, 09:27:57 PM
I'm 100% positive.. I even reinstalled Coppermine in a different directory to check it out, and the {META} is inside the body and not the head.   I installed it (CPG 1.3.2) through Fantastico.
Title: Re: Change Metas
Post by: Joachim Müller on January 14, 2005, 08:21:07 AM
OK, thanks for posting. This confirms why we say that fantastico build s**k - we always recommend to install coppermine from the original package that is available here at our site.

Joachim