Username:    Password:        Click Here To Signup     Forgotten Password
Main Menu
Online
Members: 0

Guests: 34

130.105.x.x forum
151.80.x.x news
35.172.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x comment
46.229.x.x forum
46.229.x.x download
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x top
51.38.x.x news
54.36.x.x dilbertplus
54.36.x.x top
54.36.x.x user
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum

Last Seen

»Stefan Wed 17:17
Gagi2 Tue 04:39
tltneon Wed 17:22
Nouton^ Wed 20:07
mrstipfan Wed 10:54

Newest Members

Forums
Another login script
enddDD
Wed Dec 05 2012, 04:29PM
Posts: 11
Joined: Wed Dec 05 2012, 04:22PM
Registered Member #7471
Hello,i have a more complex login script,with some features,like registration,pass recovery,captcha,q&a,and some user fields for profile,like avatar,name,website,etc.It can be implemented in lgsl?From where to start.I mention that i am not so good in php,but maybe with some help i can manage it.Any tips?Thank you.
Wussie
Wed Dec 05 2012, 06:57PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Hi.
If your login script is part of a CMS or some forum software, then I would suggest you do it the other way around: try and integrate LGSL within your CMS.
That is the way LGSL was designed to work in the first place and that is why Rich made LGSL versions for e107, Joomla, Nuke and Drupal.

LGSL only uses a login module for accessing the admin page and I guess you could use your own login module to access this page, while the rest of LGSL pages do not require login at all.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
enddDD
Sat Dec 08 2012, 05:59AM
Posts: 11
Joined: Wed Dec 05 2012, 04:22PM
Registered Member #7471
I have the login script with all the features that i wannt,because i wannt that users can sign in and after signin in they can add servers.My question is how to use my login script instead of the admin from the lgsl?My login script has groups,like admin,moderator,supermoderator,etc,and i want to assign these group levels to users.Like new user can add a server but an administrator must approve it,and so on.So how to integrate this in lgsl?From where to start?What do i must to edit first of all?Thank you.
Wussie
Sat Dec 08 2012, 12:34PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
You don't have to edit LGSL.
After successful login, your script probably redirects the user to some page, let's say that page is called "logged.php".
You have 2 options:
1) you either edit the login script and replace "logged.php" with "lgsl/index.php?s=add" for example, or
2) you edit "logged.php" and insert something like "<?php include('lgsl/lgsl_files/lgsl_add.php'); ?>" inside the existing html code.

This way your user will be able to add servers to the LGSL database after login.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
enddDD
Sat Dec 08 2012, 01:36PM
Posts: 11
Joined: Wed Dec 05 2012, 04:22PM
Registered Member #7471
yes,but this way the user if it is not logged in and inserts the link into the browser directly,can acces the page wigh i want to load,am i right or not?
let`s say that i am redirecting user after login to index.php
if the user enter in the browser site.com/index.php he can still see that page or not?

thank you.
Wussie
Sat Dec 08 2012, 04:32PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Yes the user can see the page index.php, but you can control what that page contains.
For example you could insert in index.php an "if" statement which checks if the user is logged in or not and then include lgsl_add.php or not depending on the result of the check. Something like this:
if (defined('IS_LOGGED')) { include('lgsl/lgsl_files/lgsl_add.php'); }
else { echo 'You can add servers after you login'; }

You will need to define the IS_LOGGED constant inside the login script, right before the redirect-in-case-of-success line.

It might be a good idea to insert a similar check at the beginning of lgsl_add.php too, just in case anyone ever tries to access it directly

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
enddDD
Sat Dec 08 2012, 05:01PM
Posts: 11
Joined: Wed Dec 05 2012, 04:22PM
Registered Member #7471
that was,thank you.i understand now.
enddDD
Tue Dec 18 2012, 04:25PM
Posts: 11
Joined: Wed Dec 05 2012, 04:22PM
Registered Member #7471
i managed somehow to resolve this,but now i am facing another problem.How to link every server that is added to the specific user.lets say user x added 2 servers.how to see that user x has added the two servers?i think it needs some database tables for this but i dont know exactly how to do it.
Wussie
Tue Dec 18 2012, 07:23PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
You could use the "Comment" field in the database to store the user ID, and then sort all the servers which were added by the same user, identified by that user ID.

Or you could add an extra field to the db just for that, but that would definitely be more complicated...

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
 

Jump:     Back to top


You are not logged in - Click Here To Signup

Username:    Password:   

Mini Buttons

.... © GreyCube.com - Richard Perry - Powered by e107.org