Answer the question
In order to leave comments, you need to log in
How to hide the news image?
How to hide the news image from the visitor, but make it visible for the share button?
What I tried to do:
I made a news field under the image link and wrote the code as a comment in fullstory.tpl like this:
<!-- [xfgiven_image] <img src="[xfvalue_image]" alt="{title}" width="400" height="300" border="0"> [/xfgiven_image] -->
, but in offers to share (let's say "VKontakte") this news, then I only show pictures visible to the visitor. Is it possible to implement the idea? Answer the question
In order to leave comments, you need to log in
Question 1: Why do you comment the image output code if you don't use it there at all?
Isn't it easier to remove it?
In 2: Everything is implemented there through Open Graph
To do this, you will need to slightly correct the code in the show.full.php file
Go along the /engine/modules path open the show.full.php file there
And somewhere on line 500 you will notice the variables $social_tags
below add :
$xfieldsdata = xfieldsdataload( $row['xfields'] );
$social_tags['image'] = $xfieldsdata['image'];
$tpl->clear();
unset( $row );
$xfieldsdata = xfieldsdataload( $row['xfields'] );
$poster = $xfieldsdata['image'];
And if through meta?
<meta property="og:image" content="{ссылка_на_картинку}">
canonium.com/articles/html-meta-tags
<meta name="og:title" content="The Rock">
<meta name="og:type" content="movie">
<meta name="og:url" content="http://www.imdb.com/title/tt0117500/">
<meta name="og:image" content="http://ia.media-imdb.com/rock.jpg">
<meta name="og:site_name" content="IMDb">
<meta name="og:description" content="A group of U.S. Marines, under command of...">
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question