pvollenweider    2005/04/26 15:51:35 CEST

  Modified files:        (Branch: JAHIA-4-1-BRANCH)
    src/view/jsp/include blog_definitions.inc blog_entries.inc 
                         blog_entry.inc declarations.inc 
                         guestbook.inc 
  Log:
  Add emoticons
  
  Revision  Changes    Path
  1.1.2.12  +4 -2      
corporate_portal_templates/src/view/jsp/include/blog_definitions.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/blog_definitions.inc.diff?r1=1.1.2.11&r2=1.1.2.12&f=h
  1.1.2.17  +4 -4      
corporate_portal_templates/src/view/jsp/include/blog_entries.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/blog_entries.inc.diff?r1=1.1.2.16&r2=1.1.2.17&f=h
  1.1.2.24  +2 -2      
corporate_portal_templates/src/view/jsp/include/blog_entry.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/blog_entry.inc.diff?r1=1.1.2.23&r2=1.1.2.24&f=h
  1.6.4.5   +43 -0     
corporate_portal_templates/src/view/jsp/include/declarations.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/declarations.inc.diff?r1=1.6.4.4&r2=1.6.4.5&f=h
  1.1.4.1   +0 -45     
corporate_portal_templates/src/view/jsp/include/guestbook.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/guestbook.inc.diff?r1=1.1&r2=1.1.4.1&f=h
  
  
  
  Index: blog_definitions.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/Attic/blog_definitions.inc,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- blog_definitions.inc      26 Apr 2005 13:27:15 -0000      1.1.2.11
  +++ blog_definitions.inc      26 Apr 2005 13:51:34 -0000      1.1.2.12
  @@ -12,9 +12,11 @@
           value="<%=jData.params().getUser().getUsername()%>"
           titleKey="blog.author" bundleKey="<%=resBundleID%>"/>
       <content:declareField name="excerpt"
  -            title="The Excerpt of this post" type="BigText" />
  +            title="The Excerpt of this post" type="BigText"
  +            titleKey="blog.excerpt" bundleKey="<%=resBundleID%>"/>
       <content:declareField name="keyWords"
  -            title="Comma seperated Keywords for this post" type="SmallText" 
/>
  +            title="Comma seperated Keywords for this post" type="SmallText"
  +            titleKey="blog.keyWords" bundleKey="<%=resBundleID%>"/>
   
       <content:declareContainerList name="comments" title="List of comments">
       <content:declareContainer>
  
  
  
  Index: blog_entries.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/Attic/blog_entries.inc,v
  retrieving revision 1.1.2.16
  retrieving revision 1.1.2.17
  diff -u -r1.1.2.16 -r1.1.2.17
  --- blog_entries.inc  26 Apr 2005 12:30:07 -0000      1.1.2.16
  +++ blog_entries.inc  26 Apr 2005 13:51:34 -0000      1.1.2.17
  @@ -50,17 +50,17 @@
           String title = entry.getFieldValue("title","");
           String body = entry.getFieldValue("body","");
           String author = entry.getFieldValue("author","");
  +        String excerpt = body;
  +        /*
           String excerpt = entry.getFieldValue("excerpt","");;
           if ("".equals(excerpt)){
               excerpt = body;
  -            /*
               excerpt = removeTags(body);
               if ( (excerpt.length()) > 255 ) {
                   excerpt = excerpt.substring( 0, 255 - 3 ) + "...";
               }
  -            */
           }
  -
  +        */
           //String date = entry.getFieldValue("date","");
           long dateLong = -1;
           try {
  @@ -81,7 +81,7 @@
   
           <dt><a 
href="<%=bypassUrl%>?entryId=<%=entry.getID()%>"><%=title%></a></dt>
           <dd class="summary">
  -            <%=excerpt%>
  +            <%=toEmotion(excerpt,theURL + "/images/emotion/")%>
               <a href="<%=bypassUrl%>?entryId=<%=entry.getID()%>" 
class="continued">Continued</a>
           </dd>
           <dd class="posted">
  
  
  
  Index: blog_entry.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/Attic/blog_entry.inc,v
  retrieving revision 1.1.2.23
  retrieving revision 1.1.2.24
  diff -u -r1.1.2.23 -r1.1.2.24
  --- blog_entry.inc    26 Apr 2005 09:23:27 -0000      1.1.2.23
  +++ blog_entry.inc    26 Apr 2005 13:51:35 -0000      1.1.2.24
  @@ -95,7 +95,7 @@
               %><img src="<%=attachement.getDownloadUrl()%>" 
alt="<%=attachement.getTitle()%>" align="left"/><%
           }
           %>
  -        <%=body%>
  +        <%=toEmotion(body,theURL + "/images/emotion/")%>
           <%
           if (hasAttachement) {
               String fileName = attachement.getFileFieldTitle();
  @@ -196,7 +196,7 @@
                               %><h3><%=commentTitle%></h3><br/><%
                           }
                           %>
  -                        <%=commentBody%>
  +                        <%=toEmotion(commentBody,theURL + 
"/images/emotion/")%>
                           <%
                           jData.gui().html().drawBeginActionMenu(commentBean ,
                               null, null, false, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
  
  
  
  Index: declarations.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/declarations.inc,v
  retrieving revision 1.6.4.4
  retrieving revision 1.6.4.5
  diff -u -r1.6.4.4 -r1.6.4.5
  --- declarations.inc  12 Apr 2005 10:14:04 -0000      1.6.4.4
  +++ declarations.inc  26 Apr 2005 13:51:35 -0000      1.6.4.5
  @@ -76,6 +76,49 @@
   
   %>
   <%!
  +static String emotionSymbol[]  = 
{"&gt;:D&lt;",":-&quot;","&lt;):)","[-o&lt;",":)&gt;-",
  +                               "~:&gt;","&gt;-)","\\:D/",":\">","3:-O",
  +                               ":(|)","@};-","**==","(~~)","*-:)",
  +                               "<):)","[-o<",":-\"",":)>-",">:D<",
  +                               ":))",":-)",":((",":-(",";;)",
  +                               ":-/","X-(","B-)",":-s",">:)",
  +                               "/:)","O:)",":-B","I-)","8-|",
  +                               ":-&",":-$","[-(",":o)","8-}",
  +                               "(:|",":-?","#-o","=D>",":@)",
  +                               "~:>","%%-","%%-","~o)","8-X",
  +                               "=:)",">-)",":-L","@-)","$-)",
  +                               ":^o","b-(","[-X",":)",":(",
  +                               ";)",":D",":x",":p",":*",
  +                               ":O",":>",":|","=;"};
  +
  +static String emotionLabel[] = 
{"hugs","whistling","cowboy","praying","peace",
  +                               
"chicken","alien_2","dancing","blushing","cow",
  +                               "monkey","rose","flag","pumpkin","idea",
  +                               "cowboy","praying","whistling","peace","hugs",
  +                               
"laughing","smile","crying","sad","batting_eyelashes",
  +                               
"confused","angry","cool","worried","devilish",
  +                               
"raised_eyebrow","angel","nerd","sleep","rolling_eyes",
  +                               "sick","shhh","not_talking","clown","silly",
  +                               "tired","thinking","d_oh","applause","pig",
  +                               "chicken","sad","good_luck","coffee","skull",
  +                               
"alien_1","alien_2","frustrated","hypnotized","money_eyes",
  +                               "liar","beat_up","shame_on_you","smile","sad",
  +                               
"wink","biggrin","love_struck","tongue","kiss",
  +                               
"shock","smug","straight_face","talk_to_the_hand"};
  +
  +public static String toEmotion(String inputString,String folder) {
  +    for (int i = 0; i < emotionSymbol.length; i++) {
  +        int smileyIndex = inputString.indexOf(emotionSymbol[i]);
  +        while (smileyIndex != -1) {
  +            String url = "<img src=\"" + folder + emotionLabel[i] + ".gif\" 
alt=\"" + emotionLabel[i] + "/\">";
  +            inputString = inputString.substring(0, smileyIndex) + url +
  +                          inputString.substring(smileyIndex + 
emotionSymbol[i].length());
  +            smileyIndex = inputString.indexOf(emotionSymbol[i]);
  +        }
  +    }
  +    return inputString;
  +} // toEmotion
  +
   //String boxTypes[] = {"files", "links", "news", "newsLink", "freeText", 
"webapps"};
   String boxTypes[] = {"files", "links", "news", "freeText", "webapps"};
   
  
  
  
  Index: guestbook.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/guestbook.inc,v
  retrieving revision 1.1
  retrieving revision 1.1.4.1
  diff -u -r1.1 -r1.1.4.1
  --- guestbook.inc     28 Oct 2003 22:56:41 -0000      1.1
  +++ guestbook.inc     26 Apr 2005 13:51:35 -0000      1.1.4.1
  @@ -1,48 +1,3 @@
  -<%!
  -static String emotionSymbol[]  = 
{"&gt;:D&lt;",":-&quot;","&lt;):)","[-o&lt;",":)&gt;-",
  -                               "~:&gt;","&gt;-)","\\:D/",":\">","3:-O",
  -                               ":(|)","@};-","**==","(~~)","*-:)",
  -                               "<):)","[-o<",":-\"",":)>-",">:D<",
  -                               ":))",":-)",":((",":-(",";;)",
  -                               ":-/","X-(","B-)",":-s",">:)",
  -                               "/:)","O:)",":-B","I-)","8-|",
  -                               ":-&",":-$","[-(",":o)","8-}",
  -                               "(:|",":-?","#-o","=D>",":@)",
  -                               "~:>","%%-","%%-","~o)","8-X",
  -                               "=:)",">-)",":-L","@-)","$-)",
  -                               ":^o","b-(","[-X",":)",":(",
  -                               ";)",":D",":x",":p",":*",
  -                               ":O",":>",":|","=;"};
  -
  -static String emotionLabel[] = 
{"hugs","whistling","cowboy","praying","peace",
  -                               
"chicken","alien_2","dancing","blushing","cow",
  -                               "monkey","rose","flag","pumpkin","idea",
  -                               "cowboy","praying","whistling","peace","hugs",
  -                               
"laughing","smile","crying","sad","batting_eyelashes",
  -                               
"confused","angry","cool","worried","devilish",
  -                               
"raised_eyebrow","angel","nerd","sleep","rolling_eyes",
  -                               "sick","shhh","not_talking","clown","silly",
  -                               "tired","thinking","d_oh","applause","pig",
  -                               "chicken","sad","good_luck","coffee","skull",
  -                               
"alien_1","alien_2","frustrated","hypnotized","money_eyes",
  -                               "liar","beat_up","shame_on_you","smile","sad",
  -                               
"wink","biggrin","love_struck","tongue","kiss",
  -                               
"shock","smug","straight_face","talk_to_the_hand"};
  -
  -public static String toEmotion(String inputString,String folder) {
  -    for (int i = 0; i < emotionSymbol.length; i++) {
  -        int smileyIndex = inputString.indexOf(emotionSymbol[i]);
  -        while (smileyIndex != -1) {
  -            String url = "<img src=\"" + folder + emotionLabel[i] + ".gif\" 
alt=\"" + emotionLabel[i] + "\">";
  -            inputString = inputString.substring(0, smileyIndex) + url +
  -                          inputString.substring(smileyIndex + 
emotionSymbol[i].length());
  -            smileyIndex = inputString.indexOf(emotionSymbol[i]);
  -        }
  -    }
  -    return inputString;
  -} // toEmotion
  -
  -%>
   <content:declareContainerList name="guestbookContainer" title="Content 
Container">
       <content:declareContainer>
           <content:declareField name="title" title="Title" type="SmallText" />
  

Reply via email to