|
Joined: May 2001
Posts: 1,042 Likes: 7
Moderator
|
Moderator
Joined: May 2001
Posts: 1,042 Likes: 7 |
EDIT: Kinda of a lost cause to write it in cgi, when javascript should be used. If you want a php version, try this:
|
|
|
|
Joined: Aug 2001
Posts: 155
Member
|
Member
Joined: Aug 2001
Posts: 155 |
https://ubbdev.com/ubb/ultimatebb.php?ubb=get_topic;f=12;t=000062 !!!
Plz help us! lol. We're trying to use cookies there, though I had oringally tried doing something like you did but didn't have a clue what i was doing.
I'm not really back. I went away again.
|
|
|
|
Joined: May 2001
Posts: 1,042 Likes: 7
Moderator
|
Moderator
Joined: May 2001
Posts: 1,042 Likes: 7 |
If i can get this to work right, it'll do it for you. My sites written in php also, so when i get it right i'll tell you.
With this, you'll need to exploit it when it's done.
|
|
|
|
Joined: Aug 2001
Posts: 155
Member
|
Member
Joined: Aug 2001
Posts: 155 |
OK, hope someone helps you get it figured out soon.
I'm not really back. I went away again.
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
It's in JavaScript, so it has nothing to do with PHP/CGI/whatever...
Use:
BUT, don't forget to change $vars_config{CGIURL}, the Wordlets and ofcourse $vars_config{Cookie_Number}. The best thing to do is execute the CGI file, choose to View Source and copy & paste the JS code.
Don't forget it has to be on the same domain.
|
|
|
|
Joined: Aug 2001
Posts: 155
Member
|
Member
Joined: Aug 2001
Posts: 155 |
http://4x4c.racesim.net/index2.php Thought of before, tried it, all I get is a script error. It's supposed to show up in the cell next to the ubb my profile search etc. links, but nothing's there.
I'm not really back. I went away again.
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
|
|
|
|
Joined: Aug 2001
Posts: 155
Member
|
Member
Joined: Aug 2001
Posts: 155 |
Hmm, shows up now. But still some probs. Even if you're logged in on the forum, it shows you as not logged in on the main page. I click Log In on the main page, log in, then if i click back it still says logged out.
However if I type in the address for the page and go there instead of hitting back it shows me logged in.
Also, if I leave the site and come back I'm logged out again. Gotta be a cookie prob somewhere... I dunno.
Noticed this a while ago too.. If I click the my profile link on the main page it says I'm not logged in.. argh
[ 11-30-2001 06:10 PM: Message edited by: GTSDurango ]
I'm not really back. I went away again.
|
|
|
|
Joined: Aug 2001
Posts: 155
Member
|
Member
Joined: Aug 2001
Posts: 155 |
Welp that worked Thanx LK. Now, onto why Latest Topics won't show up and Who's Online says "Guest - ..." instead of "GTSDurango - ..." [ 12-01-2001 02:18 AM: Message edited by: GTSDurango ]
I'm not really back. I went away again.
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
What do you mean, Latest Topics won't show up?
|
|
|
|
Joined: Aug 2001
Posts: 155
Member
|
Member
Joined: Aug 2001
Posts: 155 |
On index2.php, they call isn't calling them They were working, then I did something and broke it. I dunno, I'll keep fiddling with it.
I'm not really back. I went away again.
|
|
|
|
Joined: Feb 2001
Posts: 166
Spotlight Winner
|
Spotlight Winner
Joined: Feb 2001
Posts: 166 |
Hmmm...I tried all of this and nothing's showing up on my site. I have a test page up at: http://www.vhtrading.com/vht4/index.shtml ..and the output should be appearing before the word "test" before the large "What's New" header. I know it's not a domain prob, because I am using the exact same path for three other SSI's on the same page. LK, is your second JavaScript example supposed to go with the cgi file itself? I tried that, and obviously it doesn't work Didn't Skorpion/Jamin (or somebody else) have a login/username script on their non-UBB homepage at one time? If I'm remembering correctly, does anybody still have a copy of that script? Thanks.
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
WDFA, I can't see it in the source
|
|
|
|
Joined: Feb 2001
Posts: 166
Spotlight Winner
|
Spotlight Winner
Joined: Feb 2001
Posts: 166 |
Of course you can't see it in the source, it's already "executed". And like I said, the "showname.cgi" is called the exact same way that my other SSI's are called and the other ones work. LK, would you like for me to e-mail you the source code so's you can see it?
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
I mean I can't see the JavaScript code. Are you sure you printed the header + this code?
|
|
|
|
Joined: Feb 2001
Posts: 166
Spotlight Winner
|
Spotlight Winner
Joined: Feb 2001
Posts: 166 |
Ah, that's one thing I didn't do.
|
|
|
|
Joined: Feb 2001
Posts: 166
Spotlight Winner
|
Spotlight Winner
Joined: Feb 2001
Posts: 166 |
Okay, I've added the JS to the header, but the SSi still doesn't show up (again, right before the word "test" above the "What's New" Header): http://www.vhtrading.com/vht4/index.shtml
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
The javascript thing is there, but where does it call it?
|
|
|
|
Joined: Feb 2001
Posts: 166
Spotlight Winner
|
Spotlight Winner
Joined: Feb 2001
Posts: 166 |
quote: Originally posted by LK: The javascript thing is there, but where does it call it? :rolleyes:
Not sure what you're referring to, but now I'm getting an "object expected" error on the page.
|
|
|
|
Joined: Feb 2001
Posts: 166
Spotlight Winner
|
Spotlight Winner
Joined: Feb 2001
Posts: 166 |
Well, before this topic slips down into tne netherworld of never-responded-to-ever-again posts , let me add that the "showname.cgi" script itself is not working on my site: http://www.vhtrading.com/cgi-bin/showname.cgi I assume that before the SSI can work, the cgi file itself must be functional . I doubt if it's a permissions issue, because I've tried chmod-ing the file to 775, 777, etc. and it's not working. Somethin' else must be causing the 500 Error [ 12-24-2001 12:46 PM: Message edited by: WDFA ]
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
You didn't print the header, probably. Take a look at the error log
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
any progress on this in the last 7 months?
|
|
|
|
Joined: Jul 2002
Posts: 1
Junior Member
|
Junior Member
Joined: Jul 2002
Posts: 1 |
Not working for me... PHP 4.0.6 ($_COOKIE[] is unsupported in this version) $dir_to_noncgi = "../ubb"; require "$dir_to_noncgi/vars_config.inc.php"; global $Cookie_Number, $CGIURL; $my_cookie = $HTTP_COOKIE_VARS['ubber'.$Cookie_Number]; $my_ubb = "$CGIURL/ultimatebb.cgi"; if ($my_cookie) { $take_me_apart = explode("&", $my_cookie); $username = $take_me_apart["2"]; echo "Hello $username! [ <a href="$my_ubb?ubb=logout">Logout</a> ]"; } else { echo "You are not logged in [ <a href="" . $my_ubb . "?ubb=login">Login</a> or <a href="" . $my_ubb . "?ubb=agree">Register</a> ]"; }
The javascript version works, but I need the PHP version to work because I need to know whether they're logged in BEFORE they can view the page (security reasons.) Thanks for any help
|
|
|
|
Joined: May 2001
Posts: 1,042 Likes: 7
Moderator
|
Moderator
Joined: May 2001
Posts: 1,042 Likes: 7 |
Well, you can do this
[code][/code]
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
hmmmm... I am doing it a bit differently. I want to create a table on the front index.php that gives them the: Hello Username [ Logout ] If they are logged in. If they aren't logged in, I want to give them a login box. That part is easy, except that it's never recognizing me as being logged in. You can see the results on the front page here, lower right hand corner. Here's my code: <? // Name: Name on front page by raiyan // Description: Grabs your ubb name and prints it // change this!!! $dir_to_noncgi = "/home/virtual/admin35/var/www/html/ubb"; // change this!!! require "$dir_to_noncgi/vars_config.inc.php"; global $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $Cookie_Number, $CGIURL; $my_cookie = $_COOKIE["ubber$Cookie_Number"]; $my_ubb = "$CGIURL/ultimatebb.cgi"; if ($my_cookie) { $cookie = explode("&", $my_cookie); echo "Hello $cookie[2]! [ <a href="$my_ubb?ubb=logout">Logout</a> ]"; } else { echo "<form action="$CGIURL/ultimatebb.cgi" method="post"> <input type="hidden" name="ubb" value="do_login" /> Login Name: <input type="text" name="username" size="15" maxlength="40" />
Password: <input type="password" name="password" size="15" maxlength="30" />
<input type="submit" name="submit" value="Login" /></form>"; } ?> Any ideas why it's not recognizing me as being logged in?
|
|
|
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: 87
Joined: December 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|