[ABD] Dynamic Facebook and Twitter Meta Tags

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
jcocking
Registered User
Posts: 196
Joined: Wed Jun 08, 2005 6:47 pm

[ABD] Dynamic Facebook and Twitter Meta Tags

Post by jcocking » Wed Oct 21, 2015 12:20 am

Extension Name: Dynamic Facebook and Twitter Meta Tags
Author: jcocking

Extension Description: Creates Opengraph (Facebook) and Twitter Card Metatags.
Extension Version: v 0.2.0

Features: Feature List. This extension builds the Opengraph and Twitter cards for Social Media use. When a person posts your forum pages, Facebook and Twitter use this data to populate titles, descriptions, images, etc.
  • Selects image from topic
  • Configurable to choose first or last image in topic
  • If image is not listed on a topic page of 15 posts, will determine if an image exists on another page of the topic.
  • If there are no images within the topic, it will randomly pick an image from the attachments database (non-PM images)
  • Assigns image to index and forum page via random image feature.
  • Uses the first post of a topic for description
  • Uses forum description for forum pages
  • Uses Site Description as default for all empty descriptions.
  • Ability to turn on/off Facebook and/ or Twitter.
  • Ability to turn on/off random image generator.
  • Conversion and enhancement of the 3.0.x mod at viewtopic.php?f=70&t=2218256
Screenshots: Screenshots for the extension Coming

Screenshots:
Example 1:
Image
Admin Section:
Image
Extension Download: https://github.com/LotusJeff/dynamic
Image
Last edited by jcocking on Sun Oct 25, 2015 12:39 am, edited 3 times in total.
LotusElan.net is a fully responsive phpBB forum dedicated to the Lotus Elan Sportscars of the 1960s.

User avatar
wkuzma
Registered User
Posts: 389
Joined: Sun Sep 02, 2007 10:18 pm
Contact:

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by wkuzma » Thu Oct 22, 2015 3:23 am

after install on a test site I get this when I read a message
also I could not find the admin section for this ext

[phpBB Debug] PHP Notice: in file [ROOT]/ext/lotusjeff/dynamic/event/listener.php on line 207: Undefined variable: dynamic_image
[phpBB Debug] PHP Notice: in file [ROOT]/ext/lotusjeff/dynamic/event/listener.php on line 229: Use of undefined constant post_text - assumed 'post_text'
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5291: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3911)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5291: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3911)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5291: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3911)

koraldon
Registered User
Posts: 511
Joined: Sat Jun 30, 2007 12:42 pm

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by koraldon » Thu Oct 22, 2015 5:03 am

Sound excellent - missing opengraph tags in phpbb :)

jcocking
Registered User
Posts: 196
Joined: Wed Jun 08, 2005 6:47 pm

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by jcocking » Thu Oct 22, 2015 4:16 pm

wkuzma wrote:after install on a test site I get this when I read a message
also I could not find the admin section for this ext

[phpBB Debug] PHP Notice: in file [ROOT]/ext/lotusjeff/dynamic/event/listener.php on line 207: Undefined variable: dynamic_image
[phpBB Debug] PHP Notice: in file [ROOT]/ext/lotusjeff/dynamic/event/listener.php on line 229: Use of undefined constant post_text - assumed 'post_text'
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5291: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3911)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5291: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3911)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5291: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3911)
Issue has been fixed and updated code is on github. Thank you for the catch.

Admin Section: ACP go to General tab => Board Features => Dyanmic Opengraph Settings (at the bottom of the page.).
LotusElan.net is a fully responsive phpBB forum dedicated to the Lotus Elan Sportscars of the 1960s.

KSHH
Registered User
Posts: 17
Joined: Tue Jan 06, 2015 9:46 pm

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by KSHH » Thu Oct 22, 2015 10:28 pm

When i try to insert a link on facebook, from a topic with images, this is what i get.
Image

jcocking
Registered User
Posts: 196
Joined: Wed Jun 08, 2005 6:47 pm

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by jcocking » Fri Oct 23, 2015 3:18 am

KSHH wrote:When i try to insert a link on facebook, from a topic with images, this is what i get.
Image
What are the opengraph meta tags from your forum page? Are they correct?

The first time a link is posted to Facebook, it will not show the image. This is a Facebook setting. As listed by their developer info:
When content is shared for the first time, the Facebook crawler will scrape and cache the metadata from the URL shared. The crawler has to see an image at least once before it can be rendered. This means that the first person who shares a piece of content won't see a rendered image:
If you have questions about the opengraph, run your page through the facebook opengraph debug tool at https://developers.facebook.com/tools/debug/
LotusElan.net is a fully responsive phpBB forum dedicated to the Lotus Elan Sportscars of the 1960s.

User avatar
wkuzma
Registered User
Posts: 389
Joined: Sun Sep 02, 2007 10:18 pm
Contact:

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by wkuzma » Fri Oct 23, 2015 1:06 pm

jcocking wrote: Issue has been fixed and updated code is on github. Thank you for the catch.

Admin Section: ACP go to General tab => Board Features => Dyanmic Opengraph Settings (at the bottom of the page.).
Thanks for the fast fix works great now.

Nully
Registered User
Posts: 453
Joined: Thu Jan 29, 2009 10:11 pm
Location: France
Contact:

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by Nully » Fri Oct 23, 2015 2:47 pm

