Great module
How can I make such that the link open in an pop up window?
instead of a full page?

Comments

avpaderno’s picture

Title: How can I make link to opne in pop up window? » How can I make a link open in a pop up window?
wallbay1’s picture

Hi guys
I found a solution by using a second module called lightbox2
and using the lightiframe at the rel="
if anyone knows a better way please let me know

avpaderno’s picture

Category: feature » support

The only way is to use Lightbox2 or any similar modules.
Link allows to open a link in a new window, but that is different from opening it in a pop up window.

avpaderno’s picture

Status: Active » Fixed
wallbay1’s picture

well true. but When you use lightiframe it almost do the job. Almost...lol
it would be good if ligthbox offer a pop function too.

avpaderno’s picture

Title: Open a link in a pop up » How can I make a link open in a pop up window?
Category: feature » support
Status: Active » Fixed

I guess you mean Link not Lightbox.
As in the initial post there were just questions (and the title was a question too), the report was more a support request than a feature request.

avpaderno’s picture

Title: How can I make a link open in a pop up window? » Open a link in a pop up
Category: support » feature
Status: Fixed » Active

It would be nice if the module would have an option to open a link in a pop up window too.

dragonwize’s picture

Title: How can I make a link open in a pop up window? » Open a link in a pop up
Category: support » feature
Status: Fixed » Active

This would be proabably best done with integration with the Thickbox module or similar.

quicksketch’s picture

There's already a checkbox for "Open in new window".

avpaderno’s picture

It's true, but that is different from a pop up window.
A pop up window is usually open from JavaScript, and it doesn't have the full size of a browser window (and it doesn't have a toolbar, or an address bar); differently, a new window is normally created by using a tag like <a href="http://example.com" target="_blank">.

quicksketch’s picture

Ah, right. Then I'd suggest you add JavaScript to the page to make it open only certain links in popups. You can use the target attribute as a guide.

<script>
$(document).ready(function() {
  $('a[target=_blank]').click(function() {
    window.open(this.href, 'popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=300,height=600');");
    return false;
  });
});
<script>

I'd prefer to leave this functionality out of link.module, since it's a lot of unnecessary configuration (see all those options in the JS above) for those just wanting to make links.

avpaderno’s picture

I was just trying to help wallbay1 to express what he wanted.
First, he asked a question about how to open a link handled by Link; then (after he found a module to do that) he said it would be good if Link would offer a pop up function too.

I agree with the maintainer that such functionality should not included in Link, as there are already many modules that allow a link to be opened in a pop up window; they can operate on all the links present in a page, not only on links created from this module.
The feature would create a not necessary duplication of code; the module offers the possibility to change an attribute for the link being created, and this is enough for the other modules to handle the links created from this module in a particular way.

I would rather set this report to won't fix.

quicksketch’s picture

Title: Open a link in a pop up » Open a link in a Lightbox/Thickbox
Category: feature » support
Status: Active » Fixed

Yep, it's out of scope for link.module. I'll mark this as a fixed support request.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.