PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
SoulflyZ
New Member
New Member


Joined: May 02, 2004
Posts: 8

PostPosted: Sun May 02, 2004 10:50 am Reply with quote Back to top

Hi, I am running a PHPBB forum message board (non-nuke) and I am trying to implement this quote system. Is it possible to setup the login for the portfolio to correspond with the login for the forums? So that each registered user for the forums can be automatically logged into their portfolio.
If it can't be done this way could you please explain how to setup a login system for the portfolios? I didn't understand how to use the $username function mentioned in the comments.
Thank you.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Sun May 02, 2004 11:25 am Reply with quote Back to top

Whatever login system you use, KISSQ [ultimately] uses the $username to identify a username that is logged in. So, just as it detects if it's standard, phpnuke, or postnuke, you will need to add code to detect phpbb. If you would like a quotation from me to do the work for you, let me know.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
SoulflyZ
New Member
New Member


Joined: May 02, 2004
Posts: 8

PostPosted: Mon May 03, 2004 2:38 pm Reply with quote Back to top

Thank you for your help.
I was able to figure out how to get it to reconize the correct username, but I don't have the Delete and update functions. Nor will it store values other than the stock name.
View user's profile Send private message
SoulflyZ
New Member
New Member


Joined: May 02, 2004
Posts: 8

PostPosted: Thu May 06, 2004 5:41 pm Reply with quote Back to top

Does anyone know why I don't have the functions?
View user's profile Send private message
upennballer
New Member
New Member


Joined: Jun 10, 2004
Posts: 16

PostPosted: Wed Jul 14, 2004 12:27 am Reply with quote Back to top

Fix for standalone maybe.

I am not much of a coder. but i was trying to implement this standalone version and it wouldnt read the shares or price. I found that it isnt even searching for that when it goes to read the sql so i added

$uArray[] = $row->Symbol.':'.$row->pDate.':'.$row->nShares.':'.$row->pPrice.':'.$row->fees.':'.$row->uniqueid.":~";

after

$symbols[] = $row->Symbol;

Should now look like


elseif ($isStd) {
$dbi = mysql_connect($stdHost, $stdUser, $stdPasswd) or die($err_msg);
mysql_select_db($stdDB, $dbi);
$result = mysql_query($query, $dbi) or die($err_msg);;
if ($result && (mysql_num_rows($result) > 0)) {
while ($row=mysql_fetch_object($result,1)) {
if (empty($row->Symbol)) continue;
$symbols[] = $row->Symbol;
$uArray[] = $row->Symbol.':'.$row->pDate.':'.$row->nShares.':'.$row->pPrice.':'.$row->fees.':'.$row->uniqueid.":~";

}
}
}


or something like that...
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Wed Jul 14, 2004 7:02 am Reply with quote Back to top

Embarassed You are exactly correct! It appears that not too many are using KISSQ as a standalone, membership, application, so this part had never been tested [thoroughly at least]. Thanks so much for the head's up and I will get an update out ASAP.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
upennballer
New Member
New Member


Joined: Jun 10, 2004
Posts: 16

PostPosted: Wed Jul 14, 2004 11:12 am Reply with quote Back to top

yeah pretty much no one could have been since it wouldnt work without that line. LOL. That is okay. It is a great script and i am going to try and change it around so that i can make it into a stock competition script. Where a person gets a certain amount of money to spend to purchase stocks and so forth. Dont know if you remember me trying to make a stock ticker. Well i figured it out!
Only registered users can see links on this board!
Get registered or login to the forums!
is the site that i am developing both of the ideas on. Ticker is going to be customized to read the portfolio symbols and all that jazz.

Just wanted to thank you because by messing around with your script it has allowed me to learn php and all its great uses.

Thanks!
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Wed Jul 14, 2004 11:43 am Reply with quote Back to top

If you wouldn't mind me packaging your ticker code, I would love to add that in. Let me know if you're interested in fame and fortune Laughing. Thanks.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
upennballer
New Member
New Member


Joined: Jun 10, 2004
Posts: 16

PostPosted: Wed Jul 14, 2004 12:17 pm Reply with quote Back to top

Sure. I should finish it hopefully tonight. Then you can give me your thoughts and suggestions and i can improve it if need be.
View user's profile Send private message
SoulflyZ
New Member
New Member


Joined: May 02, 2004
Posts: 8

