UBB.Dev
Posted By: GoodGuy Integrating UBB Login With Website - 02/16/2002 1:44 AM
I am bringing this question from InfoPop\'s UBB Support Forum to get modification help for the Perl script in the "ultimatebb.cgi" file.

My question has been asked before on this board, in the Archives however, I am taking the question further and wanting help with modifying the Perl script. My question digs deeper into making a modification to the "ultimatebb.cgi" file.

Thank you Charles or whomever, if you can tweak the code for me.

UBB uses an HTML login form which caries a value in the hidden input field, named "refer". The value is the URL of the page where a user clicked on the Login link, so that when the user loggs in, they are returned to the page they were looking at when they discovered they needed to login. This function is only available inside UBB, but I would like to make it availabe outside the UBB to use anywhere on the website. In other words, I would like to return users to the static web page where they entered their login name.

I intend to apply the URL of the page, which a user is viewing, to the form's "refer" value using JavaScript or an SSI tag. However I need the UBB script to handle this request without dumping the user at the front door of the UBB.

Below is the section of Perl code that handles the login of users.

[code][/code]Thanks in advance for helping me with this hack.

GoodGuy
David Longhurst
Posted By: GoodGuy Re: Integrating UBB Login With Website - 02/22/2002 4:25 AM
So, what does one need to do to get some help in doing a hack? My attempts so far have failed me on this hack. Can anyone give me a pointer?
Posted By: Corona Re: Integrating UBB Login With Website - 02/27/2002 6:11 AM
A hack i wrote detaches the login. You can dig through it to see how its done if you wish. The name of the hack is 'application forms v2.0.1'. Examine the included text file for a routine named 'login_application'. I wrote a parallel do_login routine to display the transition page the way i wanted it to appear without altering the existing sites login routines.

the solution to your problem, can easily be done by creating a form field that includes a value for the variable refer. i believe you can even hardcode the refer variable to a simple full url address.

example:







try replacing $ENV{'HTTP_REFERER'} with the site you want to forward to. such as: http://yourdomain.com/whereto.html
© UBB.Developers