TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 20, 2024, 03:52:25 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,197
  • Total Topics: 21,221
  • Online today: 144
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 55
  • Total: 55

Articles vs Frontpage.

Started by kohai.raul, June 17, 2015, 05:51:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kohai.raul

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?

kohai.raul

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'])


kohai.raul

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