Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Open attachments in new window (User Selection) Details »»
Open attachments in new window (User Selection)
Version: 1.00, by Logikos Logikos is offline
Developer Last Online: Sep 2023 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 07-18-2004 Last Update: Never Installs: 4
 
No support by the author.

This will give your users the option to open attachments in a new window. I wrote this cause i see some people like the fact that vB doesn't open a new window for attachments. But some people do like that, like myself. So why not make everyone happy

Querys: 1
File Edits: 1 (profile.php)
Template Edits: 2
Phrases: 1
ScreenShote: Attached.


If there are any problems, please post them here as i only tested on my local boards. I will support this. And give updates if there are bugs found.

Please click the install button if you use.

Enjoy!



you want this hack? Go to my site...

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 07-20-2004, 08:17 AM
scotty's Avatar
scotty scotty is offline
 
Join Date: Oct 2001
Location: Mannheim, Germany
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

there is a way to implement that feature *without* hacking the files (/me looks at zachery ):

- add a new user profile field: Single-Selection Radio Buttons
- title: "Open attachment in new window?"
- in options put "yes" and "no"
- after creating the field, remember the field number (e.g. 25)
- look into the "postbit_attachment*" templates and put into the href-tag (just before the closing ">" the following condition:
Code:
<if condition="($bbuserinfo[field25]=="yes")"> target="_blank"</if>
if you would like to make it standard, then put the following condition inside:
Code:
<if condition="(($bbuserinfo[field25]=="yes") OR ("$bbuserinfo[field25]==""))"> target="_blank"</if>
questions?
Reply With Quote
  #13  
Old 07-20-2004, 10:19 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Was just gonna post that Scotty.
Reply With Quote
  #14  
Old 07-20-2004, 11:14 PM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by scotty
<if condition="($bbuserinfo[field25]=="yes")"> target="_blank"<if>
Quote:
Originally Posted by scotty
<if condition="(($bbuserinfo[field25]=="yes") OR ("$bbuserinfo[field25]==""))"> target="_blank"<if>
isn't the last <if> in both line supposed to be </if>

And thanks to both
Reply With Quote
  #15  
Old 07-21-2004, 12:55 AM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you still wanted xhtml compliance regardless of what the user has selected, why not use onclick="if(window.open(this.href)) return false" as the statement in the conditional?

EDIT://
Code:
<if condition="$bbuserinfo[fieldxx]=='Yes'||$bbuserinfo[fieldxx]==''"> onclick="window.open(this.href);return false;"</if>
This works
Reply With Quote
  #16  
Old 07-21-2004, 03:28 AM
cnczone cnczone is offline
 
Join Date: Mar 2003
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nothing is working
Reply With Quote
  #17  
Old 07-21-2004, 09:51 AM
scotty's Avatar
scotty scotty is offline
 
Join Date: Oct 2001
Location: Mannheim, Germany
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Merjawy
isn't the last <if> in both line supposed to be </if>
sorry, you are right!
Reply With Quote
  #18  
Old 07-21-2004, 07:25 PM
cnczone cnczone is offline
 
Join Date: Mar 2003
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're hack does not work for me.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:02 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04242 seconds
  • Memory Usage 2,273KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete