![]() |
Open attachments in new window (User Selection)
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 :p
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... |
1 query just for this ?
|
Well if you can come up with a no query way then that would be better, it only took me 15 mins to write the hack, and i found that to be the best way ATM.
|
Quote:
|
i need to add that query too store the info for each user.
|
cool idea
i just hold SHIFT when I click to open any link in a new window (in IE) |
why not just use a user profile field ?
|
you could do that as well.
|
i don't know why they changed this in 3.03. sucks ass
|
Quote:
|
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> Code:
<if condition="(($bbuserinfo[field25]=="yes") OR ("$bbuserinfo[field25]==""))"> target="_blank"</if> |
Was just gonna post that Scotty. :)
|
Quote:
Quote:
And thanks to both |
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> |
nothing is working
|
Quote:
|
You're hack does not work for me.
|
All times are GMT. The time now is 07:00 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|