Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: Xpresskonami - marraskuu 01, 2013, 08:10:11 AP

Otsikko: Anybody should please drop me user and guest viewing topic codes
Kirjoitti: Xpresskonami - marraskuu 01, 2013, 08:10:11 AP
Please anybody should drop me user and guest viewing topic codes for SMF
Otsikko: Re: ANYBODY SHOULD PLEASE DROP ME USER AND GUEST VIEWING TOPIC CODES
Kirjoitti: Burke ♞ Knight - marraskuu 01, 2013, 08:31:55 AP
How do I ask support questions the smart way? (http://wiki.simplemachines.org/smf/How_do_I_ask_support_questions_the_smart_way)
How can I get my problems solved faster? (http://wiki.simplemachines.org/smf/How_can_I_get_my_problems_solved_faster)

Also, more description of what you want would be nice.

Last but not least: Do Not use all CAPS!
Otsikko: Re: Anybody should please drop me user and guest viewing topic codes
Kirjoitti: Chalky - marraskuu 01, 2013, 09:01:55 AP
I have removed the capitals.  I would normally have re-phrased the title to better describe what you are requesting help with, but on this occasion I haven't a clue.  Please read the links provided by BurkeKnight and try again.
Otsikko: Re: Anybody should please drop me user and guest viewing topic codes
Kirjoitti: Ricky. - marraskuu 01, 2013, 05:35:43 IP
Most probably wants to know when to show a something to guest or logged in user:
like :

<?php
if(!empty($context['user']['is_guest']))
echo 
'You are not logged in -- viewing as guest';
else
   echo 
'Show this to logged in users'