vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=134)
-   -   Attachment in New Window (User Option) (https://vborg.vbsupport.ru/showthread.php?t=89799)

imported_aceman 09-15-2004 10:00 PM

Attachment in New Window (User Option)
 
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:
Code:

  <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[image_larger_version_x_y_z]</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
Code:

<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:

Code:

The following error occurred when attempting to evaluate this template:

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:

HTML Code:

<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;

HTML Code:

<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.


All times are GMT. The time now is 12:26 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01008 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete