oglsmm
04-15-2005, 06:21 PM
I have a link to my vBchat section on a seperate page. How do I make this link open up the chat into a seperate smaller window, instead of the full screen one it does by default.
Sarizaddi
04-21-2005, 03:13 PM
In your Admin Templates, you changed a few, one of them being "navbar". Go back into your control panel, Styles & Templates, Style Manager, select "Edit Templates", expand all "[<< >>]", go back to modify the "navbar" template.
The code you added should've been:
<script type="text/javascript">
<!--
function OpenvBChat(){
vBChat = window.open('vBChat.php?$session[sessionurl]','vBChat','directories=no,height='+window.screen. height+',width='+window.screen.width+',location=no ,menubar=no,scrollbars=yes,status=no,toolbar=no')
return false;
}
-->
</script>
<td class="vbmenu_control"><a href="vBChat.php?$session[sessionurl]" onclick="return OpenvBChat();">vBChat</a></td>
take that out and substitute instead:
<script type="text/javascript">
<!--
function OpenvBChat(){
var ws = screen.width*0.85;
var hs = screen.height*0.7;
var winParms = "height=" + hs + ",width=" + ws + "directories=no,location=no,menubar=no,scrollbars=y es,status=no,toolbar=no,resizable";
vBChat = window.open('vBChat.php?$session[sessionurl]','vBChat',winParms)
return false;
}
-->
</script>
<td class="vbmenu_control"><a href="vBChat.php?$session[sessionurl]"
In the above, you will see "var ws = screen.width*0.85;" and "var hs = screen.height*0.7;" In there, Screen Width is a percentage, currently being 85% of the user's screen. Same with Height, at 70%. You can manually adjust these, like if you wanted 90% and 90% you'd use .9 and .9
Doing this will not only allow it to pop up in a smaller window, but will also allow it to be user resizable.
Please note in the snippet, the forum is adding a space in resizable, making it "resiza ble" I can not correct that in my post, but it needs to be corrected before you insert it in the navbar template.
greenhybrid
04-25-2005, 08:37 PM
Or, you can just make it open in a new window/tab by taking out the javascript and replacing the onclick function with target="_blank" in the links to it.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.