By Michael Bevia on Thursday, 31 December 2015
Posted in General Issues
Likes 0
Views 758
Votes 0
Hello, i recently purchased easysocial

But I don't see how to add a "meta description" for the profiles

I see the meta descriptions and I see it is a duplicate of my homepage. The meta description should be whatever the user writes in the "about me" section, or there should be a meta description box, can I create this? Thank you.
Hey Michael,

I am really sorry for the delay of this reply as it is actually a public day off for us here. Currently EasySocial doesn't set any "meta description" for the profile view. What sort of information would you like to display for the meta description?

You could actually edit the file /components/com_easysocial/views/profile/view.html.php and insert the block of codes below somewhere around line 277:

·
Friday, 01 January 2016 17:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mark, thank you so much for this, it works very well! I put this also for keywords following your example.

I have one question, Can I insert the author name? for example below:

$doc = JFactory::getDocument();
$doc->setMetadata('description', 'Profile of - Author name - ');
$doc->setMetadata('keywords', 'artist');
·
Friday, 01 January 2016 17:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Michael,

Yep, you can actually use the $user object to get the name of the person.

·
Friday, 01 January 2016 17:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark wrote:

Hey Michael,

Yep, you can actually use the $user object to get the name of the person.



Hi Mark, I just wanted to say thanks!! It works wonderful.

I placed the description, keywords and author....works perfect! Thanks so much again.

$doc = JFactory::getDocument();
$doc->setMetadata('description', JText::sprintf('Profile of %1$s - Original artworks by %1$s', $user->getName()));
$doc->setMetadata('keywords', JText::sprintf('%1$s', $user->getName()));
$doc->setMetadata('author', JText::sprintf($user->getName()));
·
Friday, 01 January 2016 18:05
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome Michael
·
Friday, 01 January 2016 18:09
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post