Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - MOD:Last topic subjects in forums area
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MOD:Last topic subjects in forums area

 Post Reply Post Reply Page  123>
Author
gölge View Drop Down
Groupie
Groupie


Joined: 16 April 2005
Location: Turkey
Status: Offline
Points: 182
Post Options Post Options   Thanks (0) Thanks(0)   Quote gölge Quote  Post ReplyReply Direct Link To This Post Topic: MOD:Last topic subjects in forums area
    Posted: 12 May 2006 at 2:13pm
Features:
-showing lastposts at forum tables
-if the last post belongs a subforum, shows it ( you know the original default.asp file does not show subforums' last posts)
-correcting subforum variables that not shown under topics, posts in forum tables (topic nums, post nums etc...)
-at the bottom (in statistics area) showing correct informations. (last posted user etc..)
 
caps:
img160/356/subforum9qx.jpg < =text/>setImgWidth();
 
 
the red codes are modified or added codes by me, open your default.asp file and follow the steps...
 
1-add dim fsub variable at the bottom of dim rows 
Quote
Dim intBirtdayLoopCounter 'Holds the bitrhday loop counter
dim strSubject
dim fsub
 
2-add  fsub = 0 code under strSubForums = ""
Quote
Do While intCurrentRecord <= Ubound(sarryForums,2)
    
    'Initialise variables
    strSubForums = ""
       fsub = 0
 
3-replace intCurrentRecord code with intTempRecord
Quote
strLastSubEntryUser = sarryForums(8,intTempRecord)
       If isNumeric(sarryForums(9,intTempRecord)) Then lngLastSubEntryUserID = CLng(sarryForums(9,intTempRecord)) Else lngLastEntryUserID = 0
       If isDate(sarryForums(10,intTempRecord)) Then dtmLastSubEntryDate = CDate(sarryForums(10,intTempRecord)) Else dtmLastSubEntryDate = Now()
 
 
4-copy the red codes and paste under the black codes
Quote
'Add all the posts and topics together to get the total number for the stats at the bottom of the page
        lngTotalNumberOfPosts = lngTotalNumberOfPosts + lngSubForumNumberOfPosts
        lngTotalNumberOfTopics = lngTotalNumberOfTopics + lngSubForumNumberOfTopics
        lngNumberOfPosts = lngNumberOfPosts + lngSubForumNumberOfPosts
        lngNumberOfTopics = lngNumberOfTopics + lngSubForumNumberOfTopics

    
 
If dtmLastEntryDateAllForums < dtmLastSubEntryDate Then
         strLastEntryUserAllForums = strLastSubEntryUser
         lngLastEntryUserIDAllForums = lngLastSubEntryUserID
         dtmLastEntryDateAllForums = dtmLastSubEntryDate
        End If        
      
          If dtmLastEntryDate < dtmLastSubEntryDate Then
         dtmLastEntryDate = dtmLastSubEntryDate
         lngLastEntryUserID = lngLastSubEntryUserID
         strLastEntryUser = strLastSubEntryUser 
         fsub= intsubforumid 
        End If       
        
        'If there are other sub forums place a comma inbetween
        If strSubForums <> "" Then strSubForums = strSubForums & ", "
 
 
5-copy the red codes and paste between black codes
Quote
     'Write the HTML of the forum descriptions and hyperlinks to the forums
     'Son mesajlar
     strSQL = "SELECT" & strDBTop1 & " " & strDbTable & "Topic.Subject FROM " & strDbTable & "Topic" & strDBNoLock & ", " & strDbTable & "Thread" & strDBNoLock & " " & _
      "WHERE " & strDbTable & "Topic.Topic_ID = " & strDbTable & "Thread.Topic_ID AND " & strDbTable & "Topic.Forum_ID=" & fsub & " AND " & strDbTable & "Topic.Hide=" & strDBFalse & " " & _
       "AND " & strDbTable & "Thread.Hide=" & strDBFalse & " ORDER BY " & strDbTable & "Thread.Message_date DESC" & strDBLimit1 & ";"
      rsCommon.Open strSQL, adoCon
     if fsub = 0 then fsub = intforumid
      if NOT rsCommon.EOF then
      If len(rsCommon("Subject"))>50  Then
       strSubject = "<a href=""get_last_post.asp?FID=" &fsub & """ style=""font-size:11px; font-weight : bold; color : #465584;"">" & left(rsCommon("Subject"),50) &"..."& "</a>"
      else
       strSubject = "<a href=""get_last_post.asp?FID=" &fsub & """ style=""font-size:11px; font-weight : bold; color : #465584;"">" & rsCommon("Subject")& "</a>"
      End If
      end if
      rsCommon.Close
        'Son Mesajlar  
     'Calculate row colour
 
6-replace  original code with  the red code in your default page
[quote]
'Display forum details
     Response.Write("<br /><span style=""font-size:11px;"">" & strForumDiscription & strSubForums & "</span></td>" & _
     vbCrLf & "  <td align=""center"">" & lngNumberOfTopics & "</td>" & _
     vbCrLf & "  <td align=""center"">" & lngNumberOfPosts & "</td>" & _
     vbCrLf & "  <td class=""smText"" align=""right"" nowrap>")
 
Back to Top
GopCa View Drop Down
Newbie
Newbie


Joined: 03 May 2006
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote GopCa Quote  Post ReplyReply Direct Link To This Post Posted: 27 May 2006 at 4:29pm
buradakileri aynen yapınca mesaj yazılmamış konularda mesaj yazılmış gibi gösteriyor ve tarihin üstünde boşluk görünüyor son yazılan mesaj görünmüyor Confused

Edited by GopCa - 27 May 2006 at 4:42pm
Back to Top
jsaren View Drop Down
Groupie
Groupie
Avatar

Joined: 15 April 2006
Location: China
Status: Offline
Points: 95
Post Options Post Options   Thanks (0) Thanks(0)   Quote jsaren Quote  Post ReplyReply Direct Link To This Post Posted: 27 May 2006 at 10:52pm
it works well with v8.01.
Back to Top
graper View Drop Down
Groupie
Groupie


Joined: 07 April 2005
Location: China
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote graper Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 2006 at 3:10am
OK TRY IT
WWF论坛讨论QQ群:2652358
WWF论坛讨论:Http://Www.CNWWF.Com/Forum/
Back to Top
leiti View Drop Down
Groupie
Groupie


Joined: 16 February 2005
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote leiti Quote  Post ReplyReply Direct Link To This Post Posted: 31 May 2006 at 3:59pm
Hello,
 
i got the following error by your mod:
 
Laufzeitfehler in Microsoft VBScript (0x800A01A8)
Objekt erforderlich
/web_wiz_forum/forum/default.asp, line 525
 
Line 525:
rsCommon.Open strSQL, adoCon
 
This is the line in point 5 of you installation guide.
Where's the error?
 
thanks 4 help!
Back to Top
Lazwolf View Drop Down
Newbie
Newbie
Avatar

Joined: 18 May 2006
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lazwolf Quote  Post ReplyReply Direct Link To This Post Posted: 01 June 2006 at 9:53am
There should be a Call closeDatabase() around line 380. Comment that out and move it below the loop that displays the forums. That worked for me.
Back to Top
GopCa View Drop Down
Newbie
Newbie


Joined: 03 May 2006
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote GopCa Quote  Post ReplyReply Direct Link To This Post Posted: 06 June 2006 at 3:50pm
kodlarda hata var gölge bir binceleyip yenileyebilir misin?
Back to Top
gölge View Drop Down
Groupie
Groupie


Joined: 16 April 2005
Location: Turkey
Status: Offline
Points: 182
Post Options Post Options   Thanks (0) Thanks(0)   Quote gölge Quote  Post ReplyReply Direct Link To This Post Posted: 06 June 2006 at 11:46pm
kodlarda hata yok. yukardakileri aynen yaptığından emin ol! hata olsa diğer üyelerde çalışmazdı.
 
i checked code there isnt any error. be sure that you made all steps correctly..
Back to Top
 Post Reply Post Reply Page  123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.