Thank you very much.
A few days ago I had a quite blank page from a link in Facebook.
Now there is the image :D
1) But what happens if in the post there is not image in the topic?
Which image will be picked? I have about 8000 images in my board and many cannot be viewed by guests.

2) In language there is:

Code: Select all

'LOTUSJEFF_DYANMIC_OPENGRAPH_LOCALE'		=> 'en-US',
Sorry if my question is stupid - do I have to change en-US by fr-FR ?

jcocking
Registered User
Posts: 196
Joined: Wed Jun 08, 2005 6:47 pm

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by jcocking » Fri Oct 23, 2015 2:58 pm

Nully wrote:Thank you very much.
A few days ago I had a quite blank page from a link in Facebook.
Now there is the image :D
1) But what happens if in the post there is not image in the topic?
Which image will be picked? I have about 8000 images in my board and many cannot be viewed by guests.

2) In language there is:

Code: Select all

'LOTUSJEFF_DYANMIC_OPENGRAPH_LOCALE'		=> 'en-US',
Sorry if my question is stupid - do I have to change en-US by fr-FR ?
1. We grab a random image from the attachment table that is not in a PM. There is no way to designate attachments beyond that. Facebook and Twitter do not want you to use default images for posts that do not have images. I could build an on/off switch for random image.

2. The variable is defined by the language file. I do not have a French language file. If you will translate the text for the 8 variables into french, i will create a french language file.
LotusElan.net is a fully responsive phpBB forum dedicated to the Lotus Elan Sportscars of the 1960s.

Nully
Registered User
Posts: 453
Joined: Thu Jan 29, 2009 10:11 pm
Location: France
Contact:

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by Nully » Fri Oct 23, 2015 3:03 pm

Thank you for your quick reply.
1) I hope the image will not be grabbed from images on topics which are not opened to guests :mrgreen:
2) I made translation file for myself, but my question was if in the french language I have to replace

Code: Select all

'LOTUSJEFF_DYANMIC_OPENGRAPH_LOCALE'      => 'en-US',
by

Code: Select all

'LOTUSJEFF_DYANMIC_OPENGRAPH_LOCALE'      => 'fr-FR',

jcocking
Registered User
Posts: 196
Joined: Wed Jun 08, 2005 6:47 pm

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by jcocking » Fri Oct 23, 2015 4:02 pm

Nully wrote:Thank you for your quick reply.
1) I hope the image will not be grabbed from images on topics which are not opened to guests :mrgreen:
2) I made translation file for myself, but my question was if in the french language I have to replace

Code: Select all

'LOTUSJEFF_DYANMIC_OPENGRAPH_LOCALE'      => 'en-US',
by

Code: Select all

'LOTUSJEFF_DYANMIC_OPENGRAPH_LOCALE'      => 'fr-FR',
#2. - Yes, if you change this to fr-FR, it will change the opengraph locale to French.

#1. We grab a random image. There is no check for login in status of guest or non-guest. I added the feature to turn off random images if no image is present. Download, disable, delete data, enable.
LotusElan.net is a fully responsive phpBB forum dedicated to the Lotus Elan Sportscars of the 1960s.

jcocking
Registered User
Posts: 196
Joined: Wed Jun 08, 2005 6:47 pm

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by jcocking » Fri Oct 23, 2015 4:14 pm

Upgraded to version 0.2.0.

Added feature for turning on/off the random images.

Download files.
Disable extension.
Delete data.
Enable extension.
Re-configure
LotusElan.net is a fully responsive phpBB forum dedicated to the Lotus Elan Sportscars of the 1960s.

Nully
Registered User
Posts: 453
Joined: Thu Jan 29, 2009 10:11 pm
Location: France
Contact:

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by Nully » Fri Oct 23, 2015 6:08 pm

I updated to version 0.2.0.
Sorry I cannot make an other test on Facebook, because I have to create a new topic :mrgreen:
Surely other people will do.
Last edited by Nully on Sat Oct 24, 2015 6:41 am, edited 1 time in total.

User avatar
wkuzma
Registered User
Posts: 389
Joined: Sun Sep 02, 2007 10:18 pm
Contact:

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by wkuzma » Fri Oct 23, 2015 11:46 pm

I must be missing something
I uninstalled the orginal extension
deleted the data then deleted the extension
I uploaded the new version and enabled it.
I see the admin section of the extension.
My question is how do I get a post to facebook??
when I do a test post I see only the post on my system what do I do from there???

cwikdahl
Registered User
Posts: 3
Joined: Fri Oct 23, 2015 8:18 pm

Re: [DEV] Dynamic Facebook and Twitter Meta Tags

Post by cwikdahl » Sun Oct 25, 2015 7:30 am

jcocking wrote:Facebook and Twitter do not want you to use default images for posts that do not have images. I could build an on/off switch for random image.
Is this really the case? For my wordpress blog I have a default image set in case there's no image in the post I share. That is the way I would like my phpBB site to work as well. A random image sounds like it could turn out very strange a lot of the time :) But with the option to turn it off it's all good.

But there is no way of setting a default image you say? Like when I share the forum index page?

Thanks,
Claes

Locked

Return to “Abandoned Extensions”