Skip to Content Skip to Menu

[#6632] Logical problem with activity: Links

  • timstohr
  • timstohr
  • OFFLINE
  • Posts: 1091
  • Thanks: 56
  • Karma: 9
7 years 5 months ago - 7 years 5 months ago #293833 by timstohr
Hi Kyle,
First of all, activity link parsing (or whatever you call it that links are automatically recognised inside the comments) is working really good.

Problem: I am using a picture above the event as advertising banner. This banner is taken over by activity as it is the first picture it encounters.


How can I enable the activity to choose the main picture instead of the banner? I am currently doing it with FB the way that I am setting the minimum size of picture it should choose...

Attachments:
Last edit: 7 years 5 months ago by krileon. Reason: Added [#6632] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48449
  • Thanks: 8280
  • Karma: 1443
7 years 5 months ago #293838 by krileon
Replied by krileon on topic Logical problem with activity: Links
How are you adding your banner to the activity? A custom link from an auto action? Typically the trigger would be acted on and you'd utilize the $insert variable to add inline content that's above links and always present. The inline links parsing parses before the already attached links. Will add a feature ticket to see if I can move this parsing to be after the existing links have already been parsed and output.

forge.joomlapolis.com/issues/6632


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • timstohr
  • timstohr
  • OFFLINE
  • Posts: 1091
  • Thanks: 56
  • Karma: 9
7 years 5 months ago #293844 by timstohr
Replied by timstohr on topic Logical problem with activity: Links
Hi, I am not actually adding the banner at all to the activity. It is the parsing of the link: Activity then searches for the first picture it can find (which in this case is the banner) and does not take the big picture which it should have taken...

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48449
  • Thanks: 8280
  • Karma: 1443
7 years 5 months ago - 7 years 5 months ago #293845 by krileon
Replied by krileon on topic Logical problem with activity: Links
That's an issue with that page then. CB Activity will first attempt to parse metadata for media. If the page has poor metadata then it uses the first image it can find on the page. Below is the parsing it does. It starts from top to bottom so inline media being a last resort.
Code:
array( 'title' => array( '//meta[@name="og:title"]/@content', '//meta[@name="twitter:title"]/@content', '//meta[@name="title"]/@content', '//meta[@property="og:title"]/@content', '//meta[@property="twitter:title"]/@content', '//meta[@property="title"]/@content', '//title' ), 'description' => array( '//meta[@name="og:description"]/@content', '//meta[@name="twitter:description"]/@content', '//meta[@name="description"]/@content', '//meta[@property="og:description"]/@content', '//meta[@property="twitter:description"]/@content', '//meta[@property="description"]/@content' ), 'media' => array( 'video' => array( '//meta[@name="og:video"]/@content', '//meta[@name="og:video:url"]/@content', '//meta[@name="twitter:player"]/@content', '//meta[@property="og:video"]/@content', '//meta[@property="og:video:url"]/@content', '//meta[@property="twitter:player"]/@content', '//video/@src' ), 'audio' => array( '//meta[@name="og:audio"]/@content', '//meta[@name="og:audio:url"]/@content', '//meta[@property="og:audio"]/@content', '//meta[@property="og:audio:url"]/@content', '//audio/@src' ), 'image' => array( '//meta[@name="og:image"]/@content', '//meta[@name="og:image:url"]/@content', '//meta[@name="twitter:image"]/@content', '//meta[@name="image"]/@content', '//meta[@property="og:image"]/@content', '//meta[@property="og:image:url"]/@content', '//meta[@property="twitter:image"]/@content', '//meta[@property="image"]/@content', '//img/@src' ) ) );


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 7 years 5 months ago by krileon.

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

  • timstohr
  • timstohr
  • OFFLINE
  • Posts: 1091
  • Thanks: 56
  • Karma: 9
7 years 5 months ago #293846 by timstohr
Replied by timstohr on topic Logical problem with activity: Links
OK got it. Thanks Kyle. For those reading this as well... you have to get a plugin that makes the og: image metadata properly. There are loads out there (I have just googled it right now).

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48449
  • Thanks: 8280
  • Karma: 1443
7 years 5 months ago #293847 by krileon
Replied by krileon on topic Logical problem with activity: Links
For CB pages you can also use CB Auto Actions to add substitution supported metadata to pages using a Code action. :)


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

Moderators: beatnantkrileon
Powered by Kunena Forum