PDA

View Full Version : Skysa toolbar - Get user Id HELP!!!!


TRa5H
02-10-2010, 06:39 PM
Ok so I am currently trying to integrate a toolbar into my site.

I have the bar installed and I would like the bar to automatically aquire the user name and profile information so that when you are logged in you can message other people like through CometChat..

The toolbar is from www.Skysa.com and they have provided me with the following code, my problem is finding the Msql information within to code out the needed areas:

<script type="text/javascript">
var _SKYAUTH = {
loginUrl:'REPLACE WITH FULL LOGIN URL',
memberNick:'REPLACE WITH CONTEXT CODE TO GET MEMBER USER NAME',
memberId:'REPLACE WITH CONTEXT CODE TO GET MEMBER ID',
profileUrl:'REPLACE WITH MEMBER PROFILE URL',
photoUrl:'REPLACE WITH MEMBER PHOTO URL'
};
</script>




Ok so I thought this might be the info i needed yet nothing has worked yet




<script type="text/javascript">
var _SKYAUTH = {
loginUrl:'forum/login.php?do=login',
memberNick:'$bbuserinfo[username]',
memberId:'$bbuserinfo[userid]',
profileUrl:'$bbuserinfo[homepage]',
photoUrl:'$bbuserinfo[signature]'
};
</script>



could someone please let me know what I am doing wrong?:eek::confused:

White_Snake
02-10-2010, 07:05 PM
im not sure about how to mix JS and php, but, where is this exactly located? and have you tried $vbulletin->userinfo[userid] instead of $bbuserinfo[userid]?

TRa5H
02-10-2010, 08:37 PM
not yet I am not too familiar with the variables myself.. I just need to know how to

Get login
Get UserId
Get Nickname
Get UserProfile
Get UserProfilePicture

I dont know what code I would write to retrieve this information

if you could help I would very much appreciate it!

Iwill try the code you left though.. thanks

White_Snake
02-10-2010, 08:41 PM
not yet I am not too familiar with the variables myself.. I just need to know how to

Get login
Get UserId
Get Nickname
Get UserProfile
Get UserProfilePicture

I dont know what code I would write to retrieve this information

if you could help I would very much appreciate it!

Iwill try the code you left though.. thanks

exactly where are you pasting this code? inside a file? in a plugin? in a template?

TRa5H
02-10-2010, 08:50 PM
Well I am putting into the footer of the template in which once I figure out the call for this information I will attempt to edit the following Template to work with the Skysa toolbar instead of the Wibya toolbar others are using..

I want to have the Skysa Toolbar grab the logged in user information so instead of the users having to log into the site and then the bar when they log into the site the bar will automatically log them in like on Facebook.

The Code I am getting for the bar is from the Skysa site which is as follows..

This part adds the bar to the site:

<script type="text/javascript" src="http://static2.skysa.com?i=98F375C1-1DBC-46A8-AAFC-A96FC8A8EA96"></script>


This part is used to change the autolog information provided by the Skyse developers team: (found here at this link :http://skysa.com/forums/?page=post&id=A8D63165-B5C1-493A-AF16-A2C67570AEBE&fid=A0706DE6-4121-4904-8C09-6FFBB979A301&lastp=1)


<script type="text/javascript">
var _SKYAUTH = {
loginUrl:'REPLACE WITH FULL LOGIN URL',
memberNick:'REPLACE WITH CONTEXT CODE TO GET MEMBER USER NAME',
memberId:'REPLACE WITH CONTEXT CODE TO GET MEMBER ID',
profileUrl:'REPLACE WITH MEMBER PROFILE URL',
photoUrl:'REPLACE WITH MEMBER PHOTO URL'
};
</script>



Now this is what I have changed with your help but it still is not working so I don't know what to do with it?:

<script type="text/javascript">
var _SKYAUTH = {
loginUrl:'http://www.weltmuzik.com/forum/login.php?do=login',
memberNick:'$vbulletin->userinfo[username]',
memberId:'$vbulletin->userinfo[userid]',
profileUrl:'$vbulletin->userinfo[homepage]',
photoUrl:'$vbulletin->userinfo[signature]'
};
</script>



The hack that I am going to edit for product upload is this one here:(https://vborg.vbsupport.ru/showthread.php?t=224709&highlight=wibya)


I hope that sums it up... you can see the bar at my site www.weltmuzik.com/forum

Thanks for the help!

White_Snake
02-10-2010, 09:22 PM
well apparently you were right the first time, using $bbuserinfo['userid'] works on templates, i tought you were using a separate file, anyway, try to use $bbuserinfo again

TRa5H
02-11-2010, 12:57 AM
Lol ok so I just logged in with multiple nams.. and it seems that it is adding the user who is logged into the site.. but i need to figure out how to have it auto log on when user logs into site because it is still wanting the member to click sign on ...

So yes it is

<script type="text/javascript">
var _SKYAUTH = {
loginUrl:'forum/login.php?do=login',
memberNick:'$bbuserinfo[username]',
memberId:'$bbuserinfo[userid]',
profileUrl:'$bbuserinfo[homepage]',
photoUrl:'$bbuserinfo[signature]'
};
</script>

but I think it is not registering the rest of the info just the user Nickname and UserId...

I will keep working on it and when I figure it out completely I write a Product and distribute for the community.. thanks for the help!

--------------- Added 1265859165 at 1265859165 ---------------

Well I figured out most of what I needed...

The only problem I am having now is the Autologin...

it still wants the user to click login on the bar even when they are already logged into the forum.. the code below is the working code so far:


<script type="text/javascript">
var _SKYAUTH = {
loginUrl:'http://www.weltmuzik.com/forum/login.php?do=login',
memberNick:'$bbuserinfo[username]',
memberId:'$bbuserinfo[userid]',
profileUrl:'http://www.weltmuzik.com/forum/member.php?u=$bbuserinfo[userid]',
photoUrl:'http://www.weltmuzik.com/forum/image.php?u=$bbuserinfo[userid]'
};
</script>

So yes everything works but the auto Login... still confused why it will not log you in unless you click "Go Online" on the toolbar?

getting close to my goal thanks!:D:confused:

--------------- Added 1265860093 at 1265860093 ---------------

Well I completed the Auto Login ...

The following is the complete code that works:

<script type="text/javascript">
var _SKYAUTH = {
loginUrl:'http://www.YOURSITE.com/forum/login.php?u=$bbuserinfo[userid]',
memberNick:'$bbuserinfo[username]',
memberId:'$bbuserinfo[userid]',
profileUrl:'http://www.YOURSITE.com/forum/member.php?u=$bbuserinfo[userid]',
photoUrl:'http://www.YOURSITE.com/forum/image.php?u=$bbuserinfo[userid]'
};
</script>