Custom Event Field URL - button for hyperlink ?

  • Markus Schwendtner
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 4 months ago #155070 by Markus Schwendtner
Custom Event Field URL - button for hyperlink ? was created by Markus Schwendtner
Hi,

I am having a number of custom event fields containing links to other pages (additional information, pdfs stored in the cloud etc).

How can I show a button in the event details field (like "click here") instead just the link ? 

Thanks in advance !
Markus

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #155072 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Custom Event Field URL - button for hyperlink ?
Hi Markus

Base on the code, if it is an URL, then it should be displayed at the link (if you are using latest version of the extension)

If it is not working like that, you can submit a support ticket sending us:

1. Super admin account of your site

2. Send us link to that page

We will check to see what's wrong and get it sorted

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Markus Schwendtner
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 4 months ago #155077 by Markus Schwendtner
Replied by Markus Schwendtner on topic Custom Event Field URL - button for hyperlink ?
That function works (need to update one of my old websites still and see but i made a lot of custom changes - therefore asking first. It works on my fresh install showing the link.).

What I would like is to show instead of the full link, just a button which when pressed gets me to the link in the custom event field...

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #155086 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Custom Event Field URL - button for hyperlink ?
For that, you will need to customize the code yourself. The file you need to customize is components/com_eventbooking/themes/default/common/event_fields.php . This is the code you need to change to meet your own need:
Code:
if (filter_var($paramValue, FILTER_VALIDATE_URL)) { $paramValue = '<a href="' . $paramValue . '" target="_blank">' . $paramValue . '<a/>'; }

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Markus Schwendtner
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 4 months ago #155094 by Markus Schwendtner
Replied by Markus Schwendtner on topic Custom Event Field URL - button for hyperlink ?
Thanks a lot, that works like a charm !

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #155099 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Custom Event Field URL - button for hyperlink ?
Great Markus. Please remember to move that modified file to PATH_TO_TEMPLATE/html/com_eventbooking/common folder on your site so that the change won't be lost when you update to future releases of the extension. PATH_TO_TEMPLATE is path to the template which you are using on your site

Regards,

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc