Jump to content

PS.16 Good way to get current URL ?


Recommended Posts

Hello,

 

 

I have added on some tpl (module and theme page) a comment box from Facebook.
I need to get Current url for href param.

 

I would like to know if this way is good ?

{$link->protocol_link}{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}

In Final I get this code :

<div id="fb-root"></div>
<div class="fb-comments" data-href="{$link->protocol_link}{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}" data-width="100%" data-colorscheme="light"></div>

Seem's to be good, I don't get error from Facebook but I prefer to be sure :)

 

Thanks :)

Link to comment
Share on other sites

Cheers Dh42,

 

Yes, Im trying but I got an error from facebook : 
Sorry, this feature isn't available right now An error occurred while processing this request. Please try again later.

 

http://stackoverflow.com/questions/28575120/comments-box-sorry-this-feature-isnt-available-right-now

I haven't got javascript error but Im not able to comments :'( (I see the box but nothing)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...