Placement of Metadata within Template.Html Placement of Metadata within Template.Html
 

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

Placement of Metadata within Template.Html

Started by LGLDSR, August 01, 2007, 09:37:18 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

LGLDSR

Where within the Template.Html file can I put my own Metadata so as to be accessible by the various Search Engines?

In part below is the template that I am using:

<html dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}">
<meta http-equiv="Pragma" content="no-cache">
<title>{TITLE}</title>
<link rel="stylesheet" href="themes/igames/style.css" type="text/css">
</head>
<body>
{META}
<script type="text/javascript" src="scripts.js"></script>
<script language="JavaScript" type="text/JavaScript">

Which of these fields would I append to include my own Metadata? I ask only because of the word 'Pragma' already contained within "<meta http-equiv="Pragma" content="no-cache">" and am unsure if that particular word is required and therefore should not be removed. Any help as to where I would add my Metadata would be greatly appreciated.

Thanks,

Lyman

Joachim Müller

The {META}-token must not be moved into the body section - move it back to where it belongs (underneath the existing meta tags). Add your own meta tags there as well - see the example below:<html dir="{LANG_DIR}">
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="foo" content="bar" />
{META}
<link rel="stylesheet" href="themes/igames/style.css" type="text/css">
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
The same advice goes for the script lines - move them back up into the <head> section as suggested in above example. Don't mess with things you don't understand. Read up HTML tutorials for further advice.

The {META}-Token is just a placeholder that is getting replaced with actual content when the template is being parsed - take a look at the output your gallery creates for details.

LGLDSR

Quote from: GauGau on August 01, 2007, 10:11:20 AM
The {META}-token must not be moved into the body section - move it back to where it belongs (underneath the existing meta tags). Add your own meta tags there as well - see the example below:<html dir="{LANG_DIR}">
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="foo" content="bar" />
{META}
<link rel="stylesheet" href="themes/igames/style.css" type="text/css">
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
The same advice goes for the script lines - move them back up into the <head> section as suggested in above example. Don't mess with things you don't understand. Read up HTML tutorials for further advice.

The {META}-Token is just a placeholder that is getting replaced with actual content when the template is being parsed - take a look at the output your gallery creates for details.

Gau-Gau,

Thanks for the quick reply.

>Don't mess with things you don't understand.

I didn't tweat it or otherwise modify it outside of what can be configured within the admin capabilities of Coppermine. The code I posted is from the file Template.Html was taken from the directory themes/igames. I did pay someone to setup Coppermine (I was swamped with other projects) but I don't see why they would have modified that template file.

What I am hearing you say is that the contents are not as they should be.

Thanks again,

Lyman

Joachim Müller

Quote from: LGLDSR on August 01, 2007, 11:59:51 AMThe code I posted is from the file Template.Html was taken from the directory themes/igames.
That is just not correct (I even tend to say it's a lie).
Below is the part of the original code of themes/igames/template.html and your modified version.
OriginalYour edited version
<html dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
{META}
<link rel="stylesheet" href="themes/igames/style.css" type="text/css" />
<script type="text/javascript" src="scripts.js"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</script>
<!-- $Id: template.html 2688 2005-12-04 03:22:35Z donnoman $ -->
</head>
<body>
<html dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}">
<meta http-equiv="Pragma" content="no-cache">
<title>{TITLE}</title>
<link rel="stylesheet" href="themes/igames/style.css" type="text/css">
</head>
<body>
{META}
<script type="text/javascript" src="scripts.js"></script>
<script language="JavaScript" type="text/JavaScript">

I'm not going to continue this useless debate - it's not my mission to teach you HTML basics, and it's not my job to look into issues caused by silly edits (no matter if they have been performed by your or a third-party). I have told you what needs to be said, figure out the rest on your own. I don't care if you are too busy to look after your own project and hire incompetent hands - just don't come here looking for support on issues that have been caused by someone you hired and recommended so fiercly, even though we knew better.

I'm out of this thread. Bye.

LGLDSR

Gau-Gau,

That's quite a difference...not sure why that is. Thanks for the comparison screenshots.

Thanks again,

Lyman