SOLVED - location link in a new window
Discuss JEvents 2.x for Joomla 1.5-2.5 here - club members can use the special club forum for faster response times.
Forum rules
When requesting support, please copy and paste the 'Version information for Support Forum' from the JEvents Control Panel into your post. If you cannot see this, please enable JEvents project news within it's configuration. Also, if you get a 500 Error, Enable Joomla! Maximum Error Reporting and view the page again, you should now have a more detailed error which will help us to resolve you issue quickly.
When requesting support, please copy and paste the 'Version information for Support Forum' from the JEvents Control Panel into your post. If you cannot see this, please enable JEvents project news within it's configuration. Also, if you get a 500 Error, Enable Joomla! Maximum Error Reporting and view the page again, you should now have a more detailed error which will help us to resolve you issue quickly.
SOLVED - location link in a new window
by howie » Wed Mar 14, 2012 5:59 pm
Hello,
is it possible to add a _blank-tag to the url of the location-link on the details-page to let it open in a new window?
Greetings
Howie
is it possible to add a _blank-tag to the url of the location-link on the details-page to let it open in a new window?
Greetings
Howie
- howie
- Posts: 11
- Joined: Wed Nov 09, 2011 5:00 pm
- Location: Hildesheim
Re: location link in a new window
by Tonyp » Wed Mar 14, 2012 9:32 pm
Hello,
Can you be a bit more specific? location page? are you using the Managed Locations addon?
Regards
Tony
Can you be a bit more specific? location page? are you using the Managed Locations addon?
Regards
Tony
---------------------------------------
Do not forget if you like JEvents, why not join the CLUB! for priority support and lots of excellent plugin's. JEvents Club
Do not forget if you like JEvents, why not join the CLUB! for priority support and lots of excellent plugin's. JEvents Club
-

Tonyp - Contributor
- Posts: 8717
- Joined: Tue Oct 12, 2010 9:12 pm
- Location: Isle of Man
Re: location link in a new window
by howie » Wed Mar 14, 2012 10:10 pm
Hi Tony,
thanx for your fast response!
I mean the link to the website of the events location.
example: http://www.fan.bluesshacks.de/index.php ... -bluesclub
the link after "Contact".
Best
Howie
thanx for your fast response!
I mean the link to the website of the events location.
example: http://www.fan.bluesshacks.de/index.php ... -bluesclub
the link after "Contact".
Best
Howie
- howie
- Posts: 11
- Joined: Wed Nov 09, 2011 5:00 pm
- Location: Hildesheim
Re: location link in a new window
by Tonyp » Wed Mar 14, 2012 10:21 pm
Hello Howie,
So you are wanting to make the Location a link? to what exactly? we have a Locations Plugin which allows you to define locations in google, click the map or showing the link can open a new tab.
Regards
Tony
So you are wanting to make the Location a link? to what exactly? we have a Locations Plugin which allows you to define locations in google, click the map or showing the link can open a new tab.
Regards
Tony
---------------------------------------
Do not forget if you like JEvents, why not join the CLUB! for priority support and lots of excellent plugin's. JEvents Club
Do not forget if you like JEvents, why not join the CLUB! for priority support and lots of excellent plugin's. JEvents Club
-

Tonyp - Contributor
- Posts: 8717
- Joined: Tue Oct 12, 2010 9:12 pm
- Location: Isle of Man
Re: location link in a new window
by carcam » Thu Mar 15, 2012 6:14 am
Hi howie,
to make that link open in a new window you should modify the file [JOOMLA]/components/com_jevents/libraries/datamodel.php
and around line 736 replace this code:
with this:
Remember the code for future upgrades as it will be overwritten if you upgrade the component.
to make that link open in a new window you should modify the file [JOOMLA]/components/com_jevents/libraries/datamodel.php
and around line 736 replace this code:
- Code: Select all
$row->extra_info(preg_replace('#(http://)('.$pattern.'*)#i', '<a href="\\1\\2">\\1\\2</a>', $row->extra_info()));
with this:
- Code: Select all
$row->extra_info(preg_replace('#(http://)('.$pattern.'*)#i', '<a href="\\1\\2" target="_blank">\\1\\2</a>', $row->extra_info()));
Remember the code for future upgrades as it will be overwritten if you upgrade the component.
-
carcam
- Contributor
- Posts: 3391
- Joined: Wed Aug 06, 2008 7:50 pm
- Location: Córdoba
Re: location link in a new window
by howie » Thu Mar 15, 2012 9:34 am
Hi Carcam,
this worked for me - but I had to add the _blank-tag in the contact-line!
Thanks for your help!
cheers
Howie
this worked for me - but I had to add the _blank-tag in the contact-line!
Thanks for your help!
cheers
Howie
- howie
- Posts: 11
- Joined: Wed Nov 09, 2011 5:00 pm
- Location: Hildesheim
Re: SOLVED - location link in a new window
by carcam » Fri Mar 16, 2012 6:51 am
Just extend the idead to the other fields.
All best!!
All best!!
-
carcam
- Contributor
- Posts: 3391
- Joined: Wed Aug 06, 2008 7:50 pm
- Location: Córdoba
Re: SOLVED - location link in a new window
by uqkhurle » Thu Nov 08, 2012 1:18 am
Hello carcam, thanks for this exactly what I needed. However, this only seems to work when I open the event, then click on the extra_info field. If I click on the extra_info field when viewing an event through the See By Year view, which is my default, the URL still opens in the same window. Do I need to at the _blank code to another file somewhere? Many thanks,K
- uqkhurle
- Gold Members
- Posts: 8
- Joined: Wed Sep 19, 2012 9:26 am
Re: SOLVED - location link in a new window
by Geraint » Thu Nov 08, 2012 9:07 am
That is correct - Carlos' change only affected the event detail page. You can do the same for your list views but they need a different approach.
Are you using the layout editor (http://www.jevents.net/jevents-15-topme ... ut-editing)? If you are then copy the file components/com_jevents/views/default/helpers/defaultloadedfromtemplate.php to templates/YOURTEMPLATE/html/com_jevents/helpers/defaultloadedfromtemplate.php and edit the copied file.
In this at line c. 250 you'll find
replace it with
If you do this then you can undo the change in the datamodel.php file since this change will affect the event detail and event list views.
Are you using the layout editor (http://www.jevents.net/jevents-15-topme ... ut-editing)? If you are then copy the file components/com_jevents/views/default/helpers/defaultloadedfromtemplate.php to templates/YOURTEMPLATE/html/com_jevents/helpers/defaultloadedfromtemplate.php and edit the copied file.
In this at line c. 250 you'll find
- Code: Select all
$search[]="{{EXTRAINFO}}";$replace[]=$event->extra_info();$blank[]="";
replace it with
- Code: Select all
if (strpos($row->extra_info(),'<a href=')===false){
$row->extra_info(preg_replace('#(http://)('.$pattern.'*)#i', '<a href="\\1\\2" target="_blank">\\1\\2</a>', $row->extra_info()));
}
If you do this then you can undo the change in the datamodel.php file since this change will affect the event detail and event list views.
------------
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.
Join the JEvents club today!
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.
Join the JEvents club today!
-

Geraint - Posts: 30518
- Joined: Fri Feb 15, 2008 6:14 pm
9 posts
• Page 1 of 1
Return to Jevents 2.x (Free Access)
Who is online
Users browsing this forum: Google [Bot]

