Meta Tags Help.. Meta Tags Help..
 

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

Started by fareforce, January 23, 2005, 08:58:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fareforce

I did a bit searching and got close, but I can't figure this one out.

I have added dynamic meta tags "description" to most of my pages by editing displayimage.php.. That part works great. My problem is that on my main page, and the main album pages dont have any meta description tags. However if I add them into template.php I have two sets of meta description tags on my picture pages..

Does anyone know how I can add a set of meta description tags to my main page (index.php) and my main album pages (???.php)?
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

Joachim Müller

1) There's no such file as template.php, you probably mean template.html ;D
2) You could add a conditional (if/then) into the pageheader function to only add certain meta keywords if the meta_keywords string is empty.

Please post your actual modifications in displayimage.php for more details - since we can't know what exactly you did, we can't give more detailed advice.

Joachim

fareforce

Good catch..  I was just making sure everyone has had there daily coffee with the template.php thing.. lol

This is what I did to displayimage.php:
    $nav_menu = html_img_nav_menu();
    $picture = html_picture();
    $votes = html_rating_box();
    $pic_info = html_picinfo();
    $comments = html_comments($CURRENT_PIC_DATA['pid']);
    if ($CURRENT_PIC_DATA['keywords']) { $meta_keywords = "<meta name=\"keywords\" content=\"alaska, studio, alaska studio, pictures, photograph, nature, purchase, bears, sheep, moose, ptarmigan, wildlife, nature pictures, alaskan pictures, alaskan studios, alaska studios, alaskastudios.com, northern lights, aurora borealis, aurora, alaskastudio.com, dahl sheep, grizzly bear, brown bear, black bear, mallard, duck, swan, goose, geese, last frontier, ".$CURRENT_PIC_DATA['keywords']."\" />"; }

    pageheader($album_name . '/' . $picture_title, $meta_keywords, false);


This is what I did to template.html:
<META HTTP-EQUIV="EXPIRES" CONTENT="0">
<META NAME="RESOURCE-TYPE" CONTENT="DOCUMENT">
<META NAME="DISTRIBUTION" CONTENT="GLOBAL">
<META NAME="AUTHOR" CONTENT="{TITLE} gallery">
{META}


Live site at : http://www.alaskastudio.com
~Fare
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

Joachim Müller

Quote<META NAME="AUTHOR" CONTENT="{TITLE} gallery">
very questionable use of the tag... ::)

Add the conditional like this: edit themes/yourtheme/theme.php, findfunction pageheader($section, $meta = '')and replace withfunction pageheader($section, $meta = '<meta name="keywords" content="alaska, studio, alaska studio, pictures, photograph, nature, purchase, bears, sheep, moose, ptarmigan, wildlife, nature pictures, alaskan pictures, alaskan studios, alaska studios, alaskastudios.com, northern lights, aurora borealis, aurora, alaskastudio.com, dahl sheep, grizzly bear, brown bear, black bear, mallard, duck, swan, goose, geese, last frontier" />')This way, the meta tag will be pre-filled with your keywords when empty on function call.
I wouldn't spend that much time with this anyway, as the importance of meta keywords is not that high: there are better ways to increase the relevance of your site in the indexes of search engines, not merely technical methods.

HTH

Joachim

fareforce

Thank you much.. Just what I was looking for!

What would you reccomend to increase the relevance of my site in the indexes of search engines?
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

Joachim Müller

Good use of keywords, pic title and description (the hard way - making your content relevant) is the best method. Search engines like google also check the relevance of text: if a keyword is being repeated on the page (avoid silly repeating like "alaska alaska alaska"), the search engine will see it as being more relevant. To increase your page rank, you need other relevant pages that link to your page, so you should advertize your site (do so carefully).
There's a whole industry that has built up around this, they call it "search engine optimization" (SEO). There are many good books and also some free pages on the internet that deal with seo, but the bottom line is: having good content is most important.
I suggest you google for seo.

Joachim