| Re: New messages in theme as smarty; how to? |
| by supermario on 2005/12/21 21:24:04 Thanks very much! It works perfectly on my site, and my users will be quite appreciative! Thanks again! |
| Re: New messages in theme as smarty; how to? |
| by NeoFenix on 2005/12/20 16:29:43 Wonderful hack! ..... but I'm using x-ipb for forum control .... so isn't working for me .... please, help! |
| Re: New messages in theme as smarty; how to? |
| by tjnemez on 2005/12/13 4:06:19 shank, it was the space, thanks alot for your help. |
| Re: New messages in theme as smarty; how to? |
| by AAINC on 2005/12/13 3:58:04 This still works. Create a php file and name it ex_assign.php ex_assign.php Put ex-assign.php inside the THEME folder. Now call ex_assign.php into theme by placing the below code right after the body statement in the theme.html. le="color: #000000"><?php <{include_php file="$xoops_rootpath/themes/YOUR_THEME_NAME_HERE/ex_assign.php"}> Now place the below code where you want the message alert to go inside the theme.html le="color: #000000"><?php <{if $ex_new_messages < 1}> <a href="<{$xoops_url}>/viewpmsg.php">Private Messages</a> <{/if}> <{if $ex_new_messages > 0}> <{if $smarty.server.SCRIPT_NAME == "/index.php"}> <script language="javascript" type="text/javascript"> <!-- msg="<b>Hello! <{$xoops_uname}></b><br />You have <span style='color:#ff0000; font-weight: bold;'><{$ex_new_messages}></span> new Message(s)"; openwin (msg) function openwin(message) { w = open("", "message", "width=250,height=150,toolbar=no,scrollbars=yes,resizable=yes"); w.focus(); w.document.open(); w.document.write("<html><head></head><meta http-equiv='content-type' content='text/html; charset=<{$xoops_charset}>' /><title>You've Got Messages</title><body><br><br><center>"); w.document.write(message); w.document.write("<br /><br /><a href="javascript:window.opener.location='<{$xoops_url}>/viewpmsg.php';window.close();">"); w.document.write("View</a>"); w.document.write("</center></body></html>"); w.document.close(); } // --> </script> <{/if}> <a href="<{$xoops_url}>/viewpmsg.php"> <span style="color:#ff6600;"><{$ex_new_messages}>-Message(s) </span></a> <{/if}> With this you not only have a Red link saying how many new messages you have, when you return to front page a popup tells you also. If no new messages it just says "Private Message, linking to the inbox. I am sure someone could clean up and update, but this works in XOOPS 2 XOOPS 2.2 and XOOPS 2.2.3a. |
| Re: New messages in theme as smarty; how to? |
| by shank on 2005/12/13 2:48:10 Quote:
Try smarty debug. Also you may have to set in preferances to update template from theme folder. |