Log in

View Full Version : Attachment in New Window (User Option)


imported_aceman
09-15-2004, 10:00 PM
This mod allows your members to select if they want attached images to appear in the same window (default) or in a new window. This is done by selecting OFF/ON from the USERCP: Thread Viewing Options.

Difficulty: easy
Installation time: 5mins.

Requires the Edit of (1) template, and the creation of a Custom User Profile Field.

Enjoy
Aceman

www.scifi-meshes.com / www.military-meshes.com

fiber1
09-17-2004, 01:21 AM
Screen shot?

imported_aceman
09-17-2004, 02:51 AM
I can't screen shot a new window opening on the click of an attached thumbnail image.

This merely gives the users the option of having fullsized images (attachment) either opening in the existing window, or opening in a NEW window.

Aceman

Tony G
09-17-2004, 04:47 AM
Nice, small, effective mod. :)

SaN-DeeP
10-15-2004, 10:32 AM
OK i tried to install this and i also need some help:
<if condition="$show['gtp_thumbnail_only']">
<img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1" border="0" alt="" title="$vbphrase[gtp_cannot_download]" />
<else />
<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1" border="0" alt="" title="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]">$vbphrase</phrase>" /></a>
</if>
<if condition="$show['br']"><br /><br /></if>
this is my postbit_attachmentthumbnail field. i am using another mod alongwith which just shows thumbnails to guests (got from vb.org)

after replacing this part <a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1" border="0" alt="" title="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]">$vbphrase[image_larger_version_x_y_z]</phrase>" /></a>
</if>
<if condition="$show['br']"><br /><br /></if> with the code you provided in text file I get an error message as follows:

The following error occurred when attempting to evaluate this template:
[i]
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/sandeep/public_html/forums/includes/adminfunctions_template.php(3055) : eval()'d code on line 1

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

How can i use the code provided by you ?

Also a small edit needs to be done in instructions file attached above from you :)
2. Select "Single-Line Text Box".

to be change to 2. Select "Single-Line Text Menu".

Waiting for a reply
Regards,

Limey-YMR
10-30-2004, 04:52 AM
I got this working well, but I think it's a typo where the instructions say to use a single line text input field, it works best with a radio button, placing "On" and "Off" on their own line in the box that appears.

It would be nice to have javascript spawned windows that are fitted to the size of the image, does anyone know if this can be done by dynamically passing the imge size to the script? I can do it with fixed hyperlinks by passing the new window open size dimensions to java like this:

<script>
function openpopup(){
var popurl="b4aft.jpg"
winpops=window.open(popurl,"","width=708,height=788,")
}
function openpopup1(){
var popurl="LS.jpg"
winpops=window.open(popurl,"","width=720,height=700,")
}

and then calling each popup named in "openpopup" with it's own href linked thumbnail;

<td width="25%" height="136" align="center">
<a href="javascript:openpopup()">
<img border="1" src="thumbs/b4aft.jpg" /></a></td>
<td width="25%" height="136" align="center">
<a href="javascript:openpopup1()">
<img border="1" src="thumbs/LS.jpg" /></a></td>

so, anyone know how to "fit" the window to the image like on this page http://www.lovelybrides.com/images/makeup_pictures.htm

Gutspiller
08-01-2005, 07:56 PM
How do I use this with 3.0.7? The instructions making the user profile field don't make sense.