This topic was marked solved by its starter, on October 19th, 2014, 04:30 PM
How to disable option print topics for non logged in users

Jurien

  • All i want is a couple days off
  • Posts: 132
Re: How to disable option print topics for non logged in users
« Reply #1, on October 18th, 2014, 06:31 PM »
I know there is a directive to the search engine/crawlers,not to index these pages (for what it's worth),but still very long topics can cause memory issues when they or not logged in users hits to start the print box.

Did several attempts to add a line like this if ($context['user']['is_logged']) in Display.php but it's still a no go,must be doing something wrong but I'm stuck :help:
// Lastly, set up the navigation items that we're going to be using.
$context['nav_buttons'] = array(
'normal' => array(
'reply' => array('test' => 'can_reply''text' => 'reply''url' => '<URL>?action=post;topic=' $context['current_topic'] . '.' $context['start'] . ';last=' $context['topic_last_message'], 'class' => 'active'),
($context['is_marked_notify'] ? 'unnotify' 'notify') => array('test' => 'can_mark_notify''text' => $context['is_marked_notify'] ? 'unnotify' 'notify''custom' => 'onclick="return ask(' JavaScriptEscape($txt['notification_' . ($context['is_marked_notify'] ? 'disable_topic' 'enable_topic')]) . ', e);"''url' => '<URL>?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' 'on') . ';topic=' $context['current_topic'] . '.' $context['start'] . ';' $context['session_query']),
'mark_unread' => array('test' => 'can_mark_unread''text' => 'mark_unread''url' => '<URL>?action=markasread;sa=topic;t=' $context['mark_unread_time'] . ';topic=' $context['current_topic'] . '.' $context['start'] . ';' $context['session_query']),
'send' => array('test' => 'can_send_topic''text' => 'send_topic''url' => '<URL>?action=emailuser;sa=sendtopic;topic=' $context['current_topic'] . '.0'),
'print' => array('text' => 'print''custom' => 'rel="nofollow"''url' => '<URL>?action=printpage;topic=' $context['current_topic'] . '.0'),

CerealGuy

  • Posts: 343