Results 1 to 6 of 6

Thread: Referer URL

  1. #1
    Join Date
    Apr 2002
    Location
    India
    Posts
    11

    Default Referer URL

    How can I get the page referer url displayed on the ticket message?

  2. #2
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    I'm a bit confused, because typically users would be submitting the ticket from the domain where iDesk is installed.

    Could you explain the application so I can understand this better?

  3. #3
    Join Date
    Apr 2002
    Location
    India
    Posts
    11

    Default

    We added the link "http://ourdomain/idesk/ticket_new.php" on all our pages.

    So users can submit the ticket without registering.

    We are getting comments on individual pages of our website. Many users don't mention which url they are responding to. May be they are thinking we can track it. So it will be helpful if we can use a code like
    <?php
    $URL = $_SERVER['HTTP_REFERER'];
    echo $URL;
    ?>

    We tested it on the template file. But it is not working. Can you please advise on this.

  4. #4
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Sorry for the late reply. The iDesk programmer has a few days off to make some preperations for his upcoming wedding.

    I will get him to reply to you when he is available.

  5. #5
    Join Date
    Apr 2008
    Posts
    20

    Default

    To display the Referer URL, open ticket_new.php and write this line inside the
    if (!$isAjax) { :

    $iDeskTpl->assign('url_referer', $_SERVER['HTTP_REFERER']);

    Then put this on the templates to display the URL:

    {$url_referer}

    Make sure that you edit the right template for the script or it won't be displayed, i.e. when you edit "idesk/ticket_new.php" you should edit "idesk/templates/ticket_new.html"
    and so when you edit "idesk/admin/ticket_new.php" you should edit "idesk/templates/admin/ticket_new.html"

    Sorry for the long delay of the reply.

    Best Regards, Dewa.
    Last edited by ddewayanto; 11-12-2008 at 02:07 AM.

  6. #6
    Join Date
    Apr 2002
    Location
    India
    Posts
    11

    Default

    Thanks. It is working good!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •