LGforum (2803)
tips - Simple Private Message Pop Up Vote_lcaptips - Simple Private Message Pop Up Voting_bartips - Simple Private Message Pop Up Vote_rcap 
Mr.Easybb (1586)
tips - Simple Private Message Pop Up Vote_lcaptips - Simple Private Message Pop Up Voting_bartips - Simple Private Message Pop Up Vote_rcap 
Bloodbath (745)
tips - Simple Private Message Pop Up Vote_lcaptips - Simple Private Message Pop Up Voting_bartips - Simple Private Message Pop Up Vote_rcap 
Rukiafan (533)
tips - Simple Private Message Pop Up Vote_lcaptips - Simple Private Message Pop Up Voting_bartips - Simple Private Message Pop Up Vote_rcap 
Dom (513)
tips - Simple Private Message Pop Up Vote_lcaptips - Simple Private Message Pop Up Voting_bartips - Simple Private Message Pop Up Vote_rcap 
puppycheese (446)
tips - Simple Private Message Pop Up Vote_lcaptips - Simple Private Message Pop Up Voting_bartips - Simple Private Message Pop Up Vote_rcap 
pedro (330)
tips - Simple Private Message Pop Up Vote_lcaptips - Simple Private Message Pop Up Voting_bartips - Simple Private Message Pop Up Vote_rcap 
Neymar (301)
tips - Simple Private Message Pop Up Vote_lcaptips - Simple Private Message Pop Up Voting_bartips - Simple Private Message Pop Up Vote_rcap 
Hitsu (281)
tips - Simple Private Message Pop Up Vote_lcaptips - Simple Private Message Pop Up Voting_bartips - Simple Private Message Pop Up Vote_rcap 
Flora (275)
tips - Simple Private Message Pop Up Vote_lcaptips - Simple Private Message Pop Up Voting_bartips - Simple Private Message Pop Up Vote_rcap 


Simple Private Message Pop Up

LGforumLGforum
Status : Working to restore AWC!

Posts : 2803
Join date : 2011-10-05
Age : 27
Location : UK
Tue 30 Oct 2012, 14:41
One thing I've always hated is the Forumotion private message popup, because it's focused on in the Javascript, it seems to freeze all other Javascript.

However, with template editing we can remove that pop up and replace it with something much better, very easily.

Visit your [ic]overall_header[/ic] template[tip]Found at ACP - Display - Templates: General[/tip] and find this:
Code:
[panda=html]      <!-- BEGIN switch_enable_pm_popup -->
        pm = window.open('{U_PRIVATEMSGS_POPUP}', '_faprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');
        pm.focus();
      <!-- END switch_enable_pm_popup -->
Delete it and that gets rid of the horrible pop up that ruins everything.

Now scroll down your [ic]overall_header[/ic] template until you find the [ic]<body>[/ic] tag. It should be near the <!-- BEGIN hitskin_preview --> loop and may have attributes.

Add this below the [ic]<body>[/ic] tag:
Code:
[panda=html]<!-- BEGIN switch_enable_pm_popup -->
  <div id="LGpm">
    <a href="/privmsg?folder=inbox">You have new private messages in your inbox</a>
    <br />
    <br />
    <a onclick="this.parentNode.style.display='none';">Close</a>
  </div>
<!-- END switch_enable_pm_popup -->
Now due to it being within the PM pop up conditional statement, that element/html will only be on the page when the user has a new PM. So all that needs doing is some CSS to style it, feel free to add your own CSS, here is some to get you started:

Code:
[panda=css]#LGpm {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #137ADA;
    padding: 20px 40px;
    border: 1px solid #1652EC;
    font-size: 1.3em;
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    box-shadow: inset 0 20px 20px #4392E7, -1px 5px 25px #193466;
    -moz-box-shadow: inset 0 20px 20px #4392E7, -1px 5px 25px #193466;
    -webkit-box-shadow: inset 0 20px 20px #4392E7, -1px 5px 25px #193466;
}
#LGpm a {
    color: white;
    text-shadow: 0 1px blue;
    font-weight: bold;
    text-decoration: none;
}

So you should now have a nice custom pop up in the top corner when you receive a new PM. Much nicer Smile

To do the same with the report pop up, see this post: http://www.avacweb.com/t548-simple-private-message-pop-up#6462

#tips
ShadowShadow
Status : No status yet...

Posts : 232
Join date : 2011-11-09
Location : Serbia
Tue 30 Oct 2012, 15:17
you saved me! thanks a lot lg, but is there a feature for box to stay till someone click to read pm on blue box because when you refresh page it dissapear.
avatarGuest
Tue 30 Oct 2012, 15:18
Very nice're a true master LGforum.
Respect for you
omgomg
Status : No status yet...

Posts : 25
Join date : 2012-07-15
Tue 30 Oct 2012, 15:26
You made my day, LG Very Happy
AconitinAconitin
Status : No status yet...

Posts : 115
Join date : 2012-09-17
Location : Earth
Wed 28 Nov 2012, 13:51
How about Report Pop-Up?
How to remove it and make other Pop-Up like PM Pop-Up in this topic? Wink
LGforumLGforum
Status : Working to restore AWC!

Posts : 2803
Join date : 2011-10-05
Age : 27
Location : UK
Mon 03 Dec 2012, 17:56
[iq="Aconitin"]How about Report Pop-Up?[/iq] Sorry for delayed reply, yes you can do this for the report pop up in the same way.

Find this in your [ic]overall_header[/ic] template:
Code:
[panda=html]<!-- BEGIN switch_report_popup -->
   report = window.open('{switch_report_popup.U_REPORT_POPUP}', '_phpbbreport', 'HEIGHT={switch_report_popup.S_HEIGHT},resizable=yes,scrollbars=no,WIDTH={switch_report_popup.S_WIDTH}');
   report.focus();
<!-- END switch_report_popup -->

And replace it with this:
Code:
[panda=html]<!-- BEGIN switch_report_popup -->
  <div id="LGreport">
    <a href="/report.forum">1 or more posts have been reported!</a>
    <br />
    <br />
    <a onclick="this.parentNode.style.display='none';">Close</a>
  </div>
<!-- END switch_report_popup -->

Then in the CSS which you added from the first post, change this line: [ic]#LGpm[/ic] to this: [ic]#LGpm, #LGreport[/ic] and then this line [ic]#LGpm a[/ic] to this [ic]#LGpm a, #LGreport a[/ic] and then you're all done.
lightningterrorlightningterror
Status : No status yet...

Posts : 102
Join date : 2012-11-02
Fri 07 Dec 2012, 14:25
Make sure you paste the code above the script tag instead below it(by default) or the popup will not work (phpbb2) , not sure about PunBB

this is how it should look like

Code:
<!-- BEGIN switch_report_popup -->
  <div id="LGreport">
    <a href="/report.forum">1 or more posts have been reported!</a>
    <br />
    <br />
    <a onclick="this.parentNode.style.display='none';">Close</a>
  </div>
<!-- END switch_report_popup -->
   <script type="text/javascript">//<![CDATA[
   $(document).ready(function(){
      <!-- BEGIN switch_ticker -->
AconitinAconitin
Status : No status yet...

Posts : 115
Join date : 2012-09-17
Location : Earth
Mon 10 Dec 2012, 07:27
I put the Report Pop-Up below the <body> tag like PM Pop-Up..
Am I doing right? Wink
AconitinAconitin
Status : No status yet...

Posts : 115
Join date : 2012-09-17
Location : Earth
Mon 10 Dec 2012, 08:24
And I have CSS issue..
Look at this ScreenShot : https://i.servimg.com/u/f49/17/39/87/65/css10.png
The Pop-Up box appear behind my forum banner..
Maybe it because my custom CSS..

Code:
[panda=css]#i_logo:hover{
transition-duration:1.0s;
-moz-transition-duration:.5s;
-webkit-transition-duration:1.0s;
-o-transition-duration:1.0s;
-webkit-transform:rotate(0deg) scale(1.0) skew(1deg) translate(0px);
-moz-transform:rotate(0deg) scale(1.0) skew(1deg) translate(0px);
-o-transform:rotate(0deg) scale(1.0) skew(1deg) translate(0px);
-moz-opacity:.6;
opacity:1.0;
filter:alpha(opacity=40)
}
#i_logo{
transition-duration:.5s;
-moz-transition-duration:.5s;
-webkit-transition-duration:.5s;
-o-transition-duration:.5s;
-webkit-transform:rotate(0deg) scale(0.9) skew(1deg) translate(0px);
-moz-transform:rotate(0deg) scale(0.9) skew(1deg) translate(0px);
-o-transform:rotate(0deg) scale(0.9) skew(1deg) translate(0px);
-moz-opacity:.6;
opacity:.9;
filter:alpha(opacity=40);
-moz-transition-duration:.8s;
-webkit-transition-duration:.8s;
-o-transition-duration:.8s
}

How to fix it?
TubilokTubilok
Status : No status yet...

Posts : 227
Join date : 2012-10-24
Location : Spain
Mon 10 Dec 2012, 09:26
Add:
Code:
[panda=css]#LGpm {
z-index: 999;
}
puppycheesepuppycheese
Status : No status yet...

Posts : 446
Join date : 2013-02-12
Age : 27
Location : New Jersey
Mon 04 Mar 2013, 01:56
This is so much better then the old pop up message notification! Smile
Sponsored content