Changeset 1516 for CMESS/forum


Ignore:
Timestamp:
23.05.2011 08:55:15 (12 months ago)
Author:
mhallbauer
Message:

1.1.3

  • some fixes by fhoffmann, zmsdev
  • disabled forum-caching
  • improved forms
File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMESS/forum/branches/captcha/com/zms/forum/zmsforum.metaobj.xml

    r1338 r1516  
    292292    <h2><dtml-var "getTitlealt(REQUEST)"></h2> 
    293293<dtml-else> 
     294  <dtml-call "RESPONSE.setHeader('Cache-Control','no-cache')"> 
     295  <dtml-call "RESPONSE.setHeader('Pragma','no-cache')"> 
    294296  <div id="ZMSForum"> 
    295297        <dtml-var "ZMSForum_handleBoard()"> 
     298        <small>com.zms.forum <dtml-var "ZopeTime()"></small> 
    296299  </div> 
    297300</dtml-if> 
     
    831834</dtml-comment> 
    832835 
    833 <form method="post" enctype="multipart/form-data"> 
     836<form action="<dtml-var "REQUEST.get('URL','')">" method="post" enctype="multipart/form-data"> 
     837        <input type="hidden" name="timestamp" value="<dtml-var "DateTime().timeTime()">"> 
    834838        <input type="hidden" name="boardId" value="<dtml-var "'%s_%s'%(id, aq_parent.id)">"> 
    835839        <input type="hidden" name="zfmParentId" value="%s"> 
     
    894898</dtml-comment> 
    895899 
    896 <form method="post"> 
    897         <input type="hidden" name="boardId" value="<dtml-var "'%s_%s'%(id, aq_parent.id)">"> 
    898         <input type="hidden" name="zfmId" value="%s"> 
    899         <input type="hidden" name="newTabSheet" value="%s"> 
     900<form action="<dtml-var "REQUEST.get('URL','')">" method="post"> 
     901        <input type="hidden" name="timestamp" value="<dtml-var "DateTime().timeTime()">" /> 
     902        <input type="hidden" name="boardId" value="<dtml-var "'%s_%s'%(id, aq_parent.id)">" /> 
     903        <input type="hidden" name="zfmId" value="%s" /> 
     904        <input type="hidden" name="newTabSheet" value="%s" /> 
    900905        <fieldset> 
    901906                <legend>%s</legend> 
    902907                <div class="field"> 
    903908                        <label for="zfmEmail">%s</label><br /> 
    904                         <input type="text" id="zfmEmail" name="zfmEmail" size="40"> 
     909                        <input type="text" id="zfmEmail" name="zfmEmail" size="40" /> 
    905910                </div> 
    906911        </fieldset> 
     
    933938</dtml-comment> 
    934939 
    935 <form method="post"> 
     940<form action="<dtml-var "REQUEST.get('URL','')">" method="post"> 
     941        <input type="hidden" name="timestamp" value="<dtml-var "DateTime().timeTime()">"> 
    936942        <input type="hidden" name="boardId" value="<dtml-var "'%s_%s'%(id, aq_parent.id)">"> 
    937943        <input type="hidden" name="zfmId" value="%s"> 
     
    979985</dtml-comment> 
    980986 
    981 <form method="get"> 
     987<form action="<dtml-var "REQUEST['URL']">" method="get"> 
     988        <input type="hidden" name="timestamp" value="<dtml-var "DateTime().timeTime()">"> 
    982989        <input type="hidden" name="boardId" value="<dtml-var "'%s_%s'%(id, aq_parent.id)">"> 
    983990        <input type="hidden" name="zfmId" value="%s"> 
     
    10151022</dtml-comment> 
    10161023 
    1017 <form method="post"> 
     1024<form action="<dtml-var "REQUEST.get('URL','')">" method="post"> 
     1025        <input type="hidden" name="timestamp" value="<dtml-var "DateTime().timeTime()">"> 
    10181026        <input type="hidden" name="boardId" value="<dtml-var "'%s_%s'%(id,aq_parent.id)">"> 
    10191027        <input type="hidden" name="zfmId" value="%s"> 
     
    10661074</dtml-comment> 
    10671075 
    1068 <form method="post"> 
     1076<form action="<dtml-var "REQUEST.get('URL','')">" method="post"> 
     1077        <input type="hidden" name="timestamp" value="<dtml-var "DateTime().timeTime()">"> 
    10691078        <input type="hidden" name="boardId" value="<dtml-var "'%s_%s'%(id, aq_parent.id)">"> 
    10701079        <input type="hidden" name="newTabSheet" value="%s"> 
     
    11601169            <item key="name"><![CDATA[Forum]]></item> 
    11611170            <item key="package"><![CDATA[com.zms.forum]]></item> 
    1162             <item key="revision"><![CDATA[1.1.2]]></item> 
     1171            <item key="revision"><![CDATA[1.1.3]]></item> 
    11631172            <item key="type"><![CDATA[ZMSObject]]></item> 
    11641173          </dictionary> 
     
    17281737        temp_err_list, temp_rendered = handleDisplayOverview() 
    17291738 
    1730 temp_result = renderTabs() 
     1739temp_result += renderTabs() 
    17311740temp_result += renderErrors(temp_err_list) 
    17321741temp_result += temp_rendered 
     
    20992108## 
    21002109# --// BO ZMSForum_renderMessage //-- 
    2101 REQUEST                                                                         = container.REQUEST 
    2102 temp_lang                                                                       = REQUEST.get('lang', context.getPrimaryLanguage()) 
    2103 temp_result                                                     = '' 
    2104 temp_err                                                                        = None 
    2105 temp_enable_notification        = context.getObjProperty('zfEnableNotification', REQUEST) 
    2106 temp_enable_rating                              = context.getObjProperty('zfEnableRating', REQUEST) 
    2107 temp_only_visible                                       = context.getObjProperty('zfEnableModerated', REQUEST) 
     2110REQUEST = container.REQUEST 
     2111temp_lang = REQUEST.get('lang', context.getPrimaryLanguage()) 
     2112temp_result = '' 
     2113temp_err  = None 
     2114temp_enable_notification= context.getObjProperty('zfEnableNotification', REQUEST) 
     2115temp_enable_rating = context.getObjProperty('zfEnableRating', REQUEST) 
     2116temp_only_visible        = context.getObjProperty('zfEnableModerated', REQUEST) 
    21082117 
    21092118if (REQUEST.form.has_key('zfmId')): 
     
    21232132                                        temp_result += '<img src="%s" />&nbsp;'%context.getObjProperty('folder_main', REQUEST).getHref(REQUEST) 
    21242133                                 
    2125                                 temp_result += '<a href="%s">'%context.url_append_params(REQUEST.get('URL'), {'newTabSheet' : 'displayMessage', 'boardId' : '%s_%s'%(context.getId(), context.aq_parent.getId()), 'zfmId' : one_message['zfmId']}) 
     2134                                temp_result += '<a href="%s">'%context.url_append_params(REQUEST.get('URL',''), {'newTabSheet' : 'displayMessage', 'boardId' : '%s_%s'%(context.getId(), context.aq_parent.getId()), 'zfmId' : one_message['zfmId']}) 
    21262135                                temp_result += (one_message['zfmParentId'] == '') and 'Topic: ' or '' 
    21272136                                temp_result += one_message['zfmSubject'] 
     
    21882197                 
    21892198                #render reply form 
    2190                 ''' 
    2191                 temp_result += (context.getObjProperty('replyForm'))%(temp_message['zfmId'], 'displayReply', 'Antwort', 
    2192                                                                                                                                                                                                                                                 context.getLangStr('zfMsgReply', temp_lang), 
    2193                                                                                                                                                                                                                                                 context.getLangStr('zfBtnReply', temp_lang)) 
    2194                 ''' 
    2195                 temp_result += (context.getObjProperty('replyForm'))%(temp_message['zfmId'], 'displayReply',  
    2196                                                                                                                                                                                                                                                 context.getLangStr('zfBtnReply', temp_lang)) 
     2199                form = context.getObjProperty('replyForm') 
     2200                try: 
     2201                        ''' 
     2202                        temp_result += (context.getObjProperty('replyForm'))%(temp_message['zfmId'], 'displayReply', 'Antwort', 
     2203                                                                                                                                                                                                                                                        context.getLangStr('zfMsgReply', temp_lang), 
     2204                                                                                                                                                                                                                                                        context.getLangStr('zfBtnReply', temp_lang)) 
     2205                        ''' 
     2206                        temp_result += form%(temp_message['zfmId'], 'displayReply',  
     2207                                                                                                                                                                                                                                                        context.getLangStr('zfBtnReply', temp_lang)) 
     2208                except: 
     2209                        temp_result += '[ERROR:replayForm]'+form 
    21972210                 
    21982211                #render notification form 
    21992212                if (temp_enable_notification): 
    2200                         temp_result += (context.getObjProperty('notificationForm'))%(temp_message['zfmId'], 'insertNotification',  
    2201                                                                                                                                                                                                                                                                                 context.getLangStr('zfSendNotification', temp_lang), 
    2202                                                                                                                                                                                                                                                                                 context.getLangStr('zfMyEmail', temp_lang), 
    2203                                                                                                                                                                                                                                                                                 context.getLangStr('zfBtnNotify', temp_lang)) 
     2213                        form = context.getObjProperty('notificationForm') 
     2214                        try: 
     2215                                temp_result += form%(temp_message['zfmId'], 'insertNotification', context.getLangStr('zfSendNotification', temp_lang), context.getLangStr('zfMyEmail', temp_lang), context.getLangStr('zfBtnNotify', temp_lang)) 
     2216                        except: 
     2217                                temp_result += '[ERROR:inotificationForm]'+form 
    22042218                #render usefullness form 
    22052219                if (temp_enable_rating): 
    2206                         temp_result += (context.getObjProperty('ratingForm'))%(temp_message['zfmId'], 'insertRating', 
    2207                                                                                                                                                                                                                                                         'Bewertung',  
    2208                                                                                                                                                                                                                                                         context.getLangStr('zfRateUsefulness', temp_lang), 
    2209                                                                                                                                                                                                                                                         context.getLangStr('zfBeginning', temp_lang), 
    2210                                                                                                                                                                                                                                                         context.getLangStr('zfExemplary', temp_lang), 
    2211                                                                                                                                                                                                                                                         context.getLangStr('zfBtnRate', temp_lang)) 
     2220                        form = context.getObjProperty('ratingForm') 
     2221                        try: 
     2222                                temp_result += form%(temp_message['zfmId'], 'insertRating', 
     2223                                                                                                                                                                                                                                                                'Bewertung',  
     2224                                                                                                                                                                                                                                                                context.getLangStr('zfRateUsefulness', temp_lang), 
     2225                                                                                                                                                                                                                                                                context.getLangStr('zfBeginning', temp_lang), 
     2226                                                                                                                                                                                                                                                                context.getLangStr('zfExemplary', temp_lang), 
     2227                                                                                                                                                                                                                                                                context.getLangStr('zfBtnRate', temp_lang)) 
     2228                        except: 
     2229                                temp_result += '[ERROR:ratingForm]'+form 
    22122230                #render thread tree 
    22132231                temp_result += '<fieldset>\n' 
     
    23472365for one_tab in tabs: 
    23482366        temp_result += '<li%s>'%((one_tab['action'] == selected_tab) and ' class="selected"' or '') 
    2349         temp_result += '<a href="%s">%s</a>'%(context.url_append_params(REQUEST.URL, {'newTabSheet' : one_tab['action'], 'boardId' : '%s_%s'%(context.getId(), context.aq_parent.getId())}), one_tab['title'])   
     2367        temp_result += '<a href="%s">%s</a>'%(context.url_append_params(REQUEST.URL, {'timestamp':DateTime().timeTime(), 'newTabSheet' : one_tab['action'], 'boardId' : '%s_%s'%(context.getId(), context.aq_parent.getId())}), one_tab['title'])   
    23502368        temp_result += '</li>\n' 
    23512369         
     
    24022420                 
    24032421                temp_result = '' 
    2404                 temp_result += '<a href="' + context.url_append_params(REQUEST.get('URL'), {'newTabSheet':'displayMessage','boardId':'%s_%s'%(context.getId(), context.aq_parent.id),'zfmId':msg_obj['zfmId']}) + '">' 
     2422                temp_result += '<a href="' + context.url_append_params(REQUEST.get('URL',''), {'newTabSheet':'displayMessage','boardId':'%s_%s'%(context.getId(), context.aq_parent.id),'zfmId':msg_obj['zfmId']}) + '">' 
    24052423                #temp_result += (topic) and '' or '<div class="threadTree%s">'%temp_class 
    24062424                temp_result += '<div class="threadTree%s">'%temp_class 
     
    25222540            <item key="name"><![CDATA[Library]]></item> 
    25232541            <item key="package"><![CDATA[com.zms.forum]]></item> 
    2524             <item key="revision"><![CDATA[1.1.1]]></item> 
     2542            <item key="revision"><![CDATA[1.1.3]]></item> 
    25252543            <item key="type"><![CDATA[ZMSLibrary]]></item> 
    25262544          </dictionary> 
     
    31633181            <item key="name"><![CDATA[com.zms.forum]]></item> 
    31643182            <item key="package"/> 
    3165             <item key="revision"><![CDATA[1.1.2]]></item> 
     3183            <item key="revision"><![CDATA[1.1.3]]></item> 
    31663184            <item key="type"><![CDATA[ZMSPackage]]></item> 
    31673185          </dictionary> 
Note: See TracChangeset for help on using the changeset viewer.