dynamic generated links via costum-fields

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
morphisto.zet
Posts: 27
Joined: Tue Jul 12, 2022 8:02 am

dynamic generated links via costum-fields

Post by morphisto.zet »

Script URL: admin/manage_canned.php
Version of script: 3.3.1
Hosting company:
URL of phpinfo.php: -
URL of session_test.php: -
What terms did you try when SEARCHING for a solution: search links / dynamic links / dynamic in this forum

Write your message below:

I've tried to generate dynamic hyper-links in my response template with the costum-field like https://mydomain.com/%%HESK_custom4%%

In the Text-Field this will generate https://mydomain.com/1234 as it should. But the href in the source code will still have https://mydomain.com/%%HESK_custom4%% as the value, and so the costumer will receive an broken link.

Is this a bug, or would it be a feature requert?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: dynamic generated links via costum-fields

Post by Klemen »

That most likely happens because in the HTML source code of your emails the %% is actually the HTML-encoded version %25%25

% is a special character in an URL-encoded message.

Try manually checking the HTML email templates in your /language/en/html_emails folder and change any %25 to %
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
morphisto.zet
Posts: 27
Joined: Tue Jul 12, 2022 8:02 am

Re: dynamic generated links via costum-fields

Post by morphisto.zet »

Hi Klemen,

thanks for the response. Maybe I have expressed myself misleadingly:

It's not the email template, rather than the standard replies.

If I change a replies under admin/manage_canned.php and use a link with %%HESK_costum4%% the link is changed to %25%25HESK_costum4%25%25 and is saved in the MySQL Database. I can only correct this in the db. Not even if I go to "View -> Source Code" and save the template for the standard reply.
morphisto.zet
Posts: 27
Joined: Tue Jul 12, 2022 8:02 am

Re: dynamic generated links via costum-fields

Post by morphisto.zet »

so, is this a bug or would it be a "feature-request"?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: dynamic generated links via costum-fields

Post by Klemen »

Looks like a bit of both :lol:

This would be tricky to implement and keep secure as anything that goes into an URL must be URL-encoded; can't be replaced with the same string as within the normal text.

I don't have a quick solution for you but will see what we can do in the future.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: dynamic generated links via costum-fields

Post by Klemen »

Does this fix your issue (the admin_ticket.php file should go to your "admin" folder)?
https://hesk.com/extras/hesk3/hesk341_a ... encode.zip

It should replace %25%25 encoded tags with URI-encoded strings
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
morphisto.zet
Posts: 27
Joined: Tue Jul 12, 2022 8:02 am

Re: dynamic generated links via costum-fields

Post by morphisto.zet »

Was about to do something similar this week, but you were faster.

Works like a charm! Thx!
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: dynamic generated links via costum-fields

Post by Klemen »

Fix included in Hesk 3.4.2
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply