Previous Thread
Next Thread
Print Thread
Rate Thread
#264548 12/13/2003 5:00 AM
Joined: Dec 2003
Posts: 9
Lurker
Lurker
Offline
Joined: Dec 2003
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.

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.

Thanks allot for any help you can offer.

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Since the login pal from IIP is based on Threads.

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.

Joined: Dec 2003
Posts: 9
Lurker
Lurker
Offline
Joined: Dec 2003
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.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
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.

Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

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.
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).

The parts I added were:
Code
<br />// set params for message board inclusions<br />$palspath = "<your path to the pals-dir goes here>";<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 -> authenticate("");<br /><br />$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");<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 = "<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>"; <br />}<br /><br />$html = new html;<br />list($tbopen,$tbclose) = $html -> table_wrapper();<br />


You can then just add in the parts of IIP you want by calling them like this:
Code
<br />	include "{$palspath}/pals/shortstatspal.php";<br />


Sanuk!

Sponsored Links
Joined: Dec 2003
Posts: 9
Lurker
Lurker
Offline
Joined: Dec 2003
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.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Yep you format the html to your needs.

Joined: Dec 2003
Posts: 9
Lurker
Lurker
Offline
Joined: Dec 2003
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?

Joined: Dec 2003
Posts: 9
Lurker
Lurker
Offline
Joined: Dec 2003
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™ or cookies must be set site wide for this page to validate visitor access.</blockquote>"; }$html = new html;list($tbopen,$tbclose) = $html -> table_wrapper();

//////////////////////////////////////////

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.

Joined: Dec 2003
Posts: 9
Lurker
Lurker
Offline
Joined: Dec 2003
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.

Sponsored Links
Joined: Jun 2003
Posts: 1,025
Junior Member
Junior Member
Offline
Joined: Jun 2003
Posts: 1,025
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.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)