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

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 05:46:10 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,105
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 332
  • Total: 333
  • @rjen

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