Gossamer Forum
Home : Products : Links 2.0 : Customization :

User frontend subroutine (portal registration)

(Page 1 of 2)
> >
Quote Reply
User frontend subroutine (portal registration)
Hi!

I was wondering if there's some sort of modification or add-on I could add to our site where a Links engine plus some other CGI scripts (top100 ranking, banners exchange, etc....) are running.

It would be like a universal login/password required to use any of the services... cookies driven I guess, much like Yahoo does each time you try to enter their Geocities, Games or WebRing sections...

Once logged in you have full access to all the scripts including Links but if you don't fill in the login/password, you only have limited access to certain parts of the website.

User database would be aside from Links and the rest of scripts, so it can be built using MySQL or plain ASCII. We'd just require a registration process plus a cookies' session checker based on the user on-line.

Any1 bored wanna try this? ;)

Thanks!


Quote Reply
Re: User frontend subroutine (portal registration) In reply to
May be Bmxer would include the session login process he is using for the ADMIN MOD for other .cgi scripts in your site.


========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: User frontend subroutine (portal registration) In reply to
Also, there is a PORTAL MOD written by junko.

Bear in mind that if you are planning on having more than 2,000 users, that using LINKS SQL would be much better. Having more than 2,000 users with a flat file system would hog a lot of CPU...it would be better to use a SQL system like LINKS SQL.


========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: User frontend subroutine (portal registration) In reply to
I agree. I probably wouldn't try to have so many services and do the coding to do that for Links 2. i mean, its a good script, but it is flatfile.


Lavon Russell
LookHard Mods
lavon@lh.links247.net
Quote Reply
Re: User frontend subroutine (portal registration) In reply to
May be I expressed myself not correctly enough...

It would be a SEPARATE system, aside from LINKS, where a USERS' MySQL database would be created (with its admin interface) and then a SEPARATE script called by Links AND any of the other scripts (by insterting a call in each script that needs the user validation) would create the cookie session in the users' browser, allowing him/her or not to execute the rest of the script.

So, from my point of view, there's no relation between that and whichever version of Links you use, since the users database HAS NO relation with Links itself.

Clearer now?



Quote Reply
Re: User frontend subroutine (portal registration) In reply to
Mixing flat file and MySQL is NOT a good idea, too much time would need to be invested rather than going with a full-fledged SQL-based system, like LINKS SQL, that will be more efficient and effective!


========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: User frontend subroutine (portal registration) In reply to
You're kidding right? It is not really that difficult or time consuming as long as you know what you're doing. A waste of time, maybe, seeing as MySQL seems to be available for him, why not go with Links SQL in the first place, and simply utilize it's password system.

A simple solution would be to create a standard authentication module to use in your scripts. I could post some code for this if I find some time. I'm a bit busy writing my own SQL search/directory software...



--Philip
Links 2.0 moderator
Quote Reply
Re: User frontend subroutine (portal registration) In reply to
NO...I am not kidding...it is plainly a waste of time mixing MySQL based systems and flat file systems. Depending on your traiffic, of course, if you only have less than 1,000 unique visitors per day and only 10 -20 registered users logging in per day, then yea, you could look at a flat file/MySQL solution...

But anything more intensive, would be A WASTE TO PROGRAM, J U N K O!!! Mad


========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: User frontend subroutine (portal registration) In reply to
ESPECIALLY IF YOU ARE ON A SHARED SERVER!!!


========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: User frontend subroutine (portal registration) In reply to
ugh... please re-read my post. I could have swore I agreed that it would be a waste of time to do it, however I also said it really isn't as difficult as you made it seem... in fact, I'm about half done writing some basic codes Wink:
Code:
code snipped... see next post

--Philip
Links 2.0 moderator

Last edited by:

junko: Sep 10, 2001, 8:32 AM
Quote Reply
Re: User frontend subroutine (portal registration) In reply to
following up on this... I've uploaded a beta version of CamelSoup::Auth, and an example implementation of the module to my FTP site. There are things that really need to be changed, though... you'll notice them if you browse through the code.

The module provides the following functions:
-checking user validity
-adding new users
-deleting users

The final version will have an "update" function as well.

Just a few notes...

Code:
$auth = new CamelSoup::Auth();
can take a hash of up to 6 values, but can function with the built-in defaults...

Code:
'db_user' => 'root', # username to use
'db_pass' => '', # password to use
'database' => 'Auth', # name of database to use
'table' => 'users', # name of table to use
'name_col' => 'User', # name of username column
'pass_col' => 'Password' # name of password column

if you need to change any defaults, just include them like:
Code:
$auth = new CamelSoup::Auth(
'user' => 'myname',
'password' => 'mypass',
'database' => 'mydbname',
'table' => 'myuserdata'
);

Auth.pm only needs to know the column names for the User and Password fields. When using check_auth(), it will return a hashref of all the columns/values. When using new_user(), it will add values to any column you specify. You are not limited to using just the Usr/Password fields, so long as you've set up the table correctly.

The error checking isn't very good yet (just a word of caution...).

You should really use crypt() on the password field. I didn't in the example just to keep things simple.


--Philip
Links 2.0 moderator
Quote Reply
Re: [junko] User frontend subroutine (portal registration) In reply to
Hi!

If I don't use LINKS SQL is becaue the money and time invested in Links 2 is still not covered ;)

Second, I need a subroutine available for every CGI script I run, not just Links. Does Links SQL passwords system work for more than 1 script at a time?

Junko: are you composing a final mod then? Shall I wait or find a solution with your code somewhere else? I'm not good at PERL nor SQL at all.

Thank you all for the input on this matter.

Quote Reply
Re: [webcamworld] User frontend subroutine (portal registration) In reply to
I'd say the codes I posted work, however they just need some optimizing, and adding the update function. The module is easily portable between scripts and databases; all that's required is a few details about the database to be used for the current action. You don't need to change anything in the module. You aren't required to know any SQL (that is all handled by the module), you just need to plug the apporiate function calls into your scripts.

I should have a final version ready by Thursday.

And if anyone is interested, I can make a version compatable with flatfile databases through DBD::CSV but it obviously won't be as good or fast.

--Philip
Links 2.0 moderator
Quote Reply
Re: [junko] User frontend subroutine (portal registration) In reply to
OK Junko, I'll wait for a final version of the plugin ;) Then I cheer for you! ;)

Quote Reply
Re: [junko] User frontend subroutine (portal registration) In reply to
Just took a look at Auth.pm - nice

To make it more user friendly you may wish to change occurances of

... or die $!

to:

... or die $self->error("Error : $!");

Then sub error would look like:
Code:
sub error {

print $_[1];
exit;

}

.....that should prevent nasty internal server errors.

....and in sub check_auth you should probably use $dbh->quote() instead of...

'$values{$self->{'name_col'}}'

Just a thought anyway.

Last edited by:

PaulWilson: Sep 15, 2001, 12:41 PM
Quote Reply
Re: [PaulWilson] User frontend subroutine (portal registration) In reply to
one step ahead of you on the error reporting... using die didn't seem to work properly from inside the module, though (see my reccent post in the CGI forum). You are right about the quote() thing. I'll make sure everything is quote()'ed in the final version.

--Philip
Links 2.0 moderator
Quote Reply
Re: [junko] User frontend subroutine (portal registration) In reply to
I may just snatch a copy myself if thats ok (when its done).
Quote Reply
Re: [PaulWilson] User frontend subroutine (portal registration) In reply to
Make it quick though... I not going to keep stuff like this opensource much longer. I think I'm getting pretty good with this stuff and it's a lot of work and I need money. :-)


--Philip
Links 2.0 moderator
Quote Reply
Re: [junko] User frontend subroutine (portal registration) In reply to
Bah ha ha.....got it :)
Quote Reply
Re: [PaulWilson] User frontend subroutine (portal registration) In reply to
Where r u picking those from?

Camelsoup.com?

Junko, whatzup with the PrivateMail / ForumLinks paid mods? Not selling them anymore?
;)

How's the portal mod going?

Any sneak preview? ;)


Quote Reply
Re: [webcamworld] User frontend subroutine (portal registration) In reply to
something is there Wink

gotta know where to look I guess ... problem is some of the pages went blank on me ...Shocked

openoffice + gimp + sketch ... Smile
Quote Reply
Re: [QooQ] User frontend subroutine (portal registration) In reply to
Private mail... I've had "most" of that working, however I decided to stop working on it and simply add it as a feature to the forum script. As for the forum script, I lost most of the code due to a nasty virus on my old hard drive a month ago. I will try to work on this again, however it will be in SQL this time and not flatfile. I wouldn't expect this to be available before Christmas.

And yeah, some of my site is broken. I'll be relaunchng my site with the same general design, hopefully with better mod instructions and stuff, but most importantly including some non-Links scripts I've written that will be for sale...

--Philip
Links 2.0 moderator
Quote Reply
Re: [junko] User frontend subroutine (portal registration) In reply to
.......and I'll be adding a page to my site where people can upload Links2 mods and other scripts they've written for others to download :)
Quote Reply
Re: [PaulWilson] User frontend subroutine (portal registration) In reply to
Junko,

Can u update us on the progress of the portal stuff? ;)

From your previous message... do you need hosting?
Quote Reply
Re: [webcamworld] User frontend subroutine (portal registration) In reply to
I haven't worked on PortalLinks in a while, mostly because I have no reason to except for custom versions. There are 4 major versions (3 of which are available): cookies, flatfile, mysql; the fourth is a port of the sql version to DBD::CSV but it's very slow. They on my ftp site so you should be able to find them.

--Philip
Links 2.0 moderator
> >