Gossamer Forum
Home : Products : Links 2.0 : Customization :

I almost have it just one last problem please help

Quote Reply
I almost have it just one last problem please help
I have been trying to get meta keywords to be generated on my pages. I have done a lot of mods to the script which has made my categories a little different than the original script. The keywords I would like to use are in the 4th field of the database but I can not seem to get the syntax correct all I seem to get is blank meta keywords. I did see this in the script but it is not really helping.
_____________________________________________
# The following will work assuming you haven't changed the order of the
# category database. If you have, or have added new fields, you can access
# any of the information by using $category{$category_name}[field_num] where
# field number is the number (indexed from 0) of the field you want. Otherwise
# you can just use the following: **** can not use the following because the data is apparently no longer in the same place.
Quote Reply
Re: I almost have it just one last problem please help In reply to
Which version of links is this? What are you using to put the metatags on the page and where are you putting them?

------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/
Quote Reply
Re: I almost have it just one last problem please help In reply to
I am running version 1.2 I think I have installed a LOT of upgrades to the script and this apparently is what is goofing me up. I want to put meta tags in the header of the html which I am able to do fine I just can not reference the correct portion of the data base. I would really like to get this going so I can put myself on some of the other search engines and the meta tags will help draw people in. (I hope Smile)

------------------
Thanks for all the help.
Quote Reply
Re: I almost have it just one last problem please help In reply to
Links v1.2? Never heard of it. However, you should be able to display anything that is in the the meta description field of a category by using the variable $meta_name, and the meta keywords by using $meta_keyword. They are listed at the top of site_html.pl, sub site_html_category.

I hope this helps.

------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/
Quote Reply
Re: I almost have it just one last problem please help In reply to
I really appreciate the advice but as my luck goes I can not seem to get it to work. here is the line I inserted into the subcategories page.

<meta name="keywords" content="$meta_keyword">

What appears in my html if I view source is

<meta name="keywords" content="">

Most frustrating.
Oh and I am running ver 1.1 I guess I have fat fingers.

I really do appreciate the help Smile.


------------------
Thanks for all the help.
Quote Reply
Re: I almost have it just one last problem please help In reply to
ooops
I found a mistake I was making

<meta name="keywords" content="$meta_keyword">

should have been
<meta name="keywords" content="$meta_keywords">

BUT.... I do not get meta kywords I get meta description off of the config.pl where is $meta_keywords set up? I can not seem to find $meta_keywords=????? anywhere.

I also found in the script....


# The following will work assuming you haven't changed the order of the
# category database. If you have, or have added new fields, you can access
# any of the information by using $category{$category_name}[field_num] where
# field number is the number (indexed from 0) of the field you want. Otherwise
# you can just use the following: **** can not use the following because the data is apparently no longer in the same place

but I can not seem to get the syntax correct.... HEEELLLPPPP

Thanks guys/ladies.

Bob Wirth
Quote Reply
Re: I almost have it just one last problem please help In reply to
The meta description and keywords are entered in the categories database. Use the "Meta Description" and "Meta Keywords" fields for them. Then, when you use $meta_name, you will get the contents of the "Meta Description" field for each category. Using $meta_keywords" gives you the keywords stored in the database for that category.

If, however, you use the same description and keywords on all the category pages, then you can just skip entering them into the database and create your own variables in either links.cfg or site_html.pl. Something like:

Quote:
$meta-desc = qq|<meta name="description" content="This is a description of my site">|;

Then use $meta-desc whereever you need it, including the home, new, cool, and category pages.

I hope this helps.

------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/
Quote Reply
Re: I almost have it just one last problem please help In reply to
Bobsie
Thanks I can not believe I was making that as hard as I was. It appears that I had a comma were I should not have thanks again.