Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Custom Fields and URLs 7 years 2 months ago #18479

  • mrgreg
  • mrgreg's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 67
  • Thank you received: 6
Observation:
Cleverly, if the value of a custom field is a URL (http://~some site~) it will be presented as a clickable link on the front end.

However, https://~some site~ will not.

Given that sites often force ssl I made the following change in <install>/components\com_jem\views\venue\tmpl\default.php:
From:
if(substr($currentRow, 0, 7) == "http://") {
To:
if((substr($currentRow, 0, 7) == "http://") || (substr($currentRow, 0, 8) == "https://")){

Additionally, rather than presenting the written URL as a link I made it a graphic...
From:
$currentRow = '<a href="'.$this->escape($currentRow).'" target="_blank">'.$this->escape($currentRow).'</a>';
To:
$currentRow = '<a href="'.$this->escape($currentRow).'" target="_blank"><img src="SOME IMAGE PATH" border="0" alt="SOME ALT"></a>';
Regards,
Greg

Noob end-user, just sorting it out...
Joomla! 3.4.1
JEM Component: 2.1.3
JEM Component: 2.1.4
JEM Component: 3.0.7

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

Custom Fields and URLs 7 years 2 months ago #18542

  • Hoffi
  • Hoffi's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 2279
  • Thank you received: 449
Just to note:
With JEM 2.1.4 the https thing will be fixed on event and venue custom fields as well as on venue url field. :cheer:
Pessimists are optimists with experience!

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

  • Page:
  • 1
Time to create page: 0.321 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......