J and Beyond 2013 | An International Joomla! Conference - May 31st - 2nd, 2013, Noordwijkerhout, The Netherlands
It is currently Mon May 20, 2013 8:30 pm

Links to open on a new window/tab

JEvents 2.0 was launched over 2 years ago and the latest stable version is version 2.2 which will run on Joomla 1.5 and Joomla 2.5. JEvents 1.5 is therefore no longer actively supported - you should upgrade to JEvents 2.2+ as soon as possible.
Forum rules
Please include as much detail in any test or bug reports for JEvents 1.5 as possible.

First of all, check if you are running the latest available version of Joomla! and JEvents. Posts for issues, where both systems are not updated, will be ignored.

We need the following at least:

* PHP version (e.g. 5.2.5). Note: Support for PHP4 is discontinued.
* Joomla! version
* JEvents version
* Web Server software (Apache or IIS with version number if possible)
* Server Operating system (e.g. Linux, Windows, Solaris, Darwin ...)
* Database version
* memory_limit from your phpinfo
* Web browser and version

Please enable error reporting and include any error messages in your posting. You do this via the Joomla Configuration - set "error reporting" to "maximum" on the Server tab.

Finally, please describe the steps required to recreate the problem and also please enable error reporting and give us any error messages generated.

Links to open on a new window/tab

Postby Xaman » Fri Jul 09, 2010 3:26 pm

Hi,

Currently when I use a URL on the "Contact" or "Other info" fields it will set the link to open on the same window.

Is it possible to change this behavior so it opens links on a new window/tab?

Thanks in advance.
Xaman
Posts: 39
Joined: Sun Apr 20, 2008 9:10 pm

Re: Links to open on a new window/tab

Postby Geraint » Sat Jul 10, 2010 8:40 am

Not at all easy I'm afraid - you'll need to change some of the core PHP code of JEvents.
------------
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!
User avatar
Geraint
Posts: 30529
Joined: Fri Feb 15, 2008 6:14 pm

Re: Links to open on a new window/tab

Postby philou » Wed Nov 10, 2010 7:27 pm

Hi,

I had the same problem, and here is a solution, however you have to override the layout template where you want this to work (e.g. "detail_body.php" for the event detail page). In there you replace

Code: Select all
<?php echo $row->contact_info(); ?>


by:

Code: Select all
<?php echo str_replace('href=', 'target="_blank" href=', $row->contact_info()); ?>


Basically I look for the string "href" inside the HTML link markup and then add the "target" attribute in front of it.

Works quite nicely here.
p.
philou
Posts: 105
Joined: Sun Jul 18, 2010 12:37 pm

Re: Links to open on a new window/tab

Postby leaho » Wed Feb 22, 2012 11:28 pm

philou - Can you provide the full path to that php file? I'd also like to make links in my events open in a new window, but in searching the component, it's not apparent where that path is.
Thanks!
leaho
Posts: 3
Joined: Tue Feb 21, 2012 6:13 pm

Re: Links to open on a new window/tab

Postby carcam » Thu Feb 23, 2012 7:04 am

Hi leaho,
that answer is very old, and some changes have been made so you probably will not find the exact code snippet on your code. Anyway, just search in the component views according to which do you want to change (icalevent folder for detail page for instance) and change it there.

This article might be helpful:

http://www.jevents.net/en/jevents-15-to ... jevents-15

All best!!
carcam
Contributor
Posts: 3391
Joined: Wed Aug 06, 2008 7:50 pm
Location: Córdoba

Re: Links to open on a new window/tab

Postby leaho » Thu Feb 23, 2012 8:05 pm

Thanks carcam. I'll give it a try!
leaho
Posts: 3
Joined: Tue Feb 21, 2012 6:13 pm

Re: Links to open on a new window/tab

Postby philou » Fri Feb 24, 2012 9:23 am

Hi leaho,

if it is the Event Detail page you want to change, you find it here:
joomla/components/com_jevents/views/ext(IF_YOU_ARE_USING_THE EXT_LAYOUT/icalevent/tmpl/detail_body.php or detail_body16.php if you are using Joomla version 1.6

If you are new to overrides, you can find info elsewhere on this site about where you should copy this php file in order to modify it.

Best,
philou
philou
Posts: 105
Joined: Sun Jul 18, 2010 12:37 pm

Re: Links to open on a new window/tab

Postby leaho » Fri Feb 24, 2012 2:50 pm

Thanks philou. It's links in the "contact" field that I want to have open up in a new window. Will the path you provided change that field?

I'm very new to code, so I'll see if I can get someone else to help me change it on my site.
Thanks!
leaho
Posts: 3
Joined: Tue Feb 21, 2012 6:13 pm

Re: Links to open on a new window/tab

Postby philou » Fri Feb 24, 2012 2:59 pm

If you are not so comfortable with php then it's probably better you get someone to help you. The file I mention outputs the entire "Event Detail" page, so you need to find the part where the contact field is created and then use the little trick to turn links into pop-up links.

Whoever does it for you should be aware that the original php file is left untouched, but a copy is made inside your template folder which is then modified and will automatically override the original file.
Refer to this post http://www.jevents.net/en/jevents-15-topmenu-17/club-documentation/advanced-documentatation/56-template-overrides-event-detail-page

Good luck,
p.
philou
Posts: 105
Joined: Sun Jul 18, 2010 12:37 pm


Return to JEvents 1.5 (No longer actively supported)

Who is online

Users browsing this forum: No registered users

Main Menu

User Menu

Hosted By


Who is online

In total there are 0 users online :: 0 registered and 0 hidden (based on users active over the past 5 minutes)
Most users ever online was 94 on Tue Sep 01, 2009 12:33 am

Users browsing this forum: No registered users

Login Form