using iframe need any image description links to open new window?
mjindustry
![]()
Joined: 2011-04-27
Posts: 16 |
![]() |
I searched google for "bbc open in new window" and a thread here popped up but its really old. So I was wondering if anyone knows how I can put external links in my image titles/descriptions that will open in a new windows? I want to use a some linkage to get user back to main site after viewing images in Gallery2 should they have entered through a Google search and be outside my iframe. Thanks for any help! |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
try embedding w/out the iframe. -s |
|
mjindustry
![]()
Joined: 2011-04-27
Posts: 16 |
![]() |
Thanks suprsidr, appreciate the help. I tried without the iframe and it seems like the same result, no new window. Your site looks amazing! The G2 Bridge is very interesting, I wish it was for joomla as well!! 80 I got some screen to show what I'm trying here on my current install.. |
|
mjindustry
![]()
Joined: 2011-04-27
Posts: 16 |
![]() |
holy crap that screen shot is 681KB !! |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
you can include jQuery in your page somewhere(joomla may already) <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> <script type="text/javascript"> jQuery('#gsThumbMatrix a').each(function(){ $(this).attr('target', '_blank') }); </script>
-s |
|
mjindustry
![]()
Joined: 2011-04-27
Posts: 16 |
![]() |
Wow , that would be pretty cool! I have no idea where to even put that though. Can we do it for just the Gallery2 pages and not all of my joomla pages? |
|
mjindustry
![]()
Joined: 2011-04-27
Posts: 16 |
![]() |
Appreciate the help btw! I might just have to build my next site with geeklog<>gallery2 |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
you can add my code to the bottom of gallery2/themes/your theme/templates/local/album.tpl <- you can copy the original here. <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> <script type="text/javascript"> {literal} jQuery('#gsThumbMatrix a').each(function(){ $(this).attr('target', '_blank') }); {/literal} </script> both the carbon and matrix themes make use of gsThumbMatrix, another theme may use another element. |
|
mjindustry
![]()
Joined: 2011-04-27
Posts: 16 |
![]() |
I thought that might be the spot. Didn't seem to work though, no change visible on front end. Could I just add a html banner in the album.tpl? I just need to figure out how to position something. Directly under the large image might be a good spot, I think. Then I could use the previous spot for descriptions. btw the album is here... (little banner in bottom right side) Here it is with iframe in joomla: |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
photo.tpl displays the individual photos whereas album.tpl displays the thumbs. BTW from here the thumbs do force a new window which is what I thought was the idea. -s |
|
mjindustry
![]()
Joined: 2011-04-27
Posts: 16 |
![]() |
Wow, thats pretty cool, seems a little heavy on the new windows though. Is there a way to make just the little banner in description area open a new window from page view ? If not, perhaps I can hard code a similar banner into the photo page with html and include the target=_blank ? Would do that in photo.tpl ? |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
in photo.tpl where you want the link to show use something similar to: <a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$theme.item.id`"}" target="_blank">View in new window</a> if you want to show just the image in the new window: <a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$theme.item.id`"}" target="_blank">View in new window</a> of course you can substitute and image for the text. -s |
|
mjindustry
![]()
Joined: 2011-04-27
Posts: 16 |
![]() |
thanks for all the help suprsidr. I can't get that to work. check this out! I think we can get this using the bbc codes. I think we make the changes in lib>smarty_plugins>modifier.markup. I found an old thread Now I'm close to getting it. But the code in there is a little different now then when that post was made. I can't get the target=_blank to work in here? Quote:
return sprintf('<img src="%s" alt=""%s/>', $content, $size); No matter how I put the target=_blank it doesn't quite work. This is where we can make this happen though! I think. 8 |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
nope -s |
|
Dayo
Joined: 2005-11-04
Posts: 1642 |
![]() |
mjindustry wrote:
The G2 Bridge is very interesting, I wish it was for joomla as well!! His stuff is indeed great. Good news for you is that the JoomG2 Bridge, which does away with JFusion, the iframes it comes with and the attendant issues, is undergoing beta testing and will be released shortly. -- |
|