PostPosted: Thu Jul 15, 2004 8:34 am Reply with quote Back to top

Thanks for your reply, I thought I was forgotten!
I implemented the change you suggest and the functions now appear when a stock in your portfolio is selected. BUT, I can not add shares,price,etc..
The update portfolio has no effect and the delete from portfolio function returns an error stating "ERROR while deleting record."

I have completely started over to insure I didn't change something accidentally, so it is barely changed and I still have the same problem. If you would like to check out the script I have it here:
Only registered users can see links on this board!
Get registered or login to the forums!

Any suggestions?
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Thu Jul 15, 2004 8:43 am Reply with quote Back to top

Have you implemented a User registration system and integrated it with kissq? As stated in the docs, you have to have a way to 'sign in' or the system doesn't know where to write to. That's why you can't add.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
SoulflyZ
New Member
New Member


Joined: May 02, 2004
Posts: 8

PostPosted: Fri Jul 16, 2004 2:22 pm Reply with quote Back to top

When a user logs in under the PHPBB forums and visits the "stock page" the message comes up that says "Your portfolio settings will be saved under your username of (Whatever user). The individual usernames and stocks are added to the kissq database, just not anything else.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Fri Jul 16, 2004 3:03 pm Reply with quote Back to top

As long as you have written a rountine to pass the username to $username in KISSQ, it should work. I have tested it here and it seems to work.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
SoulflyZ
New Member
New Member


Joined: May 02, 2004
Posts: 8

PostPosted: Sat Jul 17, 2004 8:45 am Reply with quote Back to top

You tried the code as I have it? Shocked
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Sat Jul 17, 2004 8:49 am Reply with quote Back to top

No. What I am telling you is that if you have passed a valid username to the kissq script
Code:
// Determine username from the system
if (!$isStd) {
   cookiedecode($user);
   $username = $cookie[1];
}
if (!isset($username)) $username = "";
then it works. As you see here, it is expecting it in the form of a cookie. If you are passing it in any other way then you need to write your own code.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
SoulflyZ
New Member
New Member


Joined: May 02, 2004
Posts: 8

PostPosted: Sat Jul 17, 2004 11:58 am Reply with quote Back to top

Then I'm out of ideas. Confused
I just don't understand how it can recognize the username, save it to the database and still not be "logged in".
This is the code that i'm using to login:
$username = ($userdata['session_logged_in']) ? $userdata['username'] : '' ;
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14946
Location: Kansas

PostPosted: Sat Jul 17, 2004 12:22 pm Reply with quote Back to top

Make sure that $isStd = TRUE. Then, alter your statement to read
echo $username = ($userdata['session_logged_in']) ? $userdata['username'] : '' ;
to see what the value of $username is.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
SoulflyZ
New Member
New Member


Joined: May 02, 2004
Posts: 8

PostPosted: Sat Jul 17, 2004 5:20 pm Reply with quote Back to top

$isStd = TRUE
The value of $username is correct, it shows up on the page twice now.
View user's profile Send private message
upennballer
New Member
New Member


Joined: Jun 10, 2004
Posts: 16

PostPosted: Tue Jul 27, 2004 1:06 pm Reply with quote Back to top

Dont know if this helps. I use this function:

function checkLogin(){
/* Check if user has been remembered */
if(isset($_COOKIE['cookname']) && isset($_COOKIE['cookpass'])){
$_SESSION['username'] = $_COOKIE['cookname'];
$_SESSION['password'] = $_COOKIE['cookpass'];
}

/* Username and password have been set */
if(isset($_SESSION['username']) && isset($_SESSION['password'])){
/* Confirm that username and password are valid */
if(confirmUser($_SESSION['username'], $_SESSION['password']) != 0){
/* Variables are incorrect, user not logged in */
unset($_SESSION['username']);
unset($_SESSION['password']);
return false;
}
return true;
}
/* User not logged in */
else{
return false;
}
}


This is the cookie that i create when i have people login:
if(isset($_POST['remember'])){
setcookie("cookname", $_SESSION['username'], time()+60*60*24*100, "/");
setcookie("cookpass", $_SESSION['password'], time()+60*60*24*100, "/");
setcookie("cookemail", $_SESSION['email'], time()+60*60*24*100, "/");

}


So it reads the cookie and sets that as the session username which is then used by my portfolio and ticker scripts.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum