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 Previous  1, 2
 
Search this topic... | Search MOD Requests... | Search Box
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Author Message
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 417
Location: Québec


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

I don't really know where to look anymore, so it might not be as elegant, but I could offer a work-around.

First, revert to whatever gave you something like this:
http://www.mydomainroot.com/http://www.linkedin.com/pub/angel-rosado/1b/ab9/646

I don't have your exact code, but in viewtopic and viewprofile you probably have something that currently looks like this, except for LinkedIn:
facebook_profile_url ($profiledata['user_facebook'])

Let's try to add this to the line before that:
Code:
$linkedin = preg_replace ($_SERVER['$HTTP_HOST'] . '/', "", facebook_profile_url ($profiledata['user_facebook'])); // (edit to the actual function name and database entry for LinkedIn)


Then replace the blue line above to
$linkedin

That will effectively remove your domain's URL from the string, thus allowing your users to post the entire URL.
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


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

I have tried to use your snippet,
and to summarize, I have changed in viewtopic.php the parts involved according to your instructions, into this:
Code:
      $linkedin = preg_replace ($_SERVER['$HTTP_HOST'] . '/', "", linkedin_profile_url ($postrow[$i]['user_linkedin']));
      $linkedin_img   = ( $postrow[$i]['user_linkedin'] ) ? '<a target="_blank" href="' . $linkedin . '"><img src="' . $images['icon_linkedin'] . '" alt="' . $lang['Profile_linkedin'] . '" title="' . $lang['Profile_linkedin'] . '" border="0" /></a>' : '';


...and in usercp_viewprofile.php into this:
Code:
$linkedin = preg_replace ($_SERVER['$HTTP_HOST'] . '/', "", linkedin_profile_url ($profiledata['user_linkedin']));
$linkedin_img   = ( $profiledata['user_linkedin'] ) ? '<a target="_blank" href="' . $linkedin . '"><img src="' . $images['icon_linkedin'] . '" alt="' . $lang['Profile_linkedin'] . '" title="' . $lang['Profile_linkedin'] . '" border="0" /></a>' : '';


Now when I open my viewtopic I have this error:

Warning: preg_replace() [function.preg-replace]: No ending delimiter '/' found in /board/viewtopic.php on line 2623


Line 2623 in viewtopic.php is:

Code:
      $linkedin = preg_replace ($_SERVER['$HTTP_HOST'] . '/', "", linkedin_profile_url ($postrow[$i]['user_linkedin']));
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 417
Location: Québec


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

My bad, it's been a while.

Code:
$linkedin = preg_replace ("/http:\/\/" . $_SERVER['HTTP_HOST'] . "\//", "", linkedin_profile_url ($postrow[$i]['user_linkedin']));


Hopefully that will work.
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


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

nothing,
I have just replaced the line with the new code, but still the same exact error... still in viewtopic.php, same line (
sorry to give you all these problems
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 417
Location: Québec


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

Hmph, missing one slash. See above, I edited the code.
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


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

A lot of credit to you Salvados!!!

PROBLEM SOLVED
board url not parsed anymore, and copy/paste url linkedin works with no problems icon_wink.gif

Thanks so so so much!!!
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 417
Location: Québec


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

Well, it's really just a work-around, but I'm glad it's at least functional ^^
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Tue Jul 05, 2011 4:44 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

Hi Salvatos!
I am back here to make you a request..... where possible!

All these mods....based on the original facebook mod (and including this original one) have a problem.
Well, its not really a problem... I will try to explain you icon_smile.gif

When a user, in registration or inside the profile don't fill one or all the fields (facebook, myspace, twitter etc...)
these fields are showing up anyway (as EMPTY rows) when you look at these users profile. So Even if they are empty, they are showing up, as empty.

Is there any way to prevent this to happen? For example...put some "check" to phpbb which says:
If you don't fill the Facebook field, I will not show the Facebook field in your profile!
If you fill it, instead, it will be shown icon_smile.gif

I hope I have been clear enough icon_smile.gif

Thanks!
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Tue Jul 05, 2011 4:46 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

Hide Empty Fields in User Profile?
_________________
phpBB2 will never die, I hope!
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Tue Jul 05, 2011 4:47 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

dogs and things wrote:
Hide Empty Fields in User Profile?

ohhhh thanks for this!
I will look at it later tonight icon_smile.gif
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Tue Jul 05, 2011 5:01 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

You will have to adjust the MOD a little bit for the new fields you added but that is easy.
_________________
phpBB2 will never die, I hope!
Back to top
dondino
Board Member



Joined: 09 Dec 2008

Posts: 144


flag
PostPosted: Wed Jul 06, 2011 2:05 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

dogs and things wrote:
You will have to adjust the MOD a little bit for the new fields you added but that is easy.

All done! it was really simple icon_wink.gif
thanks again for your help
Back to top
ognitus.
Board Member



Joined: 30 Sep 2013

Posts: 3



PostPosted: Mon Sep 30, 2013 12:53 am 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

Hi,
I don't know if I'm gonna get any help on this, because this is old thread, but what a hell i'll try:

so I tried to install Facebook on Profile Hack.zip provided by dogs and things and everything up until uploading lang_main.php file to the server was okay and working. After i upload that file i get this error:

Quote:
On firefox:
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

On Chrome:
ERR_CONTENT_DECODING_FAILED

On IE:
This page can't be displayed


Any thoughts why? Because the hack works, I can add facebook ID and everything else shows up (the icon and etc.), the id adds also on sql database and etc., but after I upload the language file the forum crashes down. icon_neutral.gif
Back to top
StarWolf3000
Board Member



Joined: 10 Jun 2010

Posts: 89
Location: Germany


flag
PostPosted: Mon Sep 30, 2013 9:57 am 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

ognitus. wrote:
Hi,
I don't know if I'm gonna get any help on this, because this is old thread, but what a hell i'll try:

so I tried to install Facebook on Profile Hack.zip provided by dogs and things and everything up until uploading lang_main.php file to the server was okay and working. After i upload that file i get this error:

Quote:
On firefox:
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

On Chrome:
ERR_CONTENT_DECODING_FAILED

On IE:
This page can't be displayed


Any thoughts why? Because the hack works, I can add facebook ID and everything else shows up (the icon and etc.), the id adds also on sql database and etc., but after I upload the language file the forum crashes down. icon_neutral.gif

Do you have GZip enabled in the Board Settings? If yes, then disable it.

Also it could help to upload your current lang_main.php here as lang_main.php.txt (because .php is not allowed for attachments).
Back to top
ognitus.
Board Member



Joined: 30 Sep 2013

Posts: 3



PostPosted: Mon Sep 30, 2013 12:33 pm 
Post subject: Re: Twitter & LinkedIn integration... profile or signatu

Thanks so much! I turned GZip off and now it's okay. What did that function do that it effected language file?
Back to top
Display posts from previous:   
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Page 2 of 2 All times are GMT
Goto page Previous  1, 2
 
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.0141 seconds using 15 queries. (SQL 0.0026 Parse 0.0004 Other 0.0111)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo