Topic-icon Override JFB open graph tags

Active Subscriptions:

None
11 years 1 month ago #52538 by klox7
Hi,

some time ago I asked if I can replace JFBConnect open graph tags with my custom ones and the answer was no. Since you said there will be possibility to do this I'm asking how can I do it? Was this implemented?

Old topic here

Regards
The topic has been locked.
Support Specialist
11 years 1 month ago #52542 by mel
Replied by mel on topic Override JFB open graph tags
In the JFBConnect > Open Graph > Configuration section, there is a new setting called 'Skip Tags'. This is a comma-separated list of Open Graph that JFBConnect will not set the tags for. Please configure this setting and let us know if you run into any issues.

-Melissa
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #52620 by klox7
Replied by klox7 on topic Override JFB open graph tags
Is this possible only for certain pages or views?
The topic has been locked.
Support Specialist
11 years 1 month ago #52629 by mel
Replied by mel on topic Override JFB open graph tags
No, this would be site-wide.

If you're still targeting just one third-party extension (your old thread mentioned Cobalt CCK), I think the best bet would be to create your own Open Graph plugin. If you're just wanting to add the og tags to certain views/layouts, then it would be pretty simple. To do this, I'd suggest looking at the plugins in our JFBConnect installation zip under /packages/plugins/opengraph directory. The EasySocial plugin looks pretty simple as a good example to start with. If you get it started and run into problems, we can help you debug.
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #52647 by klox7
Replied by klox7 on topic Override JFB open graph tags
So in this case I have to disable jfb open graph plugin and use my own for entire site? Or can I still use jfb open graph for majority of site and custom plugin for specific component? Doesn't JFB overrides all other og tags?
The topic has been locked.
Support Specialist
11 years 1 month ago #52653 by mel
Replied by mel on topic Override JFB open graph tags
If you're comfortable with creating your own JFBConnect Open Graph plugin for Cobalt CCK, that is the course that I would suggest.

There are several different ways that JFBConnect sets the Open Graph tags on the page, as described at www.sourcecoast.com/jfbconnect/docs/open-graph/tags-for-joomla and gives different priorities to each of these. From highest priority to lowest:
1. SCOpenGraph easy-tags manually inserted into content. e.g. {SCOpenGraph description=blah}
2. Our Open Graph plugins
3. Default option in JFBConnect > Open Graph > Configuration area
4. Auto-generated tags based on metadata for og:url, title, description, type, app_id, locale, site_name.

If any of the tags are set by a higher priority in that list, they won't be reset again by JFBConnect. Therefore, if you create the plugin, any attempt to auto-generate tags won't be done for the tags that you've set in your plugin. If there are any in #4 that aren't done by your #1-3, JFBConnect will still attempt to generate.

-Melissa
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #52666 by klox7
Replied by klox7 on topic Override JFB open graph tags
Sorry but I don't understand. So if I create plugin then JFB will generate it's own tags or not? Hot to set higher priority?
The topic has been locked.
Support Specialist
11 years 1 month ago #52671 by mel
Replied by mel on topic Override JFB open graph tags
In the plugin, you'll have just have a call like the following to add a tag and JFBConnect will assign the correct priority; you won't need to worry about that.
$this->addOpenGraphTag('description', 'My Description Here', false);

Add a line like the above for every Open Graph tag you want defined. If there are any tags that are required(og:url, title, description, type, app_id, locale, site_name) but that you have not defined, then JFBConnect should only generate those.

-Melissa
The topic has been locked.