You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 58 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Hoe to check visitors are a member and are logged in [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
pollos
Nuke Cadet
Nuke Cadet


Joined: Jun 21, 2003
Posts: 1

Location: UK

PostPosted: Thu Jul 17, 2003 12:35 pm Reply with quoteBack to top

Can anyone help me out. I would like to have NukePHP as a members section. I have a sizeable website [60 odd pages ATM] parts of which I would only like the visitor to see if they are a member and are logged in.

I would rather not go to the length of adding each page to the Content section, but would rather let the visitor have an access link through a custom block only visible when logged in, but that doesn't stop someone typing in the full URL to the directory.

What I need is I think is a small php script inserted in the page head to check the visitor is logged in E.G

Check who is trying to view the page,
Check
are they Logged_in, if true show content,
else
show a msg and link to log_in.

I have pored over the nuke site looking for clues on how to do this, but being new I can't figure out how to do it. Any help greatfully received, thanx for your time.
Find all posts by pollosView user's profileSend private messageVisit poster's website
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Fri Jul 18, 2003 8:09 am Reply with quoteBack to top

mainfile.php holds the key.

function is_user($user) will return true if the $user is registered.

function online() will demonstrate how to read the sessions table to see if the user is online or not.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.333 Seconds - 397 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::