What Do You Need In The Xf2 Xengallery Version? Vote for your choices here: http://www.sonnb.com/threads/what-do-you-need-in-the-xf2-xengallery-version.1539/

Fixed Album Share

Discussion in 'Bug Reports' started by indreksi, Apr 16, 2014.

  1. indreksi

    indreksi Authorized Member Authorized

    Write now when user share album to Facebook, G+ etc... it will share only title.

    It would be great to share album with cover image or something.

    It would attract more visitors from social media ;)
     
  2. antonio

    antonio Authorized Member Authorized

    I think this is possible :)
    share.jpg
     
  3. indreksi

    indreksi Authorized Member Authorized

    Last edited: Apr 17, 2014
  4. sonnb

    sonnb Administrator Staff Member

    It seems that the thumbnail url is not correct:

    Code:
    <meta property="og:image" content="http://foorum.ralli.ee/" />
    This will be considered as bug. I will move it to "Bug reports" forum.
     
    antonio likes this.
  5. indreksi

    indreksi Authorized Member Authorized

    Ok, can we have fix for this? I really need this function :(
     
  6. sonnb

    sonnb Administrator Staff Member

    Please open template: sonnb_xengallery_album_view
    Replace:
    Code:
    <xen:container var="$head.openGraph">
        <xen:if is="{$xenOptions.facebookAppId} OR {$xenOptions.facebookAdmins}">
            <xen:include template="open_graph_meta">
                <xen:set var="$url">{xen:link 'canonical:gallery/albums', $album}</xen:set>
                <xen:set var="$title">{xen:phrase sonnb_xengallery_album}: {xen:helper striphtml, {$album.title}}</xen:set>
                <xen:set var="$ogExtraHtml">
                    <xen:if is="{$album.photos}">
                        <xen:foreach loop="{$album.photos}" value="$___photo">
                            <meta property="og:image" content="{xen:helper fullurl, $___photo.photoUrl, true}" />
                        </xen:foreach>
                    </xen:if>
                    <meta property="og:description" content="{xen:helper striphtml, {$album.description}}" />
                </xen:set>
            </xen:include>
        <xen:else />
            <xen:if is="{$album.photos}">
                <xen:foreach loop="{$album.photos}" value="$___photo">
                    <meta property="og:image" content="{xen:helper fullurl, $___photo.photoUrl, true}" />
                </xen:foreach>
            </xen:if>
            <meta property="og:type" content="article" />
            <meta property="og:url" content="{xen:link 'canonical:gallery/albums', $album}" />
            <meta property="og:title" content="{xen:phrase sonnb_xengallery_album}: {xen:helper striphtml, {$album.title}}" />
            <meta property="og:description" content="{xen:helper striphtml, {$album.description}}" />
        </xen:if>
    </xen:container>
    With:
    Code:
    <xen:container var="$head.openGraph">
        <xen:if is="{$xenOptions.facebookAppId} OR {$xenOptions.facebookAdmins}">
            <xen:include template="open_graph_meta">
                <xen:set var="$url">{xen:link 'canonical:gallery/albums', $album}</xen:set>
                <xen:set var="$title">{xen:phrase sonnb_xengallery_album}: {xen:helper striphtml, {$album.title}}</xen:set>
                <xen:set var="$ogExtraHtml">
                    <xen:if is="{$album.contents}">
                        <xen:foreach loop="{$album.contents}" value="$___content">
                            <meta property="og:image" content="{xen:helper fullurl, $___content.contentUrl, true}" />
                        </xen:foreach>
                    </xen:if>
                    <meta property="og:description" content="{xen:helper striphtml, {$album.description}}" />
                </xen:set>
            </xen:include>
        <xen:else />
            <xen:if is="{$album.photos}">
                <xen:foreach loop="{$album.photos}" value="$___content">
                    <meta property="og:image" content="{xen:helper fullurl, $___content.contentUrl, true}" />
                </xen:foreach>
            </xen:if>
            <meta property="og:type" content="article" />
            <meta property="og:url" content="{xen:link 'canonical:gallery/albums', $album}" />
            <meta property="og:title" content="{xen:phrase sonnb_xengallery_album}: {xen:helper striphtml, {$album.title}}" />
            <meta property="og:description" content="{xen:helper striphtml, {$album.description}}" />
        </xen:if>
    </xen:container>
     
  7. indreksi

    indreksi Authorized Member Authorized

    Wow, great thanks for so quick replay.
     
  8. GHuD

    GHuD Authorized Member Authorized

    Is the Bug still there ?
    When sharing an album on Facebook I`ll get the Title and the Forum-Thumb ... Cover would be nice
     
    Last edited: Jul 20, 2015
  9. sonnb

    sonnb Administrator Staff Member

    No it is fixed. It depends if the thumbnail not visible:
    - Album is not visible to everyone.
    - FB cached the old page.
    - ...

    If you provide me the URL, I can do a check for you.
     

Share This Page