Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Meta Tags Help..  (Read 3703 times)

0 Members and 1 Guest are viewing this topic.

fareforce

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 66
  • Who are you calling a weasel?
    • Alaska Studio
Meta Tags Help..
« on: January 23, 2005, 08:58:54 pm »

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)?
Logged
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Meta Tags Help..
« Reply #1 on: January 23, 2005, 09:28:17 pm »

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
Logged

fareforce

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 66
  • Who are you calling a weasel?
    • Alaska Studio
Re: Meta Tags Help..
« Reply #2 on: January 23, 2005, 09:57:28 pm »

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:
Code: [Select]
    $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:
Code: [Select]
<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
Logged
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Meta Tags Help..
« Reply #3 on: January 24, 2005, 07:10:14 am »

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

Add the conditional like this: edit themes/yourtheme/theme.php, find
Code: [Select]
function pageheader($section, $meta = '')and replace with
Code: [Select]
function 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
Logged

fareforce

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 66
  • Who are you calling a weasel?
    • Alaska Studio
Re: Meta Tags Help..
« Reply #4 on: January 24, 2005, 08:56:22 pm »

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?
Logged
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Meta Tags Help..
« Reply #5 on: January 25, 2005, 08:33:51 am »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.