View Full Version : Creating a private community with phpnuke
Vallhalla
15-11-2003, 05:55 AM
I?m trying to create a private community website with phpnuke , but i want the whole website can only be seen by members of the community ,example - like CommunityZero (http://www.communityzero.com).
In a normal phpnuke site , visitors can view the index page of the website ,but in my case, i want those who are not registered or haven?t log in yet can only see a start page or something like that, and they can login from the start page to go to the index page and the rest of the site. So all the content of the website cant be seen unless u r a member. Get a clue of what i mean here??
I?ve surfed around in the internet, but can?t seem to find anything helpful. Hope someone here have ideas on how to do it.. hehehe.. thanks
bachok83
15-11-2003, 06:00 AM
yeah... sure you can do that.. it's not that hard... well there are two ways to do that..
first, just include blocks and modules only for registered users..
or second,
you can create a second phpnuke site (for main page, then the other one is for the real page.. using the same databse..)
you got what i mean? (the intro page doesnt have to be complete phpnuke site , u can just include what's crucial, and yeah, i think it's pretty much it.. :D )
Vallhalla
15-11-2003, 06:16 AM
the first way, i can understand..but that way, visitors can still enter the site rite?its not what i really want.. i think..
the second one, i dont really understand the second one.. can u elaborate on the second option? i?m a newbie in phpnuke , so if u can give a more detailed answer, it would be easier for me to understand.. thanx..
bachok83
15-11-2003, 07:04 AM
hmm, well i'll try to explain as clear as i can,
okay say, first develop a phpnuke and your address will look something like
http://notregister.com
then,
create a new folder in the /html folder (if u are using linux)
or /htdocs folder if you are using windows
say the folder name is registeronly
then, develop a second phpnuke site in the folder /registeronly
then, at the http://notregister.com make it linked to the folder /registeronly after the user registered
say im not registered, i'll go to http://notregister.com
then i register, and i'll see a block saying go to the real site (that block is only viewable to registered users only)
then direct the link to http://notregister.com/registeronly/index.php
it's just the matter of folder, and be sure to set the config.php (the same config for both system phpnuke)
Vallhalla
15-11-2003, 07:09 AM
I got an idea, but i?m not sure this can be implemented or not... Can i take the login form of the phpnuke site and put it into a custom made html or a php page outside of the phpnuke folder/website and members of the site can login from there to enter the phpnuke website? It seems a little bit easier than to create 2 phpnuke website isn`t it? But, one problem.. i don`t know where to find the login form code and how to import it into a custom page.. hehehe.. what do u think??
found something about it here (http://www.nukecops.com/postp44172.html),but no further details on how to do it..
littlebigone
15-11-2003, 07:42 AM
what if people know the url of the 'for registered' members only? would he or she be able to go to that page?
Vallhalla
15-11-2003, 07:50 AM
haaa.. thats why.. i?ve thought about that too.. i think ppl can still have a look at the page if they know the url.. that`s a problem too..
littlebigone
15-11-2003, 08:18 AM
you could edit a line into the page by detecting the cookie or whatever it is phpnuke uses to recognize uses so that if they are not registered, then it will redirect to another page
maybe...I;m not sure what phpnuke uses...just using general ideas
i think when php nuke is set to members only only members can get to the content
bachok83
17-11-2003, 09:24 PM
you are absolutely right littlebigone,
yes you can do that.. but it's hard coded.. nahh u dont wanna make it hard, do you?
just set the second phpnuke site as registered only, and even though the users go through the link, it'll kick out to the not registered site..
it's doable, but needs a lot of research (i dont really mean research here, what i mean is, trial and error)
what i would do now? here is, install the phpnuke, play around with it.. make it work.. and play again.. and play again with it.. and if you feel that you've understand it;s flow,
open some phpnuke files and study them (especially modules files)
you'll understand what im talking about.. surely... i promise... the problem that restrict you from understanding me is, you never play around with it yet... just you try... :D
I don't know if you've settled the problem or not but I hope it's not too late for me to butt in ... I just studied the architecture, theories and concepts behind phpNuke implementation and it's extremely easy to know if the user is registered or not since the username is stored in a variable called $cookie[1] ... so if $cookie[1]=="" then the user is not logged in or registered. period. of course you have to mention : global $cookie in your code in case the code gets trapped in some functions ...
weich
08-05-2004, 04:06 AM
hmm....why not try Mambo? It's one of the newer CMS...and it's really very easy to use =)
I've implemented it on my site at www.internshipasia.tk you can have a look if you want =)
screw3d
08-05-2004, 09:07 AM
I have heard a lot of bad things about PHPnuke (security holes, badly coded PHP etc).. so Mambo might be a better CMS
vBulletin® v3.7.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.