News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How to add picture ? Please check the image

Started by user555, August 16, 2015, 10:43:33 AM

Previous topic - Next topic

Deaks

sorry for being sharp.  What mod did you try?
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."


Deaks

~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

user555

hey, i will reply tomorrow, bed time for me, Gn :)

user555

This version is not supported, so didn't contact the author

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

user555

tried it & now it shows not compatible with the theme

user555

I found this in google :

QuoteFacebook meta tags

The thumbnail image for your auto-posted campaign looks like this.

<meta property="og:image" content="url to image" />

If you choose not to set an icon manually, Facebook will choose an image to use as the default thumbnail for you.

The title for the post looks like this.

<meta property="og:title" content="title of the page" />

If you choose not to add this property, Facebook will populate the page title with your MailChimp campaign's subject line.

A short description of your campaign content looks like this.

<meta property="og:description" content="add a short description of the page or content"/>

If you choose not to add this property, Facebook will select a section of your campaign content for you automatically.

Where can i put those 3 lines  in index.templete.php ?

samk2824

So, I think it was just a misunderstanding between the use of two versions, one is updated now. It's been so long to to solve this blunder mistakes.  :o

Steve

DO NOT pm me for support!

Gluz

The easiest way is by modifying the index.template.php from your theme, adding the meta tags properly in the right section.

First, you need to upload the image you want to show to your FTP to be accessible via web, something like my.domain.com/image.png

Then, add them with echo and some SMF variables you can have pretty much all the info needed, for Facebook.

In index.template.php find:

// Output any remaining HTML headers. (from mods, maybe?)


and add before:

echo '
<meta property="og:image" content="my.domain.com/image.png" />
<meta property="og:title" content="', $context['page_title_html_safe'], '" />
<meta property="og:description" content="', $context['page_title_html_safe'], '"/>';


(remember to change the image URL)

This should work, but the description is just the same as the title. If you want something different, then you really need to search for a mod that does this kind of thing.

user555

Quote from: Gluz on August 19, 2015, 05:16:19 PM
The easiest way is by modifying the index.template.php from your theme, adding the meta tags properly in the right section.

First, you need to upload the image you want to show to your FTP to be accessible via web, something like my.domain.com/image.png [nofollow]

Then, add them with echo and some SMF variables you can have pretty much all the info needed, for Facebook.

In index.template.php find:

// Output any remaining HTML headers. (from mods, maybe?)


and add before:

echo '
<meta property="og:image" content="my.domain.com/image.png" />
<meta property="og:title" content="', $context['page_title_html_safe'], '" />
<meta property="og:description" content="', $context['page_title_html_safe'], '"/>';


(remember to change the image URL)

This should work, but the description is just the same as the title. If you want something different, then you really need to search for a mod that does this kind of thing.

Finally, thanks a lot @Gluz !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! The code worked :D
Thanks to everyone for helping me out! Good wishes for all ;)

Advertisement: