1
DrClaw
PM notification hack. . .
  • 2003/9/17 18:58

  • DrClaw

  • Just popping in

  • Posts: 23

  • Since: 2002/11/5


after messing with this for a few days and getting a little outside help, I have finally found a way to alert members on my site when they have a private message. It isn't a pop-up html window, but it is a java script alert that says, "you have a private message in your inbox"

Copy and Paste this into your user menu block template. You might want to edit the message or make sure that this template doesn't ruin something that you have already customized.

*what is in bold is what is important. . . *


Quote:

<table cellspacing="0">
<tr>
<td id="usermenu">
<a class="menuTop" href="<{$xoops_url}>/user.php"><{$block.lang_youraccount}></a>
<a href="<{$xoops_url}>/edituser.php"><{$block.lang_editaccount}></a>
<a href="<{$xoops_url}>/notifications.php"><{$block.lang_notifications}></a>
<a href="<{$xoops_url}>/user.php?op=logout"><{$block.lang_logout}></a>
<{if $block.new_messages > 0}>
<a class="highlight" href="<{$xoops_url}>/viewpmsg.php"><{$block.lang_inbox}> (<span style="color:#FF0000; font-weight: bold;"><{$block.new_messages}></span>)
</a>

<script>if(document.cookie.indexOf('mail=')<0){alert('you have a private message in your inbox'); document.cookie='mail=notified'}</script>

<{else}>

<script>document.cookie='mail= '</script>

<a href="<{$xoops_url}>/viewpmsg.php"><{$block.lang_inbox}></a>
<{/if}>
<{if $xoops_isadmin}>
<a href="<{$xoops_url}>/admin.php"><{$block.lang_adminmenu}></a>
<{/if}>
</td>
</tr>
</table>


There you go, post any suggestions that you may have. Hope it works for everyone


oh yea, if you want to see it in action, sign up at my sitehttp://minusdriven.com and send yourself some messages. Send me one too if you get bored, my name there is [nathan]

2
hamilton
Re: PM notification hack. . .
  • 2003/9/18 23:27

  • hamilton

  • Just popping in

  • Posts: 1

  • Since: 2003/8/28


This is nice and easy. Thanks for the tip. I've already put it in place. Thanks again!

3
pcracer
Re: PM notification hack. . .
  • 2003/12/5 2:35

  • pcracer

  • Just popping in

  • Posts: 31

  • Since: 2003/10/23


Quote:

hamilton wrote:
This is nice and easy. Thanks for the tip. I've already put it in place. Thanks again!


Ditto!

Sweeet & Simple...works like a champion!

THX!

4
CBlue
Re: PM notification hack. . .

I'm using it too and it works great. But...sometimes when I click on the ok button of the alert and then click on my inbox, the alert will pop up again for the same message and not any new ones. Other than that, it is great having this alert on my sites.

Login

Who's Online

176 user(s) are online (134 user(s) are browsing Support Forums)


Members: 0


Guests: 176


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits