On Mon, Mar 14, 2011 at 8:44 PM, Al Louis Ripskis <[email protected]> wrote: > For newcomers to my homepage who would like to access and read the material > indexed > in the left side bar, I would like them to register first, providing their > user name and password. > And I would like to authenticate their IP address if possible.
If you don't want them to see the side bar on the home page you can always surround some of the content with (:if authid:)...(:ifend:). Can you be more clear about what type of authentication you want to do on their IP address? Are you wanting only people within a certain range to be able to access the site or something? If so you could look at http://www.pmwiki.org/wiki/Cookbook/ConditionalMarkupSamples and create your own conditional: (:if ip 192.168.1.*:)for example(:ifend:) I would probably base it off of the "matchstring" example. Note the very handy GlobToPCRE() function in pmwiki.php and preg_match() as well as $_SERVER['remote_addr'] (which I believe can be fairly easily faked). It would probably look something like this: # add (:if ip 192.168.1.* :) conditional $Conditions['ip'] = 'MatchIp($condparm) == 1'; function MatchIp($arg) { $arg = GlobToPCRE(trim($arg)); return preg_match($arg, $_SERVER['remote_addr']); } Caveat: This is email-ware, completely untested even for syntax errors. -Peter _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
