I think this is very useful in my site. BUt one thing is that I would like to see the click either to open a pop-up or at least a new windows without closing my site. Any help would be appreciated. Thanks.

Comments

davidblewett’s picture

Yes, you can make this change. In the scripturefilter.inc file, there is a section that looks like this:

   switch ($translation) {
        case 'ESV':
        // note: the ESV could actually support a mouseover reference
        // we could pull it directly from their site and include it in the $title text
        // http://www.gnpcb.org/esv/share/services/api/ for more info
             $link = 'http://www.gnpcb.org/esv/search/?go=Go&q=';
             $title = 'English Standard Version Bible';
             $link = sprintf('<a href="%s%s" title="%s">%s</a>',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
             break;
        case 'NET':
             $link = 'http://www.bible.org/cgi-bin/netbible.pl?header=on';
             $title = 'New English Translation';
             $chapter = trim(strtok($verse,':'));
             $verses = trim(strtok('-,'));
             $book = scripturizeNETBook($volume.' '.$book);
             $link = sprintf('<a href="%s&book=%s&chapter=%s&verse=%s" title="%s">%s</a>',$link,htmlentities(urlencode($book)),$chapter,$verses,$title,trim($reference));
             break;
        default:
             $link = "http://biblegateway.com/cgi-bin/bible?language=english&version=$translation&passage=";
             $title = 'Bible Gateway';
             $link = sprintf('<a href="%s%s" title="%s">%s</a>',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
             break;
        // should I add Libronix links? perhaps with define constant to enable/disable...
        // see http://www.logos.com/support/lbs/weblinking
        // libronixdls:keylink|ref=[en]bible:Gen%201:1|res=LLS:ESV
    }

In the sections that create the actual link ('

I don't think adding this to the public version of the module is a good idea, because I personally dislike it when websites force new windows to be opened.

davidblewett’s picture

Yes, you can make this change. In the scripturefilter.inc file, there is a section that looks like this:

   switch ($translation) {
        case 'ESV':
        // note: the ESV could actually support a mouseover reference
        // we could pull it directly from their site and include it in the $title text
        // http://www.gnpcb.org/esv/share/services/api/ for more info
             $link = 'http://www.gnpcb.org/esv/search/?go=Go&q=';
             $title = 'English Standard Version Bible';
             $link = sprintf('<a href="%s%s" title="%s">%s</a>',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
             break;
        case 'NET':
             $link = 'http://www.bible.org/cgi-bin/netbible.pl?header=on';
             $title = 'New English Translation';
             $chapter = trim(strtok($verse,':'));
             $verses = trim(strtok('-,'));
             $book = scripturizeNETBook($volume.' '.$book);
             $link = sprintf('<a href="%s&book=%s&chapter=%s&verse=%s" title="%s">%s</a>',$link,htmlentities(urlencode($book)),$chapter,$verses,$title,trim($reference));
             break;
        default:
             $link = "http://biblegateway.com/cgi-bin/bible?language=english&version=$translation&passage=";
             $title = 'Bible Gateway';
             $link = sprintf('<a href="%s%s" title="%s">%s</a>',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
             break;
        // should I add Libronix links? perhaps with define constant to enable/disable...
        // see http://www.logos.com/support/lbs/weblinking
        // libronixdls:keylink|ref=[en]bible:Gen%201:1|res=LLS:ESV
    }

In the sections that create the actual link <a href=', you would need to put target="_blank" after title="%s".

I don't think adding this to the public version of the module is a good idea, because I personally dislike it when websites force new windows to be opened.

davidblewett’s picture

Sorry about the double post, the last few sentences got cut off of the first version.

nethome’s picture

Hmmm

It sound logical that such change would make it fixed, but or some reason, it doesn't change the behavior. I made the modification, but it still opens up in the current windows.

Steve Simms’s picture

nethome: Make sure you've changed the node after updating the code -- the pages get cached after the filter is applied.

Steve Simms’s picture

Status: Active » Closed (won't fix)
bbodenmiller’s picture

Try clearing your server cache /admin/settings/performance. Also you could use http://drupal.org/project/extlink and set the option to open all external links in new windows.