Share on facebook - trying to fix link. Please, help!!!

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.

Share on facebook - trying to fix link. Please, help!!!

Postby andytm » Mon Oct 26, 2009 5:08 pm

I have to generate link, where I have to add
Code: Select all
http://www.facebook.com/share.php?u=

right before my topic link, so it must be like that:

Code: Select all
http://www.facebook.com/share.php?u=http://www.abto.bg/forum/viewtopic.php.......


In viewtopic.php currently I have new line:
Code: Select all
   'U_FACEBOOK'         => $viewtopic_url,


and when I'm trying to add http://www.facebook.com/share.php?u=

Code: Select all
'U_FACEBOOK'         => 'http://www.facebook.com/share.php?u=' . $viewtopic_url,


it generates me link like that

Code: Select all
http://www.facebook.com/share.php?u=./forum/viewtopic.php

which is wrong. Where is my mistake ????
Last edited by HardStyle on Sat Oct 31, 2009 10:01 am, edited 1 time in total.
Reason: Topic icon changed
Keep Saabing in our Saab Club Bulgaria
User avatar
andytm
Registered User
 
Posts: 9
Joined: Sun Jan 18, 2004 10:40 pm

Re: Share on facebook - trying to fix link. Please, help!!!

Postby Raimon » Wed Oct 28, 2009 12:05 am

You need a absolute pad, with "generate_board_url()"

Try to use:

Code: Select all
'U_FACEBOOK'         => 'http://www.facebook.com/share.php?u=' . generate_board_url() . str_replace('./', '/', $viewtopic_url), 
Raimon
Styles Team Member
Styles Team Member
 
Posts: 6854
Joined: Tue May 30, 2006 5:31 pm
Location: Netherlands

Re: Share on facebook - trying to fix link. Please, help!!!

Postby andytm » Thu Oct 29, 2009 10:50 pm

Thank you! It's working !!!!
Keep Saabing in our Saab Club Bulgaria
User avatar
andytm
Registered User
 
Posts: 9
Joined: Sun Jan 18, 2004 10:40 pm

Re: Share on facebook - trying to fix link. Please, help!!!

Postby JesusADS » Thu Nov 05, 2009 3:06 pm

Hi, it's not working for me :( for some reason it doesn't take &t=XX on the viewtopic.php?f=XX&t=XX.

Any ideas?
Thanks :)
User avatar
JesusADS
Registered User
 
Posts: 20
Joined: Tue Oct 27, 2009 2:26 pm
Location: Venezuela

Re: Share on facebook - trying to fix link. Please, help!!!

Postby Raimon » Thu Nov 05, 2009 6:42 pm

Where did you place the codes, on viewtopic.php and if so, where did you add the codes exactly?
Raimon
Styles Team Member
Styles Team Member
 
Posts: 6854
Joined: Tue May 30, 2006 5:31 pm
Location: Netherlands

Re: Share on facebook - trying to fix link. Please, help!!!

Postby JesusADS » Thu Nov 05, 2009 7:21 pm

Raimon wrote:Where did you place the codes, on viewtopic.php and if so, where did you add the codes exactly?


yep, in viewtopic.php inside of $postrow = array(...); afterr

Code: Select all
'U_JABBER'      => $user_cache[$poster_id]['jabber'], 


i try with

Code: Select all
'U_FACEBOOK'         => 'http://www.facebook.com/share.php?u=' . generate_board_url() . str_replace('./', '/', $viewtopic_url),


and

Code: Select all
'U_FACEBOOK'         => 'http://www.facebook.com/share.php?u=' . generate_board_url() . '/viewtopic.php?f='. $forum_id . '&t=' . $topic_data['topic_id'] . '&t=' . $topic_data['topic_title'],


but nothing :(
User avatar
JesusADS
Registered User
 
Posts: 20
Joined: Tue Oct 27, 2009 2:26 pm
Location: Venezuela


Return to [3.0.x] Styles Support & Discussion

Who is online

Users browsing this forum: -sup3rman-, crazymummy, hydrix, tiby and 33 guests