Previous Thread
Next Thread
Print Thread
Rate Thread
#102569 04/11/2001 10:46 PM
Joined: Apr 2001
Posts: 118
Member
Member
Offline
Joined: Apr 2001
Posts: 118
I am using a lot of Perl programs. I would like to be able to incorporate the UBB cookie into some of them so they can be accessed by members only. So when some one tries to access them, if they are not a member, they get redirected to UBB login screen for registration.
Is this feasible? Can someone give me a pointer, please?
I started by placing all the required files with their paths. I do not know if that will be sufficient just to include the UBB login routine (don't even know what it is) or if I should dig in a book and learn to write subroutines?

Sponsored Links
#102570 04/11/2001 10:57 PM
Joined: Dec 2000
Posts: 595
Member
Member
Offline
Joined: Dec 2000
Posts: 595
i could use a help with this too. how do i know if the user is logged? if its not, how do i say this and tell him to log or register?

#102571 04/11/2001 11:14 PM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
You should have a look at the CGI.pm website to see about how to use cookies.

Once you have the general concepts, you can then look at how UBB is using it's cookies, and see how access works, whats being set etc.

--mark


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
#102572 04/11/2001 11:30 PM
Joined: Dec 2000
Posts: 595
Member
Member
Offline
Joined: Dec 2000
Posts: 595
why dont you tell us :***

#102573 04/11/2001 11:57 PM
Joined: Apr 2001
Posts: 118
Member
Member
Offline
Joined: Apr 2001
Posts: 118
Thanks Mark.

According to what I read, and comparing with login.cgi it seems to me that I would need at least half a page from ultimatebb.cgi, starting from

#use strict
use Fcntl ':flock';
use CGI::Carp qw(fatalsToBrowser carpout);
use CGI qw(:cgi-lib :standard);

all the way to:

if ($ubb eq 'login') {
&set_page_elements;
do "http://mysite.com/cgi-bin/page_I_want_to_call.cgi";
exit;
}

making sure that I replaced all those Vars with their full path.

meaning that If I place that subrouting at the beginning of the non UBB software.cgi, I'll be telling it to go to the UBB verification subroutine and if it passes, then execute the page.

Am I close?

Sponsored Links
#102574 04/12/2001 12:21 AM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
Quote
quote:
Because the only way to learn is to research and read. Ever heard of "give a man a fish...."?

Wants to Learn, sounds like you're on the right track, but I cannot say for sure as I have not looked at UBB code in quite some time, so I don't know specifics about it.

--mark


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
#102575 04/12/2001 12:43 AM
Joined: Dec 2000
Posts: 595
Member
Member
Offline
Joined: Dec 2000
Posts: 595
you are right, i was just kidding smile
thanks for the url btw

#102576 04/12/2001 1:05 AM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
smile


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan

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
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
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)