Images doesn't open in new window

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Ideas Centre
Locked
User avatar
kikir6
Registered User
Posts: 26
Joined: Mon Sep 07, 2009 1:26 pm
Location: Croatia
Contact:

Images doesn't open in new window

Post by kikir6 »

After update my style ( Getaway ) to 3.0.6 the image posted with Postimage doesn't open in new window, I have two forums and have the same problem with second forum ( stile Acidtech Red ) after style update.

I instaled complete style ( downloaded from Styles database release )

With Subsliver2 and old Acidtech images opens in new window.

The URL-s posted opens normal in new window.

Please help :(
User avatar
kikir6
Registered User
Posts: 26
Joined: Mon Sep 07, 2009 1:26 pm
Location: Croatia
Contact:

Re: Images doesn't open in new window

Post by kikir6 »

I found difrenece betwen styles when I open " View Source " in IE but I don't know where I need make changes in style. ( Source from viewtopic)

Here you can see difrence betwen Acidtech and Acidtech Red


Acidtech

Code: Select all

<div class="postbody"><a href="http://www.postimage.org/image.php?v=aV1s57Fi" onclick="window.open(this.href);return false;"class="postlink"><img src="http://s4.postimage.org/1s57Fi.jpg" alt="slika" /></a></div>
Acidtech Red

Code: Select all

<div class="postbody"><a href="http://www.postimage.org/image.php?v=aV1s57Fi" class="postlink"><img src="http://s4.postimage.org/1s57Fi.jpg" alt="slika" /></a></div>
That means I nedd to put this code somewere in Acidtech Red, but where :roll:

Code: Select all

onclick="window.open(this.href);return false;"
Nully
Registered User
Posts: 453
Joined: Thu Jan 29, 2009 10:11 pm
Location: France
Contact:

Re: Images doesn't open in new window

Post by Nully »

Hello,
I have it in template/posting_editor.html
But I have Prosilver.

Code: Select all

<a href="javascript:void(0);" onclick="window.open('http://www.postimage.org/index.php?mode=phpbb&lang=french&forumurl=' + escape(document.location.href), '_imagehost', 'resizable=yes,width=800,height=600');return false;">Ajouter une image depuis votre ordinateur</a>
User avatar
kikir6
Registered User
Posts: 26
Joined: Mon Sep 07, 2009 1:26 pm
Location: Croatia
Contact:

Re: Images doesn't open in new window

Post by kikir6 »

Thanks, but I add this to my stile ( this is to open postimage in new window when you post image ) this works OK, but when you click to posted image it doesn't open in new window)
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Images doesn't open in new window

Post by Lumpy Burgertushie »

assuming that you are viewing a topic when you viewed the source.

it would be in the styles/AcidTech/template/viewtopic_body.html filel


download it using ftp, open it in a good text editor, find and make the changes and upload it back to the server.

then, go to your admin panel, styles, choose your style, choose template, click on the refresh link at the right.

reload/refresh your browser and you should see the changes.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
kikir6
Registered User
Posts: 26
Joined: Mon Sep 07, 2009 1:26 pm
Location: Croatia
Contact:

Re: Images doesn't open in new window

Post by kikir6 »

Lumpy Burgertushie wrote:assuming that you are viewing a topic when you viewed the source.
Yes.


I made everything what you suggest but I can't find any difrence or this code.

I tray to replace this file with file from Acidtech ( this stile open postimage pictures in new window ) but it is the same problem.

Acidtech is for 3.0.5 , Subsilver2 is for 3.0.6 and this two styles works OK
User avatar
kikir6
Registered User
Posts: 26
Joined: Mon Sep 07, 2009 1:26 pm
Location: Croatia
Contact:

Re: Images doesn't open in new window

Post by kikir6 »

I found problem. :D

With this change you can fix other subsilver2 based styles. I fix AcidTech Red and Getaway.

Open styles/....../template/bbcode.html

Find:

Code: Select all

<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->

replace with:

Code: Select all

<!-- BEGIN url --><a href="{URL}" onclick="window.open(this.href);return false;" class="postlink">{DESCRIPTION}</a><!-- END url -->
Locked

Return to “[3.0.x] Styles Support & Discussion”