News: TinyPortal Release Schedule. Please read this update for More Info.

Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

January 26, 2020, 06:01:51 AM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 189424
  • Total Topics: 20795
  • Online Today: 192
  • Online Ever: 917
  • (January 21, 2020, 09:02:26 AM)
Users Online
Users: 0
Guests: 42
Total: 42

Author Topic: Articles vs Frontpage.  (Read 3441 times)

0 Members and 1 Guest are viewing this topic.

Offline kohai.raul

  • Jr. Member
  • **
  • Posts: 19
Articles vs Frontpage.
« on: June 17, 2015, 10:51:46 AM »
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?

Offline kohai.raul

  • Jr. Member
  • **
  • Posts: 19
Re: Articles vs Frontpage.
« Reply #1 on: June 18, 2015, 10:37:52 AM »
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
Code: [Select]
function article_globaltags($render = true)
{
global $scripturl, $txt, $context;

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

Add
Code: [Select]
|| !$context['TPortal']['single_article']
desired result must be
Code: [Select]
function article_globaltags($render = true)
{
global $scripturl, $txt, $context;

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

Offline kohai.raul

  • Jr. Member
  • **
  • Posts: 19
Re: Articles vs Frontpage.
« Reply #2 on: June 18, 2015, 10:45:38 AM »
Solved for SocialBookmarks, too! this way, you can be sure that social icons will be available only when reading full article:

Search
Code: [Select]
function article_bookmark($render = true)
{
global $scripturl, $settings, $context;

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

 O0