Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi.
Thanks for the module. Works great!
I was wondering if it might be helpful to have the link added as a field instead of adding it to a text body. That way it can be singled out in Views, the link doesn't show up in the text body, and it won't be affected when the text body is trimmed.
Any thoughts?
Thanks.
Comment | File | Size | Author |
---|---|---|---|
#13 | opengraph_filter-add-tags-markup-as-field-2346089-13.patch | 15.92 KB | brooke_heaton |
#8 | opengraph_markup.png | 59.58 KB | brooke_heaton |
#8 | opengraph_ds.png | 26.89 KB | brooke_heaton |
Comments
Comment #1
manuel.adanWould be nice. Any updates?
Comment #2
psychobyte CreditAttribution: psychobyte commentedhaven't played with this module in a long time. would love to see if this was even considered.
Comment #3
brooke_heaton CreditAttribution: brooke_heaton as a volunteer and commentedComment #4
brooke_heaton CreditAttribution: brooke_heaton as a volunteer and commentedAdded patch to set $tags as a pseudofield using hook_field_extra_fields() and hook_entity_view. The OpenGraph markup may now be shown or hidden below trimmed text fields and is no longer appended to the end of $text.
Comment #5
brooke_heaton CreditAttribution: brooke_heaton as a volunteer and commentedUpdated patch to pass $filter argument through processor and to clear cache on hook_entitity_update
Comment #6
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedbrooke_heaton, can you a screen shot of what the author or user might see?
Comment #7
brooke_heaton CreditAttribution: brooke_heaton as a volunteer and commentedUpdating patch to resolve missing brackets on else statement and to revise cache call.
Comment #8
brooke_heaton CreditAttribution: brooke_heaton as a volunteer and commentedAs a new pseudo-field, the opengraph markup can now be added to entities as a new field. In this case, I have added it to a text field called 'Story Text', which is trimmed. Now I can show the opengraph markup from a shared link below the trimmed field just like on Facebook. This field is completely themeable.
DS settings for new field
Rendered html from opengraph tag markup as field under text field Teaser
Comment #9
SocialNicheGuru CreditAttribution: SocialNicheGuru commentednot all entities supply a type so the line $entity->type in the patch causes multiple errors:
bootstrap_tour_step caused this one:
Undefined property: Entity::$type opengraph_filter.module:563 [23.98 sec, 206.73 MB] [notice]
Undefined property: MessageType::$type opengraph_filter.module:563 [24.13 sec, [notice]
207.21 MB]
Undefined property: OgMembershipType::$type opengraph_filter.module:563 [30.8 sec, [notice]
207.23 MB]
207.6 MB]
Undefined property: SearchApiIndex::$type opengraph_filter.module:563 [30.93 sec, [notice]
207.6 MB]
Undefined property: RulesReactionRule::$type opengraph_filter.module:563 [31.18 sec, [notice]
209.09 MB]
Comment #10
3dnathaniel CreditAttribution: 3dnathaniel commentedI am extremely interested in this patch. Can we get the issues mentioned by socialnicheguru resolved?
Comment #11
3dnathaniel CreditAttribution: 3dnathaniel commentedI have applied the patch at #8 but how do I get this to work? I am not using displaysuite. Is this psuedofield available to views? Panels?
Comment #12
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedCauses a number of notices during cron: https://www.drupal.org/node/2827181
I run drush cron --debug
It seems that 'type' is not defined for a number of entity types.
Comment #13
brooke_heaton CreditAttribution: brooke_heaton as a volunteer and commentedAdded fixes to resolve problems and to have the extra_fields properly work with multiple text input fields.
Comment #14
ph7 CreditAttribution: ph7 commentedGreat module indeed!
Instead of, or in addition to a link field, maybe consider a link formatter. That would perhaps allow for greater flexibility and adaptability.
Comment #15
loon CreditAttribution: loon as a volunteer and at DevBranch, Drupal Ukraine Community commented