vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Skysa toolbar - Get user Id HELP!!!! (https://vborg.vbsupport.ru/showthread.php?t=235527)

TRa5H 02-10-2010 06:39 PM

Skysa toolbar - Get user Id HELP!!!!
 
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

Quote:

Originally Posted by TRa5H (Post 1979453)
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&i...79A301&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/showthrea...ighlight=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 [DATE]1265859165[/DATE] at [TIME]1265859165[/TIME] ---------------

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 [DATE]1265860093[/DATE] at [TIME]1265860093[/TIME] ---------------

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>


All times are GMT. The time now is 11:14 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00995 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete