Change Metas Change Metas
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Change Metas

Started by gmcms, October 08, 2004, 07:02:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gmcms

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

Joachim Müller

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

gmcms

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

Joachim Müller

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

gmcms

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

jriba

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>?

Casper

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.
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

jriba

{META} in template.html is in the body, not the head; that's what I was reffering to on my previous post.

donnoman

then your template file is incorrect, {META} should appear between <head> and </head>.

Nowhere else does any good.

jriba

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>

donnoman

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.

Joachim Müller

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

jriba

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.

Joachim Müller

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