Page Index Toggle Pages: 1
Topic Tools
Normal Topic Intergrating YaBB's Login System (Read 2,630 times)
Mr Tuffles
YaBB Newcomer
*
Offline



Posts: 3

None
Re: Intergrating YaBB's Login System
Reply #4 - Apr 24th, 2011 at 1:55am
Post Tools
I had to use this code, because the other one didn't work.
Code (PHP)
Select All
<?php
$username = $_REQUEST['Y2USER_CWU'];
$file = "http://www.cwuforum.com/cgi-bin/yabb2/members/".$username.".vars";
$lines = file($file);
foreach ($lines as $line_num => $line)
{
htmlspecialchars($line) . "<br />\n";
$var = explode(",", $line);
$var[0] = eregi_replace("'", "", $var[0]);
$userinfo[$var[0]] = eregi_replace('"', '', $var[1]);
}
?>
<?php
	if (empty($username))
	echo ("Welcome Guest! ");
	if (empty($username))
	echo('<a href="http://cwuforum.com/cgi-bin/yabb2/YaBB.pl?action=register"><FONT COLOR="BLUE">Register</FONT></a>');
	if (empty($username))
	echo(" - ");
	if (empty($username))
	echo('<a href="http://cwuforum.com/cgi-bin/yabb2/YaBB.pl?action=login"><FONT COLOR="BLUE">Login</FONT></a>');
?>
<?
if (!empty($username))
echo ("Welcome, "); echo ($username); echo (" - ");
if (!empty($username))
echo('<a href="http://cwuforum.com/cgi-bin/yabb2/YaBB.pl?action=logout"><FONT COLOR="BLUE">Sign out</FONT></a>');
if (!empty($username))
echo (" ");
if (!empty($username))
echo('<a href="http://cwuforum.com/cgi-bin/yabb2/YaBB.pl"><FONT COLOR="BLUE">View Forum</FONT></a>');
?> 

  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Intergrating YaBB's Login System
Reply #3 - Apr 23rd, 2011 at 8:14pm
Post Tools
Quote:
This will work though it does not include FORM SESSION value ... You'll have to add hidden code value, which you can find by viewing source of your  forums login page.


Code (HTML)
Select All
<input type="hidden" name="formsession" value="5A7C677E3C4C626169206D6163497B6B7D7A0E0" /></form>
 

  
Back to top
 
IP Logged
 
Mr Tuffles
YaBB Newcomer
*
Offline



Posts: 3

None
Not Showing Logged in
Reply #2 - Apr 23rd, 2011 at 6:17pm
Post Tools
Quote:

I am having trouble with this it says welcome guest when I am logged in (cwuforum.com)
  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Intergrating YaBB's Login System
Reply #1 - Apr 23rd, 2011 at 3:11pm
Post Tools
  
Back to top
 
IP Logged
 
Mr Tuffles
YaBB Newcomer
*
Offline



Posts: 3

None
Intergrating YaBB's Login System
Apr 23rd, 2011 at 2:38pm
Post Tools
Is there a way I can use yabb's login system on my site. I don't want my  users to sign up twice.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top