News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How my news script adaptation SMF forum?

Started by ircteknik, May 15, 2006, 03:21:27 PM

Previous topic - Next topic

ircteknik

i have news script ...all users can see this news details...i want to us e smf user settings on this my news script how i can do it? just members see my forums messages..and i want that just members see my news details... how i can adaptation this coding to my news php script? please help me...

B Patterson

<?php
include_once('SSI.php');

if(
$context['user']['is_logged'] && !$context['user']['is_guest'])
{
    
// They're logged in and not a guest :)
?>

    <!-- Your news stuff here, HTML and PHP intermixed...
<?php
}
else
{
    
// They're a guest of some sort :(
?>

    <p>You need to be logged in to view the news.  Please <b><a href="index.php?action=login">login</a></b> to continue.</p>
<?php
}
?>


Advertisement: