Module vs Plugin and target _blank

Home \ forums/topic \ Module vs Plugin and target _blank

Support Home Page Forums Joomla Software Easy Folder Listing Module Module vs Plugin and target _blank

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #76
    joanne721
    Participant

    Hi,

    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

    #1006
    jondiego
    Participant

    Yes 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!

    #1007
    joanne721
    Participant

    Thanks! That worked perfectly.

    #1008
    Michael Gilkes
    Keymaster

    For 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.

    #1009
    tapi
    Participant

    Hi!

    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.

    #1010
    Michael Gilkes
    Keymaster

    @tapi. Please look into the tmpl folder in the default.php file.

    #1011
    Minas_Hund
    Participant

    Hi 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

    #1012
    Michael Gilkes
    Keymaster

    @Minas_Hund. You had to do this in both the list.php file and the default.php file. Find the line that says:

    and change it to:

    #1013
    Minas_Hund
    Participant

    Great! Now it works!

    Thx for your quick reply and help!

    Kind Regards,

    Mina

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Module vs Plugin and target _blank’ is closed to new replies.