Jump to content

members only


spasm37

Recommended Posts

hey, I'm looking to create a members only section in which when they log in, they can have a personal profile, upload their own files to contribute to the site, enable them to chat in the forums, etc. Does anyone know a good script for it, or would it be better to have it premade by someone who offers it? I'm looking for the easiest /quickest way to do it.
Link to comment
https://forums.phpfreaks.com/topic/8126-members-only/
Share on other sites

[!--quoteo(post=367484:date=Apr 22 2006, 11:57 AM:name=spasm37)--][div class=\'quotetop\']QUOTE(spasm37 @ Apr 22 2006, 11:57 AM) [snapback]367484[/snapback][/div][div class=\'quotemain\'][!--quotec--]
hey, I'm looking to create a members only section in which when they log in, they can have a personal profile, upload their own files to contribute to the site, enable them to chat in the forums, etc. Does anyone know a good script for it, or would it be better to have it premade by someone who offers it? I'm looking for the easiest /quickest way to do it.
[/quote]


Thats very complex php.....i bought this 700 page book and thats like the final task.....and it only comes up to welcome (name) when they do login!.....
Link to comment
https://forums.phpfreaks.com/topic/8126-members-only/#findComment-29632
Share on other sites

install phpbb, thats what i use for everything.. their session management is excelent. when you download it, only upload the following files/directories to your server:
Directories: db, includes, language, templates
Files: common.php, config.php, index.php, install.php, login.php

This will give you the basic structure for a session management

To make integration easier on other pages, make the following file (bbcon.php):
[code]
<?
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
?>
[/code]

Then on every page you want to require login stuff, do
[code]
include('bbcon.php');
[/code]

to see if the user is logged in, use the $userdata array that is used through out the forum system
[code]
if( $userdata['session_logged_in'] )
{
      echo "You are logged in as".$userdata['username'];
}
else
{

     echo "You are not logged in,<br>Please <a href=login.php>Login</a>";
}
[/code]

its a start, PM me if you have questions
Link to comment
https://forums.phpfreaks.com/topic/8126-members-only/#findComment-29709
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.