Topic-icon add an image

Active Subscriptions:

None
12 years 2 months ago #42663 by kenaki
add an image was created by kenaki
Hello,

I'd like to add an image above social like, share, etc buttons. Where would I paste the code for the image so it will appear on all instances?

I accomplished the following by adding the image to end of the article but that's an extra step I'd like eliminate in the future.
[/url]
The topic has been locked.
Support Specialist
12 years 2 months ago #42672 by alzander
Replied by alzander on topic add an image
In the /plugins/content/jfbccontent/jfbccontent.php file, around line 142, you'll see:
if ($showLike == true && $showLikeInViewPosition != SC_VIEW_NONE)
            {
                if ($isArticleView) //Article Text
                    $likeText = $this->_getJoomlaArticleLike($article, $configModel, $renderKeyString);
                else //Blog Text
                    $likeText = $this->_getJoomlaBlogLike($article, $configModel, $renderKeyString);

                SCArticleContent::addTextToArticle($article, $likeText, $showLikeInViewPosition);
I'm assuming you only want the social image to show in the full articles (not blog views). If so, edit the above like so:
if ($showLike == true && $showLikeInViewPosition != SC_VIEW_NONE)
            {
                if ($isArticleView) //Article Text
                {
                    $likeText = $this->_getJoomlaArticleLike($article, $configModel, $renderKeyString);
                    $likeText = '<div class="social-image"><img src="Click-Me.jpg" /></div>' . $likeText;
                }
                else //Blog Text
                    $likeText = $this->_getJoomlaBlogLike($article, $configModel, $renderKeyString);

                SCArticleContent::addTextToArticle($article, $likeText, $showLikeInViewPosition);
Obviously, update that code as necessary for your site. I hope that gets you going though!

Alex
The topic has been locked.