• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Resolved Sportsbook thumbnail image

Ah, it didn't unfurl
That is an XF2 feature. This site is running XF 1.5 ;)

What do you mean by Cover Image? Sportsbook doesn't have one (its never had one). AMS has a Cover Image, however, that is specific functionality built into AMS.

Sportsbook does have an ICON (Category Image), however, that is not something that can be set as an OG IMAGE as its too small (OG requires at least 400x400).
 
Hey Bob, what I'm wondering is if there is an option somewhere to set the image for SportsBook in the samae way I can set an image for a thread so that when I post a link to it that image shows up instead of the forum logo.

For example, if I type the link to SportsBook into Sharing Debugger - Facebook for Developers the image they fetch is my forum logo:

aItHNXd.png


I would like to know if I can specify a different image for that.
 
Threads do not set a OG image. As you can see below, threads are NOT passing in OG related arg data to the metadata macro (which means that the OG image being reported in the <head> is the SITE LOGO).

Code:
<xf:macro template="metadata_macros" name="metadata"
    arg-description="{$fpSnippet}"
    arg-shareUrl="{{ link('canonical:threads', $thread) }}"
    arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" />

What threads DO HAVE however are POSTS with IMAGES and sometimes, the Facebook Debuger (not always) will pick out one of those attachment images and use that as the OG image instead of the Site Logo (that is controlled by facebook tho, not XF).

There are also some 3rd party addons that do things like add Cover Image functionality to Threads, which includes reporting that cover image as the OG image. Also, I believe that in XF 2.2.0 RC 2, the new Article Threads are also setting an OG image if the Article Thread System determines that there is an acceptable image in the first post of the thread (nobody has seen that code yet as XF 2.2.0 RC 2 has not been released yet.... well, as I am tying this, they release RC 2 lol).

Sportsbook does have an ICON (Category Image), however, that is not something that can be set as an OG IMAGE as its too small (OG requires at least 400x400).
As I've said, the only thing currently that a Sportsbook event has that could even be used to set an OG image, would be the Category Icon, however, its TOO SMALL, so Facebook would REJECT it even if I did set it.

What might work for you RIGHT NOW is editing the template 'event_view' and pass in a custom image via arg-ImageUrl to set a custom OG image for Sportsbook.

This is what Sportsbook is using currently (which as you can see, is the same as threads).
Code:
<xf:macro template="metadata_macros" name="metadata"
    arg-description="{$descSnippet}"
    arg-shareUrl="{{ link('canonical:sportsbook', $event) }}"
    arg-canonicalUrl="{{ link('canonical:sportsbook', $event, {'page': $page > 1 ? $page : null}) }}" />

Modifying it to pass in an image url and setting the twitter card to large (optional) might look a bit better than facebook displaying the site logo when sharing sportsbook events on Facebook.

Code:
<xf:macro template="metadata_macros" name="metadata"
    arg-description="{$descSnippet}"
    arg-shareUrl="{{ link('canonical:sportsbook', $event) }}"
    arg-canonicalUrl="{{ link('canonical:sportsbook', $event, {'page': $page > 1 ? $page : null}) }}"
    arg-imageUrl="{{ base_url('styles/default/xenaddons/sportsbook/category_images/sb_cover_image.png', true) }}"
    arg-twitterCard="summary_large_image" />

Note: You'll need to upload your custom image to styles/default/xenaddons/sportsbook/category_images/image_name.extension as well as change the sb_cover_image.png to what ever your image name and extension is.

As for CHANGES in Sportsbook... there is at least 1 suggestion for being able set set a Cover Image (similar to AMS) and if that happens, I'd be adding in a generic cover image that would be used as the OG image if an event didn't have a cover image set.
 
Its not going to change any existing SHARED events, only NEW ones (unless you clear and recache). ALSO, its up to Facebook or Twitter to decide if the OG image you have in your header meets THEIR requirements.

Can you post a LINK to one of your Sportsbook events so that I can see what is in the HEAD of your event.
 
I was looking to get an og image to show for this address: Sportsbook

Is there a way to do that?

You'd need to edit the index template and do something similar. Index pages usually do not have OG images, so Sportsbook Index is only setting the cononical_url (which uses a different macro).

Template: xa_sb_index

Code:
<xf:macro template="metadata_macros" name="canonical_url"
    arg-canonicalUrl="{{ link('canonical:sportsbook', null, {'page': $page > 1 ? $page : null}) }}" />

Try replacing that block with this block (obviously you will need to modify this to add your own description and image).

Code:
<xf:macro template="metadata_macros" name="metadata"
    arg-description="add your description here"
    arg-shareUrl="{{ link('canonical:sportsbook') }}"
    arg-canonicalUrl="{{ link('canonical:sportsbook', null, {'page': $page > 1 ? $page : null}) }}"
    arg-imageUrl="{{ base_url('styles/default/xenaddons/sportsbook/category_images/sb_index_cover_image.png', true) }}"
    arg-twitterCard="summary_large_image" />
 
OK, I'm really sorry about this Bob, you're going to hate me but it turns out the bookies were asking me if it was possible to set thumbnail images for EVENTS, I got it mixed up and thought they were asking about og images for SportsBook.

So, the question is, is it possible to specify an image for each event because at the moment all the events have the same thumbnail image:

iBrr2gZ.png
 
Also Bob, if you were able to create an addon that provides a field where a moderator can specify the og image for that thread then you would sell a lot of them.

For example, it would be great to have a field in this section when you can put a URL that will be used as the OG Image by Facebook and Twitter.
cK4ZLhP.png


The thing is, this was available in XF1 and lots of people used it but there isn't an addon for it in XF2 and people are crying out for it.

I would be your first customer for it, this addon is desperately needed.
 
OK, I'm really sorry about this Bob, you're going to hate me but it turns out the bookies were asking me if it was possible to set thumbnail images for EVENTS, I got it mixed up and thought they were asking about og images for SportsBook.

So, the question is, is it possible to specify an image for each event because at the moment all the events have the same thumbnail image:

iBrr2gZ.png

As far as im aware you cant im sure Bob will correct me if im wrong. Just looking at your site could you not have more categories for your bets?

As you can see by my list I have broken them down into categories which you can then assign the correct image too.
 

Attachments

  • bets.png
    bets.png
    114.2 KB · Views: 5
  • Like
Reactions: Bob
As far as im aware you cant im sure Bob will correct me if im wrong. Just looking at your site could you not have more categories for your bets?

As you can see by my list I have broken them down into categories which you can then assign the correct image too.
Yes, I am actually in the process of creating a few new categories today. That will probably have to suffice.

Thanks for chipping in (y)
 
Back
Top