How can I get the page referer url displayed on the ticket message?
How can I get the page referer url displayed on the ticket message?
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?
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.
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.
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.
Thanks. It is working good!