[实用修改]帖子评价详细信息显示 For Dvbbs7.1SP1 0716

 

  1 注意:我修改的动网版本是打了0716补丁的DV7.1SP1,版本不对的请自行对照修改!
  2
  3 admin_postings.asp
  4
  5 查找
  6 Dim  CanRewardMoney,GiveMoney
  7 后面添加,DoWealth,DoUserEP,DoUserCP,title
  8 即修改为
  9 Dim  CanRewardMoney,GiveMoney,DoWealth,DoUserEP,DoUserCP,title
 10
 11 查找
 12         GiveMoney  =  Request.FORM( " GiveMoney " )
 13 下面添加
 14         DoWealth   =  Request.FORM( " DoWealth " )
 15         DoUserEP   =  Request.FORM( " DoUserEP " )
 16         DoUserCP   =  Request.FORM( " DoUserCP " )
 17         title      =  Request.FORM( " title " )
 18          If  title   =   ""   Then  title = Request.FORM( " content " )
 19          If  title   =   ""   Then  title = Dvbbs.HtmlEncode( Replace (Request.FORM( " content " ), " | " , "" ))
 20
 21
 22 查找
 23              If  ReAct  =   1   Then
 24                 UpIsagree  =  GiveMoney & " |0 "
 25              Else
 26                 UpIsagree  =   " 0| " & GiveMoney
 27              End   If
 28          Else
 29             TempString  =   Split (TempString, " | " )
 30              If  ReAct  =   1   Then
 31                 TempString( 0 =  TempString( 0 +  GiveMoney
 32              Else
 33                 TempString( 1 =  TempString( 1 +  GiveMoney
 34              End   If
 35             UpIsagree  =  TempString( 0 & " | " &  TempString( 1 )
 36          End   If
 37
 38
 39 全部替换为
 40         UpIsagree  =  DoWealth & " | " & DoUserEP & " | " & DoUserCP & " | " & GiveMoney & " | " & title & " | " & dvbbs.membername
 41          ' 帖子评价数据字段 = 金钱数|经验数|魅力数|金币数|操作人
 42          Else
 43             TempString  =   Split (TempString, " | " )
 44             TempString( 0 =   clng (TempString( 0 ))  +  DoWealth
 45             TempString( 1 =   clng (TempString( 1 ))  +  DoUserEP
 46
 47              If   Ubound (TempString) > 1   Then
 48
 49             TempString( 2 =   clng (TempString( 2 ))  +  DoUserCP
 50             TempString( 3 =   clng (TempString( 3 ))  +  GiveMoney
 51             UpIsagree  =  TempString( 0 & " | " &  TempString( 1 & " | " &  TempString( 2 & " | " &  TempString( 3 & " | " &  title  & " | " &  dvbbs.membername
 52              Else
 53             UpIsagree  =  TempString( 0 & " | " &  TempString( 1 & " | " &  DoUserCP  & " | " &  GiveMoney  & " | " &  title  & " | " &  dvbbs.membername
 54              End   If
 55          End   If
 56
 57 查找  If  GiveMoney  =   0   Then  Dvbbs.AddErrCode( 35 ) :  Exit   Sub
 58
 59 删除或者加 ' 注释掉,可以修正不奖励金币就无法评价的错误
 60
 61 查找GiveMoney  =   Abs (GiveMoney)
 62
 63 删除或注释掉,可以修正扣除金币也显示成奖励的错误
 64
 65 查找
 66
 67 UpGetMoney  =  UpGetMoney  -  GiveMoney
 68 Sql  =   " Update Dv_user Set UserMoney=UserMoney- " & GiveMoney & "  where UserID= " & TopicUserID
 69
 70 改成
 71
 72
 73 UpGetMoney  =  UpGetMoney  +  GiveMoney
 74 Sql  =   " Update Dv_user Set UserMoney=UserMoney+ " & GiveMoney & "  where UserID= " & TopicUserID
 75
 76
 77
 78
 79 --------------------------------------------------------------------------------
 80 dispbbs.asp
 81
 82 查找
 83
 84          Next
 85          For   Each  Node In postuserlist.documentElement.SelectNodes( " user " )
 86              Rem  分解userIM数组
 87 在Next的上面插入这段
 88
 89 ' ————————————————————————————————————
 90 ' 帖子评价显示开始
 91 dim  isagree,CNode
 92 isagree = Split (Node.selectSingleNode( " @isagree " ).text, " | " )     ' 分割isagree字段
 93 If   UBound (isagree) > 4   Then                      ' 判断是否是新的评价方式以免
 94
 95 数组下标越限
 96      Set  CNode  =  XMLDOM.createNode( 2 , " UserWealth " , "" )
 97     Cnode.text = isagree( 0 )
 98     node.attributes.setNamedItem(Cnode)
 99
100      Set  CNode  =  XMLDOM.createNode( 2 , " UserCP " , "" )
101     Cnode.text = isagree( 1 )
102     node.attributes.setNamedItem(Cnode)
103
104      Set  CNode  =  XMLDOM.createNode( 2 , " UserCP " , "" )
105     Cnode.text = isagree( 2 )
106     node.attributes.setNamedItem(Cnode)
107
108      Set  CNode  =  XMLDOM.createNode( 2 , " GiveMoney " , "" )
109     Cnode.text = isagree( 3 )
110     node.attributes.setNamedItem(Cnode)
111
112      Set  CNode  =  XMLDOM.createNode( 2 , " Reason " , "" )
113     Cnode.text = isagree( 4 )
114
115     node.attributes.setNamedItem(Cnode)
116      Set  CNode  =  XMLDOM.createNode( 2 , " AdminName " , "" )
117     Cnode.text = isagree( 5 )
118     node.attributes.setNamedItem(Cnode)
119 End   If
120 ' 帖子评价显示结束
121 ' ————————————————————————————————————
122
123
124 --------------------------------------------------------------------------------
125
126
127 后台风格模版(page_dispbbs)template.html( 1 )
128
129 查找并删除下面这段
130
131 < xsl: if  test = " @isagree != ''and contains(@isagree,'|') " >
132 < xsl: if  test = " substring-after(@isagree,'|') &gt; 0 " >    & lt;img src = " <xsl:value-of select= " / post / setting / @picurl "  />agree.gif "  border = " 0 "  alt = " 好评,获得<xsl:value-of select= " substring - after(@isagree, ' |')" />个金币奖励" / &gt; </xsl:if>
133 < xsl: if  test = " substring-before(@isagree,'|') &gt; 0 " >    & lt;img src = " <xsl:value-of select= " / post / setting / @picurl "  />DisAgree.gif "  border = " 0 "  alt = " 差评,扣除<xsl:value-of select= " substring - before(@isagree, ' |')" />个金币"/&gt; </xsl:if>
134 </ xsl: if >
135
136
137 再查找
138
139 < xsl: if  test = " $postinfo !='' " >< div class = " info " >
140 < xsl:value - of  select = " $postinfo "  disable - output - escaping = " yes " />
141 </ div ></ xsl: if >
142
143 把这段替换为下面这段
144
145 < xsl: if  test = " @AdminName != '' " >
146 < div class = " info " >
147 < font color = " #000000 " >< xsl:text disable - output - escaping = " yes "   > 该贴已被 </ xsl:text ></ font >
148 < font color = " #FF00FF " >< xsl:value - of  select = " @AdminName " /></ font >
149      < xsl: if  test = " @UserWealth &gt; 0 " >
150          < img src = " {/post/setting/@picurl}agree.gif "  border = " 0 "  title = " 继续加油哦~! "  align = " absmiddle " />
151          < font color = " #FF0000 " >
152          < xsl:text disable - output - escaping = " yes "   > 奖励现金 </ xsl:text >
153          < xsl:value - of  select = " @UserWealth " />
154          < xsl:text disable - output - escaping = " yes "   > </ xsl:text >
155          </ font >
156      </ xsl: if >
157      < xsl: if  test = " @UserWealth &lt; 0 " >
158          < img src = " {/post/setting/@picurl}DisAgree.gif "  border = " 0 "  title = " 下次别犯错啦~! "  align = " absmiddle " />
159          < font color = " #0000FF " >
160          < xsl:text disable - output - escaping = " yes "   > 扣除现金 </ xsl:text >
161          < xsl:value - of  select = " -@UserWealth " />
162          < xsl:text disable - output - escaping = " yes "   > </ xsl:text >
163          </ font >
164      </ xsl: if >
165
166      < xsl: if  test = " @UserEP &gt; 0 " >
167          < img src = " {/post/setting/@picurl}agree.gif "  border = " 0 "  title = " 继续加油哦~! "  align = " absmiddle " />
168          < font color = " #FF0000 " >
169          < xsl:text disable - output - escaping = " yes "   > 奖励经验 </ xsl:text >
170          < xsl:value - of  select = " @UserEP " />
171          < xsl:text disable - output - escaping = " yes "   > </ xsl:text >
172          </ font >
173      </ xsl: if >
174      < xsl: if  test = " @UserEP &lt; 0 " >
175          < img src = " {/post/setting/@picurl}DisAgree.gif "  border = " 0 "  title = " 下次别犯错啦~! "  align = " absmiddle " />
176          < font color = " #0000FF " >
177          < xsl:text disable - output - escaping = " yes "   > 扣除经验 </ xsl:text >
178          < xsl:value - of  select = " -@UserEP " />
179          < xsl:text disable - output - escaping = " yes "   > </ xsl:text >
180          </ font >
181      </ xsl: if >
182                                          < xsl: if  test = " @UserCP &gt; 0 " >
183          < img src = " {/post/setting/@picurl}agree.gif "  border = " 0 "  title = " 继续加油哦~! "  align = " absmiddle " />
184          < font color = " #FF0000 " >
185          < xsl:text disable - output - escaping = " yes "   > 奖励魅力 </ xsl:text >
186          < xsl:value - of  select = " @UserCP " />
187          < xsl:text disable - output - escaping = " yes "   > </ xsl:text >
188          </ font >
189      </ xsl: if >
190      < xsl: if  test = " @UserCP &lt; 0 " >
191          < img src = " {/post/setting/@picurl}DisAgree.gif "  border = " 0 "  title = " 下次别犯错啦~! "  align = " absmiddle " />
192          < font color = " #0000FF " >
193          < xsl:text disable - output - escaping = " yes "   > 扣除魅力 </ xsl:text >
194          < xsl:value - of  select = " -@UserCP " />
195          < xsl:text disable - output - escaping = " yes "   > </ xsl:text >
196          </ font >
197      </ xsl: if >
198                                          < xsl: if  test = " @GiveMoney &gt; 0 " >
199          < img src = " {/post/setting/@picurl}agree.gif "  border = " 0 "  title = " 继续加油哦~! "  align = " absmiddle " />
200          < font color = " #FF0000 " >
201          < xsl:text disable - output - escaping = " yes "   > 奖励金币 </ xsl:text >
202          < xsl:value - of  select = " @GiveMoney " />
203          < xsl:text disable - output - escaping = " yes "   > </ xsl:text >
204          </ font >
205      </ xsl: if >
206      < xsl: if  test = " @GiveMoney &lt; 0 " >
207          < img src = " {/post/setting/@picurl}DisAgree.gif "  border = " 0 "  title = " 下次别犯错啦~! "  align = " absmiddle " />
208          < font color = " #0000FF " >
209          < xsl:text disable - output - escaping = " yes "   > 扣除金币 </ xsl:text >
210          < xsl:value - of  select = " -@GiveMoney " />
211          < xsl:text disable - output - escaping = " yes "   > </ xsl:text >
212          </ font >
213      </ xsl: if >
214
215      < xsl: if  test = " @UserWealth=0 and @UserEP=0 and @UserCP=0 and @GiveMoney=0 " >
216          < font color = " #000000 " >< xsl:text disable - output - escaping = " yes "   > 进行了无分值评价 </ xsl:text ></ font >
217      </ xsl: if >
218
219      < font color = " #000000 " >< xsl:text disable - output - escaping = " yes "   >     操作理由: </ xsl:text >< xsl:value - of  select = " @Reason " /></ font >
220 </ div >
221 </ xsl: if >
222
223
224 --------------------------------------------------------------------------------
225
226
227 注意:修改之前做的帖子评价都不会显示,只有修改之后的才显示
228
229 演示地址:http: // bbs.52tian.com / dispbbs.asp?boardID = 24 & ID = 23216
230
231 Dvbbs7. 1  的修改方法请看
232
233 http: // bbs.dvbbs.net / dispbbs.asp?BoardID = 13 & ID = 1032635
234

你可能感兴趣的:(bbs)