Topic-icon Integration into Blog Factory

Active Subscriptions:

None
4 years 3 months ago - 4 years 3 months ago #65946 by winchester
Hi,

I'm using Blog Factory on by website. While JFBConnect does place the Open Graph and Twitter Card tags, it displays the default values for the tags instead of what's on the page.

I think if I was better with PHP I could have figured it out for myself, but I'm a novice at best. Is there a way to integrate the tags and get the correct values for each page?

Any help will be appreciated, thanks.
Last edit: 4 years 3 months ago by winchester.
The topic has been locked.
Support Specialist
4 years 3 months ago #65956 by mel
Replied by mel on topic Integration into Blog Factory
You can use our easy-tags to add the Open Graph values to the page. If you've added a key in the JFBConnect backend > Social > Admin area, this will need to be included in that tag with a parameter like key=12345; if not ignore that param in the following example.

Insert them into your content in the following format:
{SCOpenGraph og:image=FULL/PATH/TO/IMAGE.jpg}
{SCOpenGraph og:description=Your description here}

Now the trick is figuring out where to put the easy-tag.
1. You can manually put it in each blog entry when you create it in the editor.
2. You can find the right view that's displayed on the front-end and do a template override. This would require more work and PHP knowledge to dynamically create the tag values.

-Melissa
I'm not familiar with Blog Factory. But in general, for components look in the view directory and see if there's a file that you can do a template override for.
The topic has been locked.
Active Subscriptions:

None
4 years 3 months ago #65959 by winchester
Hello Melissa,

Thank you for the reply.

I knew I could do that. The problem though is that it's not just a few. It's a blog, which will be used by people that does not have the skills and knowledge to do this. I was hoping for a way to keep it dynamic. The plugin does put the meta tags in, but it just doesn't take any of the information from the respective pages.
The topic has been locked.
Support Specialist
4 years 3 months ago #65960 by mel
Replied by mel on topic Integration into Blog Factory
Then #2 would be the way to go.

For figuring out description from article text, if you look at our /libraries/sourcecoast/openGraphPlugin.php file, the getFirstArticleText method is what's called to grab the first X characters or words out of an article. This could help you out to get started.
The topic has been locked.
Active Subscriptions:

None
4 years 3 months ago #65993 by winchester
Thank you so much for this. I'm going to take a look at it. :)
The topic has been locked.
Support Specialist
4 years 3 months ago #66000 by mel
Replied by mel on topic Integration into Blog Factory
Ok. Let us know if you have any questions.
The topic has been locked.