|
|
Joined: Apr 2001
Posts: 118
Member
|
Member
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?
|
|
|
|
Joined: Dec 2000
Posts: 595
Member
|
Member
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?
|
|
|
|
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
|
P.I.T.A. / Programmer
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
|
|
|
|
Joined: Dec 2000
Posts: 595
Member
|
Member
Joined: Dec 2000
Posts: 595 |
why dont you tell us :***
|
|
|
|
Joined: Apr 2001
Posts: 118
Member
|
Member
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?
|
|
|
|
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
|
P.I.T.A. / Programmer
Joined: Sep 2000
Posts: 755 |
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
|
|
|
|
Joined: Dec 2000
Posts: 595
Member
|
Member
Joined: Dec 2000
Posts: 595 |
you are right, i was just kidding thanks for the url btw
|
|
|
|
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
|
P.I.T.A. / Programmer
Joined: Sep 2000
Posts: 755 |
"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
|
|
|
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.
|
|
Posts: 449
Joined: February 2008
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|