Support Home Page › Forums › Joomla Software › Easy Folder Listing Module › Module vs Plugin and target _blank
- This topic has 8 replies, 5 voices, and was last updated 12 years, 1 month ago by
Minas_Hund.
-
AuthorPosts
-
March 21, 2011 at 6:55 pm #76
joanne721
ParticipantHi,
I first installed the Easy File Listing module and it worked great except I couldn't open files in a new window (target _blank). So I purchased the plugin and it opened the files in a new window, but my Frontpage Slideshow won't work when the plugin is enabled. I am new to Joomla so think it might be easier to figure out how to open files in a new window with the module, than trying to figure out why the plugin and slideshow conflict.
My question: can I have the module open files in a new window?
Other than that, the extension is so easy to install and configure! It does (almost) everything I need!
Thanks,
Joanne
March 21, 2011 at 7:45 pm #1006jondiego
ParticipantYes you can make the files open in a new window. Look in the file “helper.php” around line 246 and line 193.
Change
$html .= '<a href="'.JURI::base().$folder.'/'.$rows[$i]['name'].'.'.$rows[$i]['ext'].'">';to
$html .= '<a target="_blank" href="'.JURI::base().$folder.'/'.$rows[$i]['name'].'.'.$rows[$i]['ext'].'">';Look for anything with “href” in the text. This tells you it’s a link. Then just add the “target=”_blank”
Hope this helps!
March 21, 2011 at 8:30 pm #1007joanne721
ParticipantThanks! That worked perfectly.
February 12, 2013 at 5:01 pm #1008
Michael GilkesKeymasterFor everyone’s information, this code has been moved to the default.php in the tmpl folder. So, to add the functionality, edit the default.php file at line 71. This change applies to version 2.5 or later.
August 28, 2013 at 11:29 pm #1009tapi
ParticipantHi!
I’ve been checkin in /modules/mod_easyfolderlisting/helper.php in order to add some <target=”_blank”> but could not find any “href”. What am I doing wrong?
Thanks in advance.
August 29, 2013 at 1:26 am #1010
Michael GilkesKeymaster@tapi. Please look into the tmpl folder in the default.php file.
September 12, 2013 at 11:00 am #1011Minas_Hund
ParticipantHi Michael,
First of all I’d like to thank you for the great Module, I love it.
Now I want the link taget be opened i a new window (using version 2.6) and I found the code snippet in the default.php file and changed it as descripted above. But unfortunately it doesn’t work.
Do you have an idea how to manage this?
Kind Regards,
Mina
September 12, 2013 at 11:19 am #1012
Michael GilkesKeymaster@Minas_Hund. You had to do this in both the list.php file and the default.php file. Find the line that says:
1echo '<a href="'.JURI::base().$folder.'/'.$fixedName.'.'.$rows[$i]['ext'].'">';and change it to:
1echo '<a target="_blank" href="'.JURI::base().$folder.'/'.$fixedName.'.'.$rows[$i]['ext'].'">';September 12, 2013 at 11:30 am #1013Minas_Hund
ParticipantGreat! Now it works!
Thx for your quick reply and help!
Kind Regards,
Mina
-
AuthorPosts
- The topic ‘Module vs Plugin and target _blank’ is closed to new replies.