one piece

站内短信增强!MOD

站内短信增强!浏览器开启阻止跳出窗口的也能正常显示新短消息!

打开文件 includes/page_header.php

找到:

  1. 'L_PRIVATEMSGS' => $lang['Private_Messages'],

后面加

  1. 'L_PRIVATEMSG_NEW' => ($userdata['user_new_privmsg'] == 1) ? $lang['You_new_pm'] : $lang['You_new_pms'],
  2.     'L_CLOSE_WINDOW' => $lang['Close_window'],
  3.     'L_MESSAGE' => sprintf($lang['Click_view_privmsg'], '<a href="' . append_sid("privmsg.".$phpEx."?folder=inbox") . '">', '</a>'),

打开文件 templates/subSilver/overall_header.tpl
找到:

  1. <!-- BEGIN switch_enable_pm_popup -->
  2.  <script language="Javascript" type="text/javascript">
  3.  <!--
  4.     if ( {PRIVATE_MESSAGE_NEW_FLAG} )
  5.     {
  6.        window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
  7.     }
  8.  //-->
  9.  </script>
  10.  <!-- END switch_enable_pm_popup -->

替换为:

  1. <!-- BEGIN switch_enable_pm_popup -->
  2.  <table id="new_pm_popup" class="forumline" border="0" cellspacing="1" cellpadding="4" style="position: absolute; top: 25%; left: 25%; height: 125px; width: 400px; display: none;">
  3.    <tr>
  4.      <td valign="top" class="row1" align="center">
  5.        <br />
  6.        <span class="gen">{L_PRIVATEMSG_NEW}<br /><br />{L_MESSAGE}</span><br /><br />
  7.        <span class="genmed"><a href="" onClick="getElementById('new_pm_popup').style.display = 'none'; return false;" class="genmed">{L_CLOSE_WINDOW}</a></span><br /><br />
  8.      </td>
  9.    </tr>
  10.  </table>
  11.  
  12.  <script language="javascript" type="text/javascript">
  13.  <!--
  14.     if ( {PRIVATE_MESSAGE_NEW_FLAG} )
  15.     {
  16.        pmWindow = window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');
  17.        if (!window.pmWindow)
  18.        {
  19.           document.getElementById('new_pm_popup').style.display = 'inline';
  20.        }
  21.     }
  22.  //-->
  23.  </script>
  24.  <!-- END switch_enable_pm_popup -->

完成!看看修改后的效果!

Created By: sb123

Form Page: 站内短信增强!MOD


Leave a Reply

You must be logged in to post a comment.