× Joomla Facebook Connect support forum

Topic-icon FB link into Community Builder

Active Subscriptions:

None
13 years 10 months ago #24934 by Morpheus
Hi,
Im using JFBConnect 4.2.3.
I added a CB web address filed and tried to fill-in the user''s Facebook profile link into it.
Its almost working except I get a small typo in the link.
For example, instead of having:
http://http//www.facebook.com/profile.php?id=....
I get
http//http//www.facebook.com/profile.php?id= (missing ":" after http)

Note: the problem is not in the text which looks ok, but in the link it points to.

Any idea how to solve this?
The topic has been locked.
Active Subscriptions:

None
13 years 10 months ago #25006 by Morpheus
Anyone?
The topic has been locked.
Support Specialist
13 years 10 months ago #25018 by alzander
Sorry, haven't yet looked into it. It's on our to-do list, but won't be taken care of until the v4.2.4 bug-fix (and minor feature) release due out in the next few days.

We'll let you know what we find, and hopefully, it should be an easy fix.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 10 months ago #25062 by Morpheus
Can you give me a hint where to look for it? which file?
I might have time to try and solve it and i'll share the fix if I will find it
Might be a minor bug...
Thanks
The topic has been locked.
Support Specialist
13 years 10 months ago #25066 by alzander
In the /plugins/jfbcprofiles/communitybuilder.php file, look for the "addFieldToDb" function. In there, you'll see we have special handling for date fields. You'll likely need to add special handling for link (or web or whatever 'type' of field you're using). Likely, CB is automatically adding the http:// to the link, so you'll just need to do a str_replace("http://", '', $value) to remove the http:// from the value that is being imported from Facebook before saving it.

I'd suggest looking at how CB stores that type of field in it's database and then format the data from Facebook similarly.

Hope that helps!
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 10 months ago #25071 by Morpheus
Was pretty simple to fix it (used your hint and all i had to do it look for the right table in CB and check how it works...):
after:
if ($colType == "date")
{
$date = new JDate($value);
$value = $date->toMySQL();
}
add the following:
if ($colType == "webaddress")
{
$value = str_replace("http://", '', $value);
}

works like a charm!

You might want to add it to your next release :)
The topic has been locked.
Support Specialist
13 years 10 months ago #25080 by alzander
We'll definitely add it to the next release. We don't like bugs, and especially like it when fixes are available. Obviously, we had thought about the fix as well since we pretty much knew the steps required.

The 4.2.4 release is in the process of being uploaded now. There are already a few things with the CB plugin that we'll need to make soon to make the Login / Register page look better with the new updates in the 4.2.4 release. The fix you mention will also be in there.

Thanks for the feedback, and glad we could help!
Alex
The topic has been locked.