TinyPortal

Development => Feedback => Bugs/Errors => Topic started by: kohai.raul on June 17, 2015, 05:51:46 PM

Title: Articles vs Frontpage.
Post by: kohai.raul on June 17, 2015, 05:51:46 PM
Hi all!

I'm testing the Articles engine. I'm trying to activate social bookmarks and Global Tags for an article, but the system shows the social bookmarks and tags even  on frontpage. And by unchecking  "Override frontpage settings..." the system doesn't respect frontpage layout.

How can I show social bookmarks and global tags only when reading full article?
Title: Re: Articles vs Frontpage.
Post by: kohai.raul on June 18, 2015, 05:37:52 PM
Partially solved! for Global Tags. With this code, you can be sure that global-tags box will be visible only when reading full article:

TPSubs.template.php

Search

function article_globaltags($render = true)
{
global $scripturl, $txt, $context;

if(!isset($context['TPortal']['article']['global_tag'])


Add
|| !$context['TPortal']['single_article']

desired result must be
function article_globaltags($render = true)
{
global $scripturl, $txt, $context;

if(!isset($context['TPortal']['article']['global_tag']) || !$context['TPortal']['single_article'])

Title: Re: Articles vs Frontpage.
Post by: kohai.raul on June 18, 2015, 05:45:38 PM
Solved for SocialBookmarks, too! this way, you can be sure that social icons will be available only when reading full article:

Search
function article_bookmark($render = true)
{
global $scripturl, $settings, $context;


Add
if (empty($context['TPortal']['single_article']))
return;


O0