meta description to long?

  • ruud68
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
13 years 3 months ago #21070 by ruud68
meta description to long? was created by ruud68
Hi,

I use the sharethis component to share via social media.
I noticed that trying to share a specific event gave an error on sharing on twitter and facebook: URI to long.
I took this up with the support department of sharethis.
It turned out that the meta description is used to give context on the tweet or facebook.
The meta description should only be one or two sentences long but when I browse the page source of an event, then I notice that the meta description is the total text of the event.

As it turns out this is not compliant to the Open Graph protocol, the meta :description tag should only be one or two sentences.
Ref: ogp.me/

So the solution is not in ShareThis but in your component.

Can this be changed?

regards,
Ruud.

Please Log in or Create an account to join the conversation.

  • ruud68
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
13 years 2 months ago #21542 by ruud68
Replied by ruud68 on topic Re: meta description to long?
*bump*

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
13 years 2 months ago #21675 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: meta description to long?
Hi Ruud

At the moment, the extension use description for meta description tag. If you want to remove it, please open the file components/com_eventbooking/views/event/view.html.php, find the code below and remove it :
Code:
if (strlen(strip_tags($item->description))) { $document->setMetaData('description', strip_tags($item->description)); }

Regards,

Tuan

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago - 12 years 10 months ago #28625 by Matthias Blaß
Replied by Matthias Blaß on topic Re: meta description to long?
You can use the short description too to reduce the length of the meta description - but this only works, if your users wrote a really short description ;)
Code:
if (strlen(strip_tags($item->short_description))) { $document->setMetaData('description', strip_tags($item->short_description));

Cheers Matthias

[I use Membershop Pro 1.5.3, with Event Booking 1.5.2 and Joomla 3.0.2]
Last edit: 12 years 10 months ago by Matthias Blaß.

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc