Problems with URL generation.

Hi
I am currently developing a plugin which is working fine apart from this simple problem:

Using data-href="http://www.mydomain.co.uk<?php echo html_encode(getImageLinkURL()); ?>"
which works fine but I am trying to get the 'my domian' to be automatic also - I have tried using WEBPATH but I am not sure if this is the correct way or my PHP programming isn't upto much.

Cheers

John

Comments

  • acrylian Administrator, Developer
    Generally you don't need the domain as a browser autotically adds it. but using `WEBPAT` would be the right way.
  • Its a facebook "like" plugin (even though i dont use it my self)

    I have got this to work fine data-href="<?php echo html_encode(getMainSiteURL()); ?><?php echo html_encode(getImageLinkURL()); ?>

    Cheers

    John
  • acrylian Administrator, Developer
    There is also a FULLWEBPATH and a SERVERPATH constant. But WEBPATH should be enough actually.

    The getMainSiteURL() refers to the url you have to set on the backend yourself manually and is meant to be used if your site users Zenphoto only for the gallery part for example.
  • Hi

    Thanks for the info.

    I will have a play about and send you a link to the plugin to see what people think before asking you to add it to your site.

    Regards

    John
Sign In or Register to comment.