Are there no ordinary meta desc and keys in G3?

klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Fri, 2009-07-24 15:46

How come I see no meta description and meta keys on our Gallery3-setup: http://www.bryllup.dk/bryllupsgalleri/

Do I need to enable it somehow?

Otherways, the G3 is AWESOME!!! :)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2009-07-24 23:26

It is up to the theme author to add <meta> tags.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Sat, 2009-07-25 05:07

But surely, metatags should be created automatically from the data of the image, like from the description, right?? :)

If not, how does admin add those?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2009-07-25 06:20

There is not a admin function to do this. You would need to create a new theme to add the variables to the theme viiew files that you desire.
As an example( not tested), you could add:
<META NAME="Description" CONTENT="<?= nl2br(p::purify($item->description)) ?>">
to themes/YOURTHEME/views/page.html.php

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Sat, 2009-07-25 12:33

Well, the idea is there, I see - but it doesn't work.

Please have a look at http://www.bryllup.dk/bryllupsgalleri/index.php/Billeder_af_brudesko/image298.jpg and see the source - then the meta desc is added, but empty like

<META NAME="Description" CONTENT="">

Any idea how to get it working?

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Sat, 2009-07-25 17:31

This should work.
<META NAME="Description" CONTENT="<?= nl2br(p::purify($theme->item->description)) ?>">

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Sun, 2009-07-26 06:14

GREAT!!!! Thanks!!!

Would it be possible to do the same "trick" to get meta keywords also . . . . perhaps taking the tags and inserting as meta keys ?

Really appreciate your help!! :)

 
DocMartin

Joined: 2005-07-13
Posts: 55
Posted: Sun, 2009-07-26 07:24

This looks just the job, thanks

Seems to me it should be standard with themes; maybe recommend to all who plan theme development.
Keywords from tags something I've mentioned too, albeit less important.

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Sun, 2009-08-02 18:23

Here, this module should insert the meta tags you want into any theme, without modifications.

 
DocMartin

Joined: 2005-07-13
Posts: 55
Posted: Mon, 2009-07-27 04:02

Thanks rWatcher; working well!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2009-07-30 01:07

rWatcher: Pulled!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Thu, 2009-07-30 09:37

Really nice of you to put this module together for us all!! Very much appreciated.

!!! :)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-07-30 13:47

Users of this module; contribute back to the project by helping out with some documentation:
http://codex.gallery2.org/Gallery3:Modules:metadescription

The docs are for users by users.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Fri, 2009-07-31 06:13

Oooops I think we need a little adjustment before it's perfect.

Please have a look at http://www.bryllup.dk/bryllupsgalleri/index.php/Billeder_af_t%C3%B8j_til_bryllup/Billeder_af_herret%C3%B8j and see the source.

Then you will see that < br > is inserted, which Google will most probably not like.

Also, it inserts the full description, which again Google will not like if it's more than 120-150 chars.

Could you please strip any formatting like < br > etc. and truncate the description to, say, 150 chars?

It's really a great module already, but these two changes should result in better rankings in Google, which is, afterall, what we want the metas to do :)

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Fri, 2009-07-31 06:21

Sorry to keep them comming, but another addition that would make it tons more usefull, is this:

As it is now, the meta description is taken from the category or image description.

While most of us control the categories, as admins, we can make sure that they're properly described.

Regarding images, it's a very different case and most useruploads is without any description at all.

I would suggest to do this, to make the plugin even better:

Put an "if"-statement around the meta like this (described in human words ;) )

1. If there IS a description, then set "meta description = category and / or image description"
2. Else set "meta description = TITLE of category and / or image"

This way, we will always have at least the title of the image as meta description.

Now, if there's no description for the image, there's just an empty meta section, which google most probably will use for thinking "Well, we can't tell what the heck this image is about, so we won't rank/index it at all"

Could you do this also? If so, it would be amazing!

I'm willing to donate you 50 dollars if you can do this and the above posted idea!

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2009-07-31 06:31
Quote:
Also, it inserts the full description, which again Google will not like if it's more than 120-150 chars.

Any documentation you can reference in this regard? Should we just truncate it or do somthing fancy like leaving dots (...) at the end?

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Fri, 2009-07-31 06:41

Also, I just realised that the module seems to have no effect on the front page like http://www.bryllup.dk/bryllupsgalleri/index.php/

Even though there is description and tags there, it's not in the source of http://www.bryllup.dk/bryllupsgalleri/index.php/ when I look at it :)

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Fri, 2009-07-31 06:38

Thanks for you fast response!

floridave wrote:
Any documentation you can reference in this regard?

Well, there are different points of views and to my knowledge no end-all-be-all truth but if you look at http://www.google.com/search?client=safari&rls=da-dk&q=google+guidelines+meta+description+length&ie=UTF-8&oe=UTF-8 you will see that seo-guys usually agree that the lenth should be max 150 chars.

At least there should be no formatting :)

floridave wrote:
Should we just truncate it or do somthing fancy like leaving dots (...) at the end?

That would be super!

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2009-07-31 13:36
Quote:
I just realised that the module seems to have no effect on the front page

Works for me. I don't see any description on your root album. You need to edit the root album and add a description.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Fri, 2009-07-31 14:11

Strange, because as I see it on the attached screenprint, I DO have descriptions but could it be there's an even higher level, what you call root?

If so, where do I edit the root level??

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2009-07-31 15:19

' Billeder af tøj til bryllup' is a sub-album of the root album you have called 'gallery'
options-> edit album. from the root album.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Sun, 2009-08-02 18:23

Here you go, this should do what you want :)
- Added code to strip HTML from the description
- Added code to strip Line Breaks from the description and replace them with a space (to make sure the last word on one line won't run into the first word on the next).
- Limit Description to 150 characters (Currently truncating to 150 characters, but I could easily modify this to leave dots [...] at the end if that would be preferable?)
- Added code to use the image/album title when description is empty.

I've pushed the update to my github as well.

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Fri, 2009-07-31 19:12

To edit the root album, select Options->Edit album. See the attached picture for an example.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-07-31 20:43

@rWatcher: metadescription update pulled!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Sat, 2009-08-01 09:42

Super duper!!!!!!!!!

How do I pay you as I promised I would?

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Sat, 2009-08-01 09:45

Super duper!!!!!!!!!

How do I pay you as I promised I would?

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Sat, 2009-08-01 09:49

When on category-pages, there's no metakeys.......... shouldn't they automatically be selected from the album-title, as it is from the filetitle ?

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Sat, 2009-08-01 09:50

Actually, soon it will be perfect with: http://gallery.menalto.com/node/89471

Absolutely killer SEO for gallery3!!!!!!

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2009-08-12 04:37
klp29 wrote:
When on category-pages, there's no metakeys.......... shouldn't they automatically be selected from the album-title, as it is from the filetitle ?

The META KEYWORDS tag is currently setup to use the current album or photo's tags as its value. In the event that the album or photo is not tagged, the KEYWORDS field will be blank.

I've attached a modified version that will use the title as a keyword in the event that there are no tags. Is this how you wanted it to work? :)

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-08-02 19:18

Pulled!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Fri, 2009-08-07 09:38

Brialliant, thanks!! :)

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2009-08-12 05:51

Updated to support the tags page.

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Wed, 2009-08-12 05:02

Thanks ALOT! :)

One enhancement would be supergreat, though.

As you did it now, the meta description will be only one word, which is - in Googles eyes - bad.

The meta keywords are fine now, but the meta description needs to be, well, a DESCRIPTION :)

Did you see my suggestion for taking the gallery-description from the first image listed in tags?

Like if you take our tag "brudepigekjoler" (http://www.bryllup.dk/bryllupsgalleri/index.php/tags/29) the first image is leads to http://www.bryllup.dk/bryllupsgalleri/index.php/Diverse_bryllupsbilleder/Billeder_af_gallakjoler which has a nice, full description for you to use as meta description :)

Possible? :)

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2009-08-12 05:00

Yes.

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Wed, 2009-08-12 05:03

Sorry, I see you replied to the first response here, which I edited to have the explation about the description also - please refresh page and see :)

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Mon, 2010-06-14 22:28

Here you go. This'll pull the description off of the first item on the page to use for the DESCRIPTION tag. In the event that the first item doesn't have a description, it'll fall back to using the tag name instead.

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Wed, 2009-08-12 06:32

Wow you're quick :)

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2009-08-12 16:27

Users of this module; help out with some documentation:
http://codex.gallery2.org/Gallery3:Modules:metadescription

The docs are for users by users. It is your way to contribute back to the project.

Is this 'brow beating' or should I just give up in asking users to contribute?

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
klp29
klp29's picture

Joined: 2006-03-26
Posts: 41
Posted: Wed, 2009-08-12 16:42

Hi

Well, is there really a need for documentation in this case?

If so, then the module is as simple as this:

1. Install
2. That's it

There you go :D

:] Kenneth WedMore Lund

http://www.bryllup.dk
http://www.crazynight.dk

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-08-12 17:08

Well that's my opinion of any version of Gallery :)

But just because it's easy to install and configure, especially after you've done it once or twice doesn't mean it is for those that are not familiar with this stuff. That simple instruction of "Install" will confuse the heck out of a lot of people. "How? I downloaded it to my computer, but there is no exe, when I double click on it nothing happens, I just see a folder of stuff. What do I do?" Something like that :)
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
superflyman

Joined: 2009-11-12
Posts: 24
Posted: Mon, 2010-01-18 06:01

This looks like a fantastic module... However, when I upload it to 'modules' and enable it, I get a blank page when I try and hit the url. I'm using the zip from the post on Mon, 2009-08-31 18:24. Any help would be appreciated! thanks-

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Mon, 2010-06-14 22:28
superflyman wrote:
This looks like a fantastic module... However, when I upload it to 'modules' and enable it, I get a blank page when I try and hit the url. I'm using the zip from the post on Mon, 2009-08-31 18:24. Any help would be appreciated! thanks-

bharat made some changes to the copy on github for compatibility with the latest Gallery 3 git builds. I've attached the newer module to this post, it should work if you're using a version of Gallery newer the Beta 3.

 
superflyman

Joined: 2009-11-12
Posts: 24
Posted: Wed, 2010-01-20 00:13

Fantastic, works! Thanks!

 
sproonz

Joined: 2010-05-23
Posts: 11
Posted: Sun, 2010-05-30 17:31

In metadescription_block.html.php:

<META NAME="KEYWORDS" CONTENT="<?= $metaTags ?>">
<META NAME="DESCRIPTION" CONTENT="<?= $metaDescription ?>">

is not XHTML 1.0 Transitional, which is Gallery doctype.
"meta", "name" and "content" should not be capital and the tag should be properly ended '/>'

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Fri, 2010-10-29 06:22
sproonz wrote:
In metadescription_block.html.php:

<META NAME="KEYWORDS" CONTENT="<?= $metaTags ?>">
<META NAME="DESCRIPTION" CONTENT="<?= $metaDescription ?>">

is not XHTML 1.0 Transitional, which is Gallery doctype.
"meta", "name" and "content" should not be capital and the tag should be properly ended '/>'

Fixed, thanks :)

 
glodakan
glodakan's picture

Joined: 2010-06-13
Posts: 51
Posted: Tue, 2010-08-10 14:44

Why lost meta description and meta keywords in tag pages ?
i test here Moderator comment: this is a legit G3 site and not a spammer

[img]http://gallery.menalto.com/files/no-meta-desc-in-tag-pages.JPG[/img]

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2010-08-11 04:42

Those lines are baked into the Grey Dragon theme. Edit themes/greydragon/views/page.html.php and remove them if you'd like.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git

 
glodakan
glodakan's picture

Joined: 2010-06-13
Posts: 51
Posted: Fri, 2010-08-13 16:45

@bharat : what should I remove ?
thank you :)

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Fri, 2010-08-13 17:13

just download latest theme and it would not be added by default

 
glodakan
glodakan's picture

Joined: 2010-06-13
Posts: 51
Posted: Fri, 2010-08-13 17:44

@serge : hi serge thank you for fast respond
This is not problem in greydragon theme, maybe in Gallery3:Modules:metadescription is not supported.
This problem is bad for SEO or Googlebot found some issues (Duplicate meta descriptions)
Thank You

Regards,
Putra

 
dsanchez

Joined: 2006-08-23
Posts: 12
Posted: Sat, 2010-10-09 11:39

Thanks for this module!

I just wanted to say that the W3C recommend lowercase for attributes, so instead

<meta name="KEYWORDS" content="<?= $metaTags ?>" />
<meta name="DESCRIPTION" content="<?= $metaDescription ?>" />

it should be

<meta name="keywords" content="<?= $metaTags ?>" />
<meta name="description" content="<?= $metaDescription ?>" />

(at the end of the file metadescription_block.html.php)

Cheers!