View Full Version : Metatag generation
kickass
08-22-2005, 06:36 PM
Okay folks, I tried the mod here:
http://www.phplinkdirectory.com/forum/viewtopic.php?t=191&highlight=meta
It generates this:
Content visible to registered users only.
There's gotta be some nifty php way (instead of smarty, maybe?) to at LEAST put the cats and subcats in the metatags on category and subcat pages, and the description? PLEASE??? And if you give me a way to do it that validates I will kiss ass instead of kicking it . . .
On links pages . . . I dunno. but at least if the upper level pages have metas it's better for the secondary search engines.
Ap0s7le
08-22-2005, 06:40 PM
Hi BJ, you could always try something like this.
Content visible to registered users only.
I've never tested it, but try it and see what errors you get or who it kills.
Thanks
-Casey
kickass
08-22-2005, 06:50 PM
I myself just took a second look at what it's doing-
This seems to be working on all pages;
Content visible to registered users only.
and this works on inner pages, presumably where there's a category added to the title strip, and a description of the category in the database:
Content visible to registered users only.
This leads me to a suggestion- is there any way to have the code refer to the directory's index page as category "home"??? for title strip purposes? Or even better, allow a space in admin for people to fill in the tag line they want there, specifying it has to be different than all category names? Would that work? Or at least maybe it leads you to what we might need, I hope.
Secondly, if there was a way to add a description for the index page, which I think is a great idea for a lot of reasons with SEO being at the top of the list, then this mod would work just fine as is.
kickass
08-22-2005, 06:52 PM
You must have posted while I was writing!
I'll try your solution and post back.
kickass
08-22-2005, 06:59 PM
Your keyword meta didn't do anything different than the original mod. :cry:
If you come up with something, Casey, that would be good. I think the problem on the index page is that the stuff that's getting called just isn't there to pull into the meta, which is a problem since all the pages use that header file. It would be a nighmare, from a templating and support standpoint, trying to use a different header file for just the index page, if anyone else wants to do what I'm doing . . . it just makes it very difficult going into the future.
Ap0s7le
08-22-2005, 07:42 PM
Ok, down towards the bottom of the index.php, right above
Content visible to registered users only.
Add this
Content visible to registered users only.
Then in your header.tpl you can use
Content visible to registered users only.
To get the output.
later
-Casey
kickass
08-23-2005, 01:03 AM
Okay I understood the first part with the index.php, but this part:
Content visible to registered users only.
Well, that just isn't as clear. Do I put just that bit between the head tags? Or do I include it INSIDE a meta tag between the quotes?
Ap0s7le
08-23-2005, 04:12 AM
Sorry bout that.
Like so
Content visible to registered users only.
kickass
08-23-2005, 04:39 AM
this, plus the change in index.php:
Content visible to registered users only.
resulted in this:
Content visible to registered users only.
Okay, let's try a different direction, only I don't quite know how to write it properly. Here's the thread I got the idea from, now I need your help, Casey, in writing it right.
http://www.phplinkdirectory.com/forum/viewtopic.php?t=472
IF this whole idea will work in the head of the document, then can we somehow say (please fix if I screwed it up, which I probably did):
Content visible to registered users only.
kickass
08-23-2005, 01:41 PM
*bump*
Ap0s7le
08-24-2005, 06:40 PM
Can I please see your index.php and header.tpl?
Thanks
-Casey
kickass
08-24-2005, 10:06 PM
Zip file here:
http://kickasswebdesign.com/casey.zip
It contains header.tpl (which has had the one metatag thing you suggested removed, so that I wouldn't have two keyword metatags in my pages) and index.php, with the mod you suggested still in place) as you requested.
It would be great if you can solve this- this thread is obviously getting some readers so I think I'm not the only one wanting a solution. And it would be SO nice to have it in time to build my new directory!
Ap0s7le
08-24-2005, 11:33 PM
DOH!
I forgot a line above to prepare the meta.
It should be
Content visible to registered users only.
The "$tpl->assign('meta', $meta);" was left out of my post due to it not being inside the comments.
The header was modified too, check them both out.
I've included the files, edited and ready to use.
later
kickass
08-26-2005, 01:38 AM
Casey, we are SO almost there- the only thing left to do is add a description to the homepage, but that really should also be in admin, same way it is for categories. If that's done, then the description metatag below:
Content visible to registered users only.
will have something in it, the way the inner pages do. If this is done ALL our directories will show up better on the search engines, since a bit of text on the index page will make a world of SEO difference compared to all the other directories out there . . .
BTW, do you need any css/xhtml/graphics favors for this one??? Trade??? I know you've been working hard on this one . . . Maybe a custom sig for the messageboards? Header graphic for one of your projects? Let me know.
Ap0s7le
08-26-2005, 02:25 AM
*grin*
Header graphic sounds nice for something. Can't talk about it yet though ;)
All I did was add Content visible to registered users only. to my desc meta, and if the Cat has a desc then it'll be filled.
Let me know
-Casey
kickass
08-26-2005, 05:25 PM
Yes, cats have descriptions. They all have descriptions. Why can't my DIRECTORY homepage have a description also? Oh, and Casey, I love you dearly, but this is not the first time in this thread I've tried to communicate this to you . . . :D
I dunno how the logic behind it could work, that's your department, but isn't there a way this can be done? Then that metatag will work on every page (except maybe submit, top links, and the like) And, as I've said before, having some text description on the homepage of the directory will help all of us with the search engines, you included.
Nobody
08-26-2005, 05:34 PM
Talk 'bout <head> tags, I believe most of us would like the directory home (eg the first page/index.php) <title> tag to be slightly different than all the others that are in the categories and subcategories.
This is, of course, due to the fact that you would like the home page to have a nice pitch after the directory name.
Example:
index.php = <title>My Directory Home - welcome to a fantastic phpLinkDirectory directory</title>
/category/subcategory/ = <title>My Directory Home - Category > Subcategory (or Subcategory - Category - (at) - My Directory Home</title>
Conclusion: inluding the sentence "welcome to a..." inside a title of a subcategory wouldn't be very nice, but you would still love to have it as on the first page!)
A bit confusing perhaps. You guys get what I'm trying to say here?
minstrel
08-26-2005, 06:16 PM
Content visible to registered users only.
Actually, I don't mean to be offensive here but that's really not a very SEO friendly title at all. This is thje single most important tag on your page and you need to make every word count.
First, omit any "useless" words like "welcome to" -- the title should contain no words that are not potential search terms -- no one is going to be searching for "welcome to" so it ias a waste of caluable web page "real estate".
Second, your most important search terms should be at the front of the title. There may be good reasons (e.g., branding) for including your compnay name or directory name or domain name, but if so it should be at the very end of the title, not at the beginning.
To be blunt, your suggested title
Content visible to registered users only.
does almost everything wrong. Those words as search terms are either so generic that your directory will be hoplessly buried oir if they are specific (e.g., "phpLink Directory") you are not going to be the most relevant result for that search term (in this case it would probably be this forum or the download page).
A better title would be something like this:
Content visible to registered users only.
Nobody
08-26-2005, 06:28 PM
Thanks for your comments Mistral.
I am well aware of how to write sober titles for SEO purposes. In the example above, I just wrote down a title dummie that wasn't designed as a realistic title. I'd never ever use such a title in a real directory.
Thanks anyway for your intentions to help me. :)
kickass
08-30-2005, 11:55 PM
We're getting a bit off topic here. Casey, have you given up on the metas? All we need is something to feed a description into homepage meta . . . the others work fine.
kickass
09-01-2005, 01:58 AM
Okay, since Casey seems to have given up on this issue, is there anyone else php savvy enough to figure out how to add a description to the INDEX page of the directory and have it echoed in the meta description tag for that page? I for one want proper meta description tags. Google may not care but the other smaller SEs do.
Ap0s7le
09-01-2005, 02:30 AM
Hey BJ, nah I haven't given up I just tend to live life from time to time lol
Can I see the directory with this problem?
Thanks
-Casey
Nobody
09-01-2005, 01:12 PM
I wish I could support you in a way, but my programming skills are limited.
I'd love to use this mod. Please wake me up when you have a final solution in the Wiki. :P
kickass
09-03-2005, 02:09 AM
Well, yeah, it's here:
http://kickasswebdesign.com/webgeekdir/
If you need to look at files tell me which ones and I'll zip 'em up for you and send em over. It's the original install, which I think is 4. I decided not to update this one until things were a bit more . . . um . . . settled.
Server set-up--
Apache 1.3.33
kernel 2.4.22-1.2199.nptlsmp
php 4.4.0
mysql 4.0.25-standard
Ap0s7le
09-04-2005, 05:58 PM
Hey BJ, life is busy right now.
Open up index.php and try looking for
Content visible to registered users only.
The "Directory Home" you've prob changed to match your directory, so keep that in mind while looking.
And replacing with
Content visible to registered users only.
lemme know
-Casey
kickass
09-05-2005, 03:08 AM
No problem Casey, I'm busy making IP Circuit Chips look sexy on the web myself . . .
Anyway, re the fix . . .
I feel like I'm stuck in a Rolling Stones moment . . .
I CAN'T GET NO (bah bah bah) SATISFACTION . . .
Ap0s7le
09-05-2005, 05:11 AM
Haha, I love that song.
Send me your index.php and header.tpl
Now see, if we IM'd each other this would probably be solved *grin*
later
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.