php forum
php mysql forum
php mysql smarty
 
Topic Options
#264548 - 12/13/03 04:00 AM A Generic Login Script
Hotwire Offline
Lurker

Registered: 12/10/03
Posts: 9
Hello im just new to Threads, UBB at all infact. I was wondering if any one can help me with a little issue. Im looking for a script that i can include on my front page that will allow site members to login/logout.<br /><br />If they are already logged in the script displays there info instead of the login info. I plan on using this to authenticate my entire website, But dont want to use the IIP.<br /><br />Thanks allot for any help you can offer.
_________________________
Hercules IT, www.hercules-it.net (Under Construction)

Top
#264549 - 12/13/03 06:12 AM Re: A Generic Login Script [Re: Cpher]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Since the login pal from IIP is based on Threads. <br /> <br />You could write up a little script based on the login script function of login.php from threads. Althought the easiest thing might be to cosmetically change IIP's loginpal to suit your needs.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#264550 - 12/13/03 06:31 AM Re: A Generic Login Script [Re: sf49rminer]
Hotwire Offline
Lurker

Registered: 12/10/03
Posts: 9
yeah i was thinking about that but my index page is already finished, ill just have to do some coding and haxing myself to see what i can come up with. thanks.
_________________________
Hercules IT, www.hercules-it.net (Under Construction)

Top
#264551 - 12/13/03 07:14 AM Re: A Generic Login Script [Re: Cpher]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Well the login pal could be coded as a standalone application to a degree. There are certain variables you would need to add to the page to make it work but may be the easiest way to go.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#264552 - 12/13/03 10:06 PM Re: A Generic Login Script [Re: sf49rminer]
ksanuk Offline
Member

Registered: 02/06/02
Posts: 297
Loc: Bangkok, Thailand
Hi,<br /><br />I think we did pretty much this. We have an index page for the site and on it wished to display certain parts of the IIP.<br />What I did was install the IIP, then copy bits and pieces of the code to our own index page, which seemed to work quite well (make certain the paths are correct though).<br /><br />The parts I added were:<br />
Code:
<br />// set params for message board inclusions<br />$palspath = "&lt;your path to the pals-dir goes here&gt;";<br />include "{$palspath}/main.inc.php";<br />include "{$palspath}/pals/languages/${$config['cookieprefix']."w3t_language"}/languagepal.php";<br />@include "{$palspath}/pals/configpal.php";<br /><br />// authenticate visitor<br />$userob = new user;<br />$user = $userob -&gt; authenticate("");<br /><br />$user = $userob -&gt; authenticate("U_Username,U_PicturePosts,U_ShowSigs,U_Email,U_PictureView,U_Status,U_Privates,U_Name,U_Title,U_Totalposts,U_Visible, U_Laston,U_Language,U_TimeOffset,U_Groups,U_Picture,U_Number");<br />list($palUusername,$palPicturePosts,$palShowSigs,$palEmail,$palPictureView,$palStatus,$palPrivates,$palRealName,$palUsertitle,$palTotalUposts,$palUVisible, $laston,$ubbt_language,$offset,$groups,$picture,$Uid,$CheckUser,$pass,$sessionid,$stylesheet,$status,$privates,$frontpage) = $user;<br /><br />if ($config['cookiepath'] == "") {<br />	$CookieNotice = "&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;strong&gt;Admins please note:&lt;/strong&gt; The cookie path is not set site wide. This page must reside in the same directory as UBB.threads&amp;trade; or cookies must be set site wide for this page to validate visitor access.&lt;/blockquote&gt;"; <br />}<br /><br />$html = new html;<br />list($tbopen,$tbclose) = $html -&gt; table_wrapper();<br />
<br /><br />You can then just add in the parts of IIP you want by calling them like this:<br />
Code:
<br />	include "{$palspath}/pals/shortstatspal.php";<br />
<br /><br />Sanuk!

Top
#264553 - 12/14/03 09:04 AM Re: A Generic Login Script [Re: Deyth_Combine]
Hotwire Offline
Lurker

Registered: 12/10/03
Posts: 9
thanks, Ill do that, What about formating the look of the include, they use templates right? guess i could just edit that to fit my needs too right? Cool. Thanks again. Please let me know if i am correct.
_________________________
Hercules IT, www.hercules-it.net (Under Construction)

Top
#264554 - 12/14/03 09:19 AM Re: A Generic Login Script [Re: Cpher]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Yep you format the html to your needs.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#264555 - 12/15/03 02:22 AM Re: A Generic Login Script [Re: sf49rminer]
Hotwire Offline
Lurker

Registered: 12/10/03
Posts: 9
thanks again. that was Great. One more question though, I can just leave out the link to the enterance that we have to add to the language files right? that will leave it off of the forums so that its not available?
_________________________
Hercules IT, www.hercules-it.net (Under Construction)

Top
#264556 - 12/15/03 07:40 AM Re: A Generic Login Script [Re: Cpher]
Hotwire Offline
Lurker

Registered: 12/10/03
Posts: 9
// set params for message board inclusions$palspath = "<your path to the pals-dir goes here>";include "{$palspath}/main.inc.php";include "{$palspath}/pals/languages/${$config['cookieprefix']."w3t_language"}/languagepal.php";@include "{$palspath}/pals/configpal.php";// authenticate visitor$userob = new user;$user = $userob -> authenticate("");$user = $userob -> authenticate("U_Username,U_PicturePosts,U_ShowSigs,U_Email,U_PictureView,U_Status,U_Privates,U_Name,U_Title,U_Totalposts,U_Visible, U_Laston,U_Language,U_TimeOffset,U_Groups,U_Picture,U_Number");list($palUusername,$palPicturePosts,$palShowSigs,$palEmail,$palPictureView,$palStatus,$palPrivates,$palRealName,$palUsertitle,$palTotalUposts,$palUVisible, $laston,$ubbt_language,$offset,$groups,$picture,$Uid,$CheckUser,$pass,$sessionid,$stylesheet,$status,$privates,$frontpage) = $user;if ($config['cookiepath'] == "") { $CookieNotice = "<br /><br /><blockquote><strong>Admins please note:</strong> The cookie path is not set site wide. This page must reside in the same directory as UBB.threads&trade; or cookies must be set site wide for this page to validate visitor access.</blockquote>"; }$html = new html;list($tbopen,$tbclose) = $html -> table_wrapper();<br /><br />//////////////////////////////////////////<br /><br />Is that all you added? and where abouts did you add it, I tried it in my current require file, I guess i could just add it to my current index page. let me know if you have any ideas. Thanks again and sorry to bother you with these questions.
_________________________
Hercules IT, www.hercules-it.net (Under Construction)

Top
#264557 - 12/15/03 07:56 AM Re: A Generic Login Script [Re: Cpher]
Hotwire Offline
Lurker

Registered: 12/10/03
Posts: 9
Never Mind, I got it thanks for the help, Now i just have to get it to re-direct back to the front page, instead of the home of the user that had logged in. Thanks.
_________________________
Hercules IT, www.hercules-it.net (Under Construction)

Top
#264558 - 12/15/03 03:58 PM Re: A Generic Login Script [Re: Cpher]
slayer60 Offline
Junior Member

Registered: 06/14/03
Posts: 1185
Loc: New Boston, NH
My Home or Main Index is a user preference for logging in set in the "Display preferences, number of shown threads, languages, colors...". So you will probally need to run a querry to update your users preference if you want them to go to the main index. If you don't want them to be able to choose you will need to comment out that option. I believe it will be in editdisplay.php, the language file editdisplay.php or editdisplay.tmpl. I'm not sure which.

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks