phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Twitter & LinkedIn integration... profile or signature..
1 members found this topic helpful
Goto page 1, 2  Next
 
Search this topic... | Search MOD Requests... | Search Box
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Author Message
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Mon Jun 13, 2011 6:48 am 
Post subject: Twitter & LinkedIn integration... profile or signature..

Does anyone know if there's any mod around for our beloved phpbb2
which involves the creation of Twitter and/or LinkedIn details in user's profile? has anyone come across this?
Nowadays both Twitter and LinkedIn seem to be wide spreaded around and users would like to link them in their profiles...

Thanks!
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Mon Jun 13, 2011 6:55 am 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

I know of those two, for Skype and Facebook.
It should be pretty easy to turn the Facebook one into a Twitter MOD.



Facebook on Profile Hack.zip
 Description:

Download
 Filename:  Facebook on Profile Hack.zip
 Filesize:  3.12 KB
 Downloaded:  973 Time(s)


Skype_1.0.7.zip
 Description:

Download
 Filename:  Skype_1.0.7.zip
 Filesize:  16.13 KB
 Downloaded:  962 Time(s)


_________________
phpBB2 will never die, I hope!
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Mon Jun 13, 2011 8:43 am 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

dogs and things wrote:
I know of those two, for Skype and Facebook.
It should be pretty easy to turn the Facebook one into a Twitter MOD.

hey! thanks so much for a fast reply.....
I understand, about these changes you mention...
This Facebook mod you linked seems very very simple!
basically I should change/rename the variable, and the value of the website... should be easy icon_smile.gif
I will start to have a look into it then... icon_smile.gif

Hope they are still up to date to be used with php 5.3.x ...

hmmm adding an icon in viewtopic side... like the ones below here "online", "profile", "phpbb", "www" .... with the twitter name over it, and by clicking on it, go directly to the twitter user's page... should be more hard instead :/ I dont think I can do it myself... I hope you get what I mean about this...
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 426
Location: Québec


flag
PostPosted: Mon Jun 13, 2011 2:37 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

I'm not really good at image editing, but here's what I could come up with.


icon_twitter.png
 Description:
 Filesize:  1.51 KB
 Viewed:  22079 Time(s)

icon_twitter.png


Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Mon Jun 13, 2011 8:54 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

Salvatos wrote:
I'm not really good at image editing, but here's what I could come up with.

You're great Salvatos!! I like it !
and I thank you soooooooo much! icon_biggrin.gif
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 426
Location: Québec


flag
PostPosted: Mon Jun 13, 2011 10:34 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

I'm glad you like it icon_smile.gif

dondino wrote:
hmmm adding an icon in viewtopic side... like the ones below here "online", "profile", "phpbb", "www" .... with the twitter name over it, and by clicking on it, go directly to the twitter user's page... should be more hard instead :/ I dont think I can do it myself... I hope you get what I mean about this...


I didn't see this earlier... I looked at the Facebook MOD, and all you have to do really is change "facebook" into "twitter" every time it comes up, and change the function at lines 249-250 to reflect the Twitter URL (as well as the language variables). Unless I missed something else, it should work straight away.
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Sat Jul 02, 2011 10:05 am 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

Salvatos wrote:
and change the function at lines 249-250 to reflect the Twitter URL

Now I need help about that function line... but for LinkedIn, not Twitter.

The following ones are the working functions I have (in functions.php) for both Facebook and Twitter profile fields:
Code:
function facebook_profile_url ($user_id)
{
//   return ( $user_id ) ? 'http://www.facebook.com/profile.php?id' . POST_USERS_URL . '=' . $user_id : '';
   return ( $user_id ) ? 'http://www.facebook.com/profile.php?id' . ((is_numeric($user_id)) ? '' : 'un') . '=' . $user_id : '';
}

function twitter_profile_url ($user_id)
{
//   return ( $user_id ) ? 'http://www.twitter.com/#!' . POST_USERS_URL . '/' . $user_id : '';
   return ( $user_id ) ? 'http://www.twitter.com/' . ((is_numeric($user_id)) ? '' : '#!') . '/' . $user_id : '';
}

They are working with no problems at all. And users can input their Twitter username, or Facebook username and the link reported to click, works fine.

But for LinkedIn is different icon_rolleyes.gif and its tricky! The only way to do it is that in the LinkedIn field users MUST write their entire FULL URL of the LinkedIn profile page, and I can't get it to work...
So basicallly I want that in the LinkedIn field, users would be able to copy and paste from their browser the complete LinkedIn URL, including http:// for example http://www.linkedin.com/*******

I have tried with this:
Code:
function linkedin_profile_url ($user_id)
{
//   return ( $user_id ) ? '/' . POST_USERS_URL . '/' . $user_id : '';
   return ( $user_id ) ? '/' . ((is_numeric($user_id)) ? '' : '/') . '/' . $user_id : '';
}

But obviously... it doesn't work.
If I write for example "http://www.linkedin.com" in profile LinkedIn field, the link shows up as this:

http://www.*****.com/http://www.linkedin.com

where the first part is my domain URL! why it happens? It would work, but there's my URL before, which compromises the link...

I have no writing php skills. For someone else probably it's a joke icon_smile.gif
Please if you can, help me in writing a working LinkedIn profile function and I will test it,
Thanks
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 426
Location: Québec


flag
PostPosted: Sat Jul 02, 2011 4:00 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

Well, if you're just using the full URL pasted by the user without modification, you don't need the function at all. So, on the mod's install file's line 404 for example, when they call the URL for the Facebook button, instead of
facebook_profile_url ($profiledata['user_facebook'])
you'd be using
$profiledata['user_facebook']
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Sat Jul 02, 2011 4:15 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

Hi Salvatos, thanks for your reply.
but I'm still at a dead point here, and I dont know why... there must be something hard to find icon_sad.gif

1) If I use your trick and delete the function, along with the calls to that function (both in viewtopic.php and usercp_viewprofile.php)
when I call the URL it still report first my main domain url, followed by the linkedin url... and as I explained in my previous post it ends up in having two http://*** in row, and it doesn't work!
http://www.mydomainroot.com/http://www.linkedin.com/pub/angel-rosado/1b/ab9/646
Maybe its related to the mod_rewrite in apache? I wonder why it reports my domain root path first! I really dont have a clue why it does this...
Is there any trick to add in the code, not to make it add the domain root path before the linkedin url?

2) I managed to modify the function to get it to work (partially!) look:
Code:
function linkedin_profile_url ($user_id)
{
   return ( $user_id ) ? 'http://www.linkedin.com/' . ((is_numeric($user_id)) ? '' : 'pub') . '/' . $user_id : '';
}

with this code there will be pre-filled the part http://www.linkedin.com/pub/ (whcih is always present in every LinkedIn profile)
and so the user will have to fill only the rest part ( after the pub/ ) in the profile field, for example I will fill it with one picked by case "angel-rosado/1b/ab9/646"
But now the strange thing! I dont know why, when I click over the link generated, the browser convert just the slashes of the above part in %2F and it doesn't open the site! icon_sad.gif

In few words, at the end, instead of having as link:
http://www.linkedin.com/pub/angel-rosado/1b/ab9/646
I have:
http://www.linkedin.com/pub/angel-rosado%2F1b%2Fab9%2F646

If I just move the mouse over the icon_linkedin I have made, I can see on the status bar the link reported correctly, without the %2F instead of the slashes at the end, but when I click over it, the browser tries to open the URL above (the one with %2F)
and both my browsers (FF and IE) cannot open the url above! it gives me a Linkedin not found profile error page
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 426
Location: Québec


flag
PostPosted: Sat Jul 02, 2011 5:02 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

I'll have a look at this over the next hour, I'm pretty sure I know where the problem comes from but can't look right away.
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Sat Jul 02, 2011 5:22 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

Salvatos wrote:
I'll have a look at this over the next hour, I'm pretty sure I know where the problem comes from but can't look right away.

Dont worry Salvatos! Take your time,
I appreciate your precious help
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 426
Location: Québec


flag
PostPosted: Sat Jul 02, 2011 5:58 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

That should be it.

REPLACE
Code:
return ( $user_id ) ? 'http://www.linkedin.com/' . ((is_numeric($user_id)) ? '' : 'pub') . '/' . $user_id : '';

WITH
Code:
return ( $user_id ) ? 'http://www.linkedin.com/pub/' . urldecode($user_id) : '';


I removed the is_numeric part since I don't think it really applies to LinkedIn, but feel free to put it back.
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Sat Jul 02, 2011 6:08 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

thanks Salvatos!
as always, with ur correction works perfectly!
Now I just have to tell users that to use the LinkedIn field, they must fill it ONLY with the part after "pub/" icon_smile.gif

-----------------------------------------------------------------------
EDIT: I have just found out that not ALL linkedin profiles use that behviour, unfortunately. For example australian LinkedIn profiles have different address... local urls....
http://au.linkedin.com/in/andreamitchell
This profile doesn't have a correspondant likedin URL which involves the /pub folder icon_sad.gif
--------------------------------------------------------------------

So maybe, is it possible to modify again that function, in order not to put also the pre-filled part (http://www.linkedin.com/pub/ ) and allow the user to just copy and paste the whole URL in the profile field?

OR.... do you have any clue on why the trick of disabling the function,
makes my root domain url to appear before the real linkedin link? icon_rolleyes.gif
The complete URL paste would have been more useful and correct
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 426
Location: Québec


flag
PostPosted: Sat Jul 02, 2011 6:28 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

dondino wrote:
The complete URL paste would have been more easy for them to do icon_biggrin.gif

Yeah, I thought the same. Copying three subdirectories really isn't too convenient. Not sure about it, though, at first I had assumed it was automatically edited with post parsing, but I'm not sure those links go through that. It's like it gets checked at some point and the code assumes it should have your domain first. Did you check if it was also like that in the database? Otherwise we'd know it happens at some point during parsing.
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Sat Jul 02, 2011 6:41 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

Inside my database LinkedIn user field my forum path url is not added. The field is filled correctly just with what I write inside the LinkedIn field.
So I think it is added during url parse, as you suspect.

Anyway, I have found a little workaround...with a note icon_smile.gif
if I put
Code:
function linkedin_profile_url ($user_id)
{
   return ( $user_id ) ? 'http://' . urldecode($user_id) : '';
}

it works, but user must copy the entire LinkedIn URL in the field WITHOUT the "http://" part ! icon_smile.gif I have to write a note about it
*I think I can be satisfied of this solution, if we can't find out about the parsing problem*

Instead if I put for example:
Code:
   return ( $user_id ) ? '' . urldecode($user_id) : '';
then it would add my forum path to the URL, before the LinkedIn field.
icon_rolleyes.gif maybe its possible to add a string, not to parse the phpbb forum path to that result....
Back to top
Display posts from previous:   
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Page 1 of 2 All times are GMT
Goto page 1, 2  Next
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0343 seconds using 18 queries. (SQL 0.0023 Parse 0.0026 Other 0.0294)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo