The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
New PM Popup Replacement Details »» | |||||||||||||||||||||||||
[high]PLEASE CLICK INSTALL IF YOU INSTALL THIS[/high]
This mod changes the default New PM Popup to open a nice looking, closeable html popup within the page. It tells you who sent the latest message as well as what the title is. The window then gives you the option of viewing the message (in which case it opens another window and closes itself), viewing your inbox (again it will close the popup), or to just ignore the new message and close the New PM popup. A screenshot is attached to show you what the popup will look like. To install all you need to do is make 1 template edit to each of your skins, upload 1 XML plugin file, and upload 1 file with your ftp client. [high]Installation[/high] First go to your pm_popup_script template and replace it with this code: HTML Code:
<script type="text/javascript" src="clientscript/fixed_position_ie.js"></script> <script type='text/javascript'> var agtbrw=navigator.userAgent.toLowerCase(); var operaaa=(agtbrw.indexOf('opera')!=-1); var head="display:''"; var folder=''; function expandit(curobj) { if(document.getElementById(curobj)) { folder=document.getElementById(curobj).style; } else { if(ns6==1||operaaa==true) { folder=curobj.nextSibling.nextSibling.style; } else { folder=document.all[curobj.sourceIndex+1].style; } } if (folder.display=="none") { folder.display=""; } else { folder.display="none"; } } </script> <style type="text/css"> #pm_popup { position:fixed; top:250px; border:1px solid; width:64%; margin-right:18%; margin-left:18%; } </style> <div id="pm_popup"> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"> <tr> <td class="tcat"> <span class="smallfont" style="float:$stylevar[right]"> <a href="#" onclick="expandit('pm_popup');">Close</a> </span> $vbphrase[new_private_msg] </td> </tr> <tr> <td class="panelsurround" align="center"> <div class="panel"> <div align="center"> <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0"> <tr> <td> $vbphrase[newest_pm_from] <b>$newpm[fromusername]</b>, $vbphrase[titled]<b>'$newpm[title]'</b> <br /> </td> </tr> <if condition="$shownewpmpreview"> <tr> <td class="smallfont" style="padding-top:20px;"> $newpm[message] </td> </tr> </if> <tr> <td align="center" style="padding-top:20px;"> <a href="$vboptions[bburl]/private.php?do=showpm&pmid=$newpm[pmid]">$vbphrase[read_message]</a> (<a href="$vboptions[bburl]/private.php?do=showpm&pmid=$newpm[pmid]" target="_blank"> <span class="smallfont">$vbphrase[open_new_window]</span> </a>) <br /><br /> <a href="$vboptions[bburl]/private.php">$vbphrase[go_to_inbox]</a> </td> </tr> </table> </div> </div> <div style="margin-top:$stylevar[cellpadding]px"> <form> <input type="button" class="button" value="$vbphrase[close_popup]" onclick="expandit('pm_popup');" /> </form> </div> </td> </tr> </table> </div> Next, go to the plugin manager: Go to your admincp -> Expand Plugin System in the nav -> Click Manage Products -> Scroll to the bottom of the page and click Add/Import -> Browse to the xml file included in the zip -> upload Now access your FTP and upload the attached 'fixed_position_ie.js' file to your clientscript/ folder. This js allows Internet Explorer to do fixed positioning meaning that the popup stays in place as you scroll the screen. That's it, enjoy. [high]How To Enable Preview[/high] To enable the preview in the popup (view the screenshot to see what it looks like), just edit the plugin called "New PM Popup Window Preview" with the following instructions: Go to your admincp -> Expand Plugin System in the nav -> Click Plugin Manager -> Click edit next to the "New PM Popup Window Preview" plugin Now find, right at the top, this line: $newpmoption['showpreview'] = false; Change to: $newpmoption['showpreview'] = true; The preview is now enabled. To change how many characters are shown in the preview, go back to editing the plugin and change this line (near the top): $newpmoption['maxcharacters'] = 100; [high]To uninstall this hack just revert the pm_popup_script template then delete the uploaded file (/clientscript/fixed_position_ie.js) and the plugin.[/high] Thanks to COBRAws for adding phrases. Tested and works fully in the vB3.5 series (vb 3.5.0 ("Gold") up to 3.5.4). Should work in vb3.6, the variables look to be the same. This will probably work in vb3.0 series too but I don't remember if I've tested. I'm not promising. If anyone wants to confirm that it fully works please PM me or post here. Supporters / CoAuthors Show Your Support
|
Comments |
#72
|
|||
|
|||
Quote:
AWI - I'm trying to center it also. I'll let you know if I figure it out. ReadOrDie - did you read this thread for directions? |
#73
|
|||
|
|||
Quote:
You have to go into the PM script template and change: HTML Code:
<div align="$stylevar[left]">
HTML Code:
<div align="center">
|
#74
|
||||
|
||||
To fix the resizing problem change this:
Code:
onclick='window.open("private.php?do=showpm&pmid=$newpm[pmid]", "pmbox", "menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=ye s,top=50,left=50");expandit("pm_popup");window.focus("pmbox");' Code:
onclick='window.open("private.php?do=showpm&pmid=$newpm[pmid]", "pmbox", "menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,top=50,left=50");expandit("pm_popup");window.focus("pmbox");' Code:
onclick='window.open("private.php", "pmbox", "menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=ye s,top=50,left=50");expandit("pm_popup");window.focus("pmbox");' Code:
onclick='window.open("private.php", "pmbox", "menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=ye s,top=50,left=50");expandit("pm_popup");window.focus("pmbox");' |
#75
|
|||
|
|||
I installed the hack. Nothings popping up.
|
#76
|
|||
|
|||
ummm... shouldn't this:
HTML Code:
resizable=ye s HTML Code:
resizable=yes |
#77
|
|||
|
|||
Nothings popping up.
|
#78
|
|||
|
|||
Nice idea for a hack. If it worked it'd be better.
|
#79
|
||||
|
||||
Quote:
I fixed this by putting a space somewhere else so it wont do that anymore. |
#80
|
|||
|
|||
your pm pop up still displays the pm box at the bottom of my sreen. I uploaded the file to clientscript folder. I am using IE explorer.
I attatched a screen shot of it showing and cutting my pm text off and showing it at the bottom of my page. |
#81
|
||||
|
||||
Quote:
Thanks Bubble, everything is nice and centered now. I had a problem with the popup being in the far right side of the screen but fixed it by changing the margin-right and margin-left to -30% |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|