Update of /var/cvs/contributions/didactor2/src/shoutbox/blocks
In directory james.mmbase.org:/tmp/cvs-serv18715/blocks

Modified Files:
        menu.jspx 
Log Message:
don't count your own messages


See also: 
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/shoutbox/blocks


Index: menu.jspx
===================================================================
RCS file: /var/cvs/contributions/didactor2/src/shoutbox/blocks/menu.jspx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- menu.jspx   22 Oct 2008 09:03:46 -0000      1.4
+++ menu.jspx   30 Oct 2008 16:51:48 -0000      1.5
@@ -4,6 +4,17 @@
     xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0";
     version="2.0">
 
+  <mm:cloud jspvar="cloud" method="asis">
+    <jsp:scriptlet>
+      // TODO, there should be an easier way to get the current user.
+      // Didactor of course provides requestScope.user, but we want these jsps 
to be didactor independent.
+
+      org.mmbase.framework.Framework fw = 
org.mmbase.framework.Framework.getInstance();
+      org.mmbase.util.functions.Parameters params = fw.createParameters();
+      params.setIfDefined(org.mmbase.util.functions.Parameter.CLOUD, cloud);
+      pageContext.setAttribute("currentuser", fw.getUserNode(params));
+    </jsp:scriptlet>
+  </mm:cloud>
   <div class="menuSeperator"><jsp:text> </jsp:text></div>
   <div class="menuItem">
     <mm:link>
@@ -19,6 +30,7 @@
           </mm:functioncontainer>
           <mm:relatednodescontainer type="shouts">
             <mm:constraint field="time" operator="GT" value="${lastcheck}" />
+            <mm:constraint field="from" operator="NE" 
value="${currentuser.number}" />
             <jsp:text> (<mm:size />)</jsp:text>
           </mm:relatednodescontainer>
         </mm:hasnodemanager>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to