Advertisement:

disable guests from viewing avatars or sig lines

Aloittaja kayte, helmikuu 27, 2006, 09:08:39 AP

« edellinen - seuraava »

kayte

i did a search and i found a code posted, but the thread was from 2004, and if i put it where they say to at time time it puts it right in a code for attachments.

also is there any way to keep guests from printing threads?

RyanJones

Try this:

Open: /Themes/themeName/Display.template.php

Find:


'send' => array('test' => 'can_send_topic''text' => 707'image' => 'sendtopic.gif''lang' => true'url' => $scripturl '?action=sendtopic;topic=' $context['current_topic'] . '.0'),
'print' => array('text' => 465'image' => 'print.gif''lang' => true'custom' => 'target="_blank"''url' => $scripturl '?action=printpage;topic=' $context['current_topic'] . '.0'),
);



Replace With:


'send' => array('test' => 'can_send_topic''text' => 707'image' => 'sendtopic.gif''lang' => true'url' => $scripturl '?action=sendtopic;topic=' $context['current_topic'] . '.0')
  );
  if (!
$context['user']['is_guest'])
$normal_buttons['print'] = array('text' => 465'image' => 'print.gif''lang' => true'custom' => 'target="_blank"''url' => $scripturl '?action=printpage;topic=' $context['current_topic'] . '.0');


Close: /Themes/themeName/Display.template.php




Open:/Sources/Printpage.php

Find:


if (empty(
$topic))
fatal_lang_error(472false);




After, Add:


  
if ($context['user']['is_guest']);
    
fatal_lang_error(223false);


Close: /Sources/Printpage.php




Cheers,

Ryan Jones
RyanJ (Ryan Jones)

Support Web Standards!

Currently working On: Additions to the Karma system.

Aitsukai

#2
The below code hides avatars and signatures from guests on posts. This was tested using 1.1 RC2 only.

Open: /Themes/[your theme name]/Display.template.php

Find:
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))

Replace with:
if (!$message['user']['is_guest'] && !empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))

Find:
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))

Replace with:
if (!$message['user']['is_guest'] && !empty($message['member']['signature']) && empty($options['show_no_signatures']))

Save and upload.

kayte

thank you. i will try this tonight when i don't have little fingers trying to type. :P

Aitsukai

I'm sorry if that gave you an error. I double checked and still didn't see the missing dash. :(

kezayah

Lainaus käyttäjältä: Aitsukai - helmikuu 27, 2006, 02:55:49 IP
The below code hides avatars and signatures from guests on posts. This was tested using 1.1 RC2 only.

Open: /Themes/[your theme name]/Display.template.php

Find:
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))

Replace with:
if (!$message['member']['is_guest'] && !empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))

Find:
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))

Replace with:
if (!$message['member']['is_guest'] && !empty($message['member']['signature']) && empty($options['show_no_signatures']))

Save and upload.
snif  :'(
It's not working !!!  :(

Aitsukai



winrules

Lainaus käyttäjältä: kezayah - maaliskuu 15, 2006, 02:55:39 AP
Lainaus käyttäjältä: Aitsukai - helmikuu 27, 2006, 02:55:49 IP
The below code hides avatars and signatures from guests on posts. This was tested using 1.1 RC2 only.

Open: /Themes/[your theme name]/Display.template.php

Find:
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))

Replace with:
if (!$message['member']['is_guest'] && !empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))

Find:
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))

Replace with:
if (!$message['member']['is_guest'] && !empty($message['member']['signature']) && empty($options['show_no_signatures']))

Save and upload.
snif  :'(
It's not working !!!  :(
you have to use $context['user']['is_guest']

in display.template.php
find:

if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))

replace

if (!$context['user']['is_guest'] && !empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))


find

if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))

replace:

if (!$context['user']['is_guest'] && !empty($message['member']['signature']) && empty($options['show_no_signatures']))


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


kezayah


Advertisement: