Topic-icon kunena profile integration

Active Subscriptions:

None
14 years 4 weeks ago #22491 by hoisau
Replied by hoisau on topic kunena profile integration
so the solution to this issue will be for JFBConnect to pull just the facebook user name instead of the whole facebook profile link. (what if the user just has a profile ID number?)

or

have kunena not pre-fill "www.facebook.com/" in the facebook icon link.

anyone gone either of these approaches?
The topic has been locked.
Support Specialist
14 years 4 weeks ago #22522 by alzander
Replied by alzander on topic kunena profile integration
Hoi,
Thanks for pointing out that issue. The below code should fix ou up. It hasn't been tested, but it basically does what you're saying by stripping the URL returned from Facebook...

In the /plugins/jfbcprofiles/kunenea/kunenea.php file, around line 106, you'll see:
switch ($fieldId)
{
    case "birthdate";
Add the following code directly above the case "birthday" bit, so it looks like:
switch ($fieldId)
{
    case "FACEBOOK":
       $value = str_replace('http://www.facebook.com/', '', $value);
       $value = str_replace('https://www.facebook.com/', '', $value);
       $break;
    case "birthdate";
That will remove both http and https. Not sure if Facebook returns the https version, but best to try and remove it either way.

Hope that helps, and let us know how that goes!
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 4 weeks ago #22537 by hoisau
Replied by hoisau on topic kunena profile integration
it works!
no $ sign before break;

thank you!
The topic has been locked.
Support Specialist
14 years 3 weeks ago #22666 by alzander
Replied by alzander on topic kunena profile integration
Glad to hear that got it going for you. We've added that as something to add to the next Kunena plugin release.

Good luck,
Alex
The topic has been locked.