Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC:

how to implement meta facebook open graph 7 years 20 hours ago #21516

Hello JEM support,
I'm using JFBconnect on my website to let people like and share on Facebook the articles and pages of my website, but I have a problem with JEM pages of my website. If I try to share a page with a single event details, the facebook preview posts will appear with a wrong image and wrong description. I don't know how to and where implement the missing open graphs to let the users share every event they want with the correct details in their facebook posts.
This is the link of a single test event:
www.livingsenigallia.it/component/jem/ev...enti-divertenti.html
try yourself to share it with the button at right bottom so maybe u can better understand what I mean.
Note this is a very important feature for my website and i really need to fix this problem :/

thanks in advice!

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

how to implement meta facebook open graph 6 years 11 months ago #21635

I would like an answer to this as well. I have seen solutions on the forum dated 2011 and implemented those to no avail. I have an open graph plug in that works for the whole of my website, including K2 items but for some reason does not work with JEM.

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

how to implement meta facebook open graph 6 years 11 months ago #21636

If somebody has a solution, if would be nice, to answer this question. Actually our devs are working on other stuff.

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

how to implement meta facebook open graph 6 years 9 months ago #21922

Wow. I am totally surprised by this. In the modern world this is basic stuff. I am sure that some of the more basic "OG" plug-ins will do this automatically as they just copy the meta tags into OG tags.

Whose responsibility would it be to provide the integration with components like JFBConnect though? I'm not sure it would lie here. JEM is big enough to make it a worthwhile relationship in both directions. JEM could be in contact with JFBConnect so that this can be worked on by both entities.

in the meantime if you want to fiddle with Joomla core then head to
/libraries/joomla/document/renderer/html/head.php

and copy each meta output and replace the meta tag with the og:tag so joomla can generate the og tags from the meta tags.

This is:

a) crass
b) going to need monitoring on every upgrade
c) really not a solution

But it is acceptable if you are desperate.

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

how to implement meta facebook open graph 6 years 9 months ago #22003

Me too, like you and some other people, I was looking for a solution to share the events on the socials, but we cannot blame the fantastic crew of JEM that give us, for free, a component very complete, well done and supported better than a commercial one, when they don’t give us solutions for our personal stuffs.
It’s true, in this times the social connections are important but is not JEM that miss the integration, are the social plugins and components that are not ready for JEM and maybe you have to contact the producer of JFBConnect for to ask such of integration.
I don’t know components that are “social integrated” itself, must always to install third part extensions for that.

Anyway, here is, a complete and ease solution without using components, plugin or hack the core of joomla, but you need to “get your hands dirty !” and hack a little bit the core of JEM.
I did it in the (old….) JEM 3 but it should work also in JEM 2xx

So, first, download and install a module that render the share buttons
(if you have already JBConnect you can try the step “B” only, and see if work – I don’t know that extension)

personally I use this little and free module: ITPsocialbutton itprism.com/free-joomla-extensions/socia.../multi-share-buttons
however you can use what module you want and is needed only the module not the plugin!

Open it, give it a name (eg: socialbuttons), activate the buttons (Facebook, Google+ and Tweeter), and publish it
Do NOT assign a position or a menu item

Now the trick part, You have to:
(I recommend to do the following steps in an override file for not to lose all at the next JEM upgrade)

A – Call the module inside the view of the event details to render the buttons
B - Put the appropriate meta inside the <head> </head> of the event page

So, go to: components/com_jem/view/tmpl/default.php and open it

A - Add the module where you want to render the buttons in the event page with this :
<div> 
<?php
jimport('joomla.application.module.helper');
$module = &JModuleHelper::getModule('socialbuttons');
echo JModuleHelper::renderModule($module);
?>
</div>
(eg: if you want to see the “social buttons” before the description find <!-- DESCRIPTION --> and add the code just before it )

B – Add the social meta (Facebook Twitter and Google+)
in the same file (default.php) at the beginig (after the jhtml stuff and before the php’s close ?> ) :
// beginig social tags
$socialimage = JUri::base().$this->item->datimage; // path of the event image

// the following is for to check if there is an image on the event and maybe is not needed in JEM 2.xx -  I don’t know -
$socialnoimage = JURI::base(true).'/media/com_jem/images/noimage.jpg';   // noimage path -  look inside the folder if you have such image. 
if ($this->dimage) : // if we have an image 
$socimg = $socialimage;
elseif (empty($this->dimage)): // if not
$socimg = $socialnoimage;
endif;

// add the tags inside the <head>
$socialtext = strip_tags($this->item->text);  // description cleaned

$document = JFactory::getDocument();  
$document->addCustomTag('
<meta property="og:image" content="'.$socimg.'"/>
<meta property="og:title" content="'.$this->escape($this->item->title).'"/>
<meta property="og:description" content="'. mb_strimwidth($this->escape( $socialtext ), 0,180, ".....").'"/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:image" content="'.$socimg.'"/>
<meta name="twitter:title" content="'.$this->escape($this->item->title).'"/>
<meta name="twitter:description" content="'. mb_strimwidth($this->escape( $socialtext ), 0,180, ".....").'"/>
');
// end
That’s it, now in every event page you have the social share integration that share the correct event data on the socials
The following user(s) said Thank You: ernst67, jojo12, Nidzo, Triky

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

how to implement meta facebook open graph 6 years 9 months ago #22035

In JEM 2.1.6 the path for default.php is components/com_jem/views/event/tmpl/default.php

I use combination of Phoca Open Graph Plugin, Modules Anywhere and JB:SocialShare. In this situation the only thing to do is place {module JB:SocialShare} string in default.php where do you want module to show.





With modules anywhere it is possible to insert other modules too.
Thank you znort for pointing me where to look ;)
Attachments:
The following user(s) said Thank You: ernst67, Triky

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

  • Page:
  • 1
  • 2
Time to create page: 0.535 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......