The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Images
How does one get an image to open in a new window (globally) after clicking on it?
There is a setting, I have seen it but forgotten... Thanks again... |
#2
|
|||
|
|||
In HTML you would use something like this:
HTML Code:
<a href="http://www.site.com/pic.jpg" target="_blank">
http://www.w3schools.com/tags/att_a_target.asp A more elegant method is by JavaScript, but it also has it problems. Code:
window.open(filePath + 'image.jpg','','width=640,height=480') (or simpler) window.Open("http://www.site.com/yourimage.gif"); HTML Code:
<a href="#" onClick="window.open('image.jpg', '_blank', 'width=640, height=480,scrollbars=no');"><img src="image.jpg" /></a> (or more complete) <a href="imagePage.html" target="_blank" onClick="window.open('image.jpg', '_blank', 'width=640, height=480, left=100,top=100,scrollbars=no');return false"><img src="image.jpg" alt="" class="your_css_class"/></a> |
#3
|
||||
|
||||
Is there no setting within vB ACP?
We have images stored within threads and articles and a user clicks on the images and they open up in the same window. The user then closes the image but this then closes the site. tbworld, you are a wizard... I have all problems solved for the moment... The javascript element of which you are talking about is unnecessary.. I do not want to complicate this effort right now, it as taken me an age to get to this stage.. But, have to say, I am tempted by your more elegant method...I look forward to your pending attachment....:up: |
#4
|
|||
|
|||
The examples are simple methods and you can see examples of this throughout vBulletin code. What I was trying to show, is that it does not require extensive coding to do something simple. Most users just want to do something simple.
|
Благодарность от: | ||
DemOnstar |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|