Print Page | Close Window

Melodik - Latest Posts

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=21238
Printed Date: 29 March 2026 at 4:24pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Melodik - Latest Posts
Posted By: melodik
Subject: Melodik - Latest Posts
Date Posted: 06 September 2006 at 10:55pm
***** NEW!!! *****
 
Line 384-385
 
'**************** melodik *******************
'Clean up
' Call closeDatabase()
'**************** melodik *******************
 
<%
Dim strLatestPostsNumber
strLatestPostsNumber = Request.QueryString("strLatestPostsNumber")
if strLatestPostsNumber = "" then strLatestPostsNumber = 10
if strLatestPostsNumber > 50 then strLatestPostsNumber = 10
strLatestPostsNumber = cInt(strLatestPostsNumber)
%>
<%

if strLatestPostsNumber = 10 then
Response.Write " 10"
else %>
<a href="default.asp?strLatestPostsNumber=10#LatestForumPosts" class="nav" title="Son gelen 10 mesaj">10</a><% end if %>
<% if strLatestPostsNumber = 20 then
Response.Write " 20"
else %>
<a href="default.asp?strLatestPostsNumber=20#LatestForumPosts" class="nav" title="Son gelen 20 mesaj">20</a><% end if %>
<% if strLatestPostsNumber = 30 then
Response.Write " 30"
else %>
<a href="default.asp?strLatestPostsNumber=30#LatestForumPosts" class="nav" title="Son gelen 30 mesaj">30</a><% end if %>
<% if strLatestPostsNumber = 40 then
Response.Write " 40"
else %>
<a href="default.asp?strLatestPostsNumber=40#LatestForumPosts" class="nav" title="Son gelen 40 mesaj">40</a><% end if %>
<% if strLatestPostsNumber = 50 then
Response.Write " 50"
else %>
<a href="default.asp?strLatestPostsNumber=50#LatestForumPosts" class="nav" title="Son gelen 50 mesaj">50</a><% end if %>
 
<%
'##############################
'
'   MELODIK
'   Web Wiz Forum v8.03
'   For Microsoft Access
'  
http://www.melodik.net/ - http://www.melodik.net/
'
'#############################
Dim rsLatestPosts
Dim strTopicSubject
Dim strTopicSubjectOrj
Dim NumberOfPosts
Dim strFirstPostMsg
Dim LastLatestPostsDateTime
Dim LastLatestPostsDate
Dim LastLatestPostsTime
NumberOfPosts = 0
Set rsLatestPosts = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT "&_
"tblTopic.Topic_ID, "&_
"tblTopic.Subject, "&_
"tblTopic.Last_thread_ID, "&_
"tblThread.Thread_ID, "&_
"tblThread.Message_date, "&_
"tblThread.Author_ID, "&_
"tblAuthor.Author_ID, "&_
"tblAuthor.Username, "&_
"tblForum.Forum_ID, "&_
"tblForum.Forum_name, "&_
"tblThread.Message, "&_
"tblTopic.Forum_ID "&_
"FROM "&_
"tblTopic, "&_
"tblThread, "&_
"tblAuthor, "&_
"tblForum "&_
"WHERE "&_
"tblThread.Thread_ID=tblTopic.Last_thread_ID "&_
"AND "&_
"tblThread.Author_ID=tblAuthor.Author_ID "&_
"AND "&_
"tblForum.Forum_ID = tblTopic.Forum_ID "&_
"ORDER BY "&_
"Last_Thread_ID DESC;"
rsLatestPosts.Open strSQL, adoCon
Response.Write "<table cellpadding=""0"" cellspacing=""0"" width=""100%"">"
If rsLatestPosts.EOF Then
 Response.Write "<tr><td><span class=""smltext"">Forumda yeni mesaj yok.</span></td></tr>"
 'Response.Write "<tr><td><span class=""smltext"">No message.</span></td></tr>"
Else
Do while NOT rsLatestPosts.EOF And NumberOfPosts < strLatestPostsNumber
 If len(rsLatestPosts("Subject"))>27 then
  strTopicSubject = left(rsLatestPosts("Subject"),27) & "..."
 Else
  strTopicSubject = rsLatestPosts("Subject")
 End If
 strTopicSubjectOrj = rsLatestPosts("Subject")
 strFirstPostMsg = rsLatestPosts("Message")
 strFirstPostMsg = removeHTML(strFirstPostMsg,100,1)
   LastLatestPostsDateTime = rsLatestPosts("Message_date")
   LastLatestPostsDate = DateFormat(LastLatestPostsDateTime)
   if LastLatestPostsDate=strTxtYesterday then LastLatestPostsDate="Dün"
   'if LastLatestPostsDate=strTxtYesterday then LastLatestPostsDate="Yesterday"
   LastLatestPostsTime = TimeFormat(LastLatestPostsDateTime)
  intForumID = CInt(rsLatestPosts("tblForum.Forum_ID"))
  Call forumPermissions(intForumID, intGroupID)
  If blnRead = True Then
NumberOfPosts = NumberOfPosts + 1
   intForumColourNumber = intForumColourNumber + 1
   Response.Write(vbCrLf & " <tr ")
   If (intForumColourNumber MOD 2 = 0 ) Then Response.Write("class=""evenTableRow"">") Else Response.Write("class=""oddTableRow"">")
   Response.Write("<td class=""smText"" >")
   Response.Write "<a href=""forum_posts.asp?TID=" & rsLatestPosts("Topic_ID") & "&" & "PID=" & rsLatestPosts("Last_thread_ID") & "#" & rsLatestPosts("Last_thread_ID") & """ target=""last_post"" class=""smLink"" title="" || "& rsLatestPosts("Forum_name") &" || "& strTopicSubjectOrj &" ||: "& strFirstPostMsg &" "">" & strTopicSubject & "</a></td><td class=""smText"" >"&rsLatestPosts("Username")&"</td><td class=""smText"" >"& LastLatestPostsDate &" - "& LastLatestPostsTime &"</td>"
  end if
rsLatestPosts.movenext
  If blnRead = True Then
   If NOT rsLatestPosts.EOF Then Response.Write("</tr>")
  End If
Loop
End If
Response.Write "</table>"
 rsLatestPosts.Close
 Set rsLatestPosts = Nothing
'**************** melodik *******************
'Clean up
Call closeDatabase()
'**************** melodik *******************
%>



Replies:
Posted By: javi712
Date Posted: 07 September 2006 at 12:54am
Hi Melodik -

Is this for a website's front page or the forum's front page and also for what version?

thanks!


Posted By: rahimi
Date Posted: 07 September 2006 at 7:07am

can you show how use this in Default.asp on use in Include Files ?

thanks


-------------
Mohammad Rahimi ,
Astronomer and Web Developer.


Posted By: melodik
Date Posted: 07 September 2006 at 11:24pm
Line 384-385
'Clean up
' Call closeDatabase() '***************************** melodik *****************************************


Posted By: TechnoDream
Date Posted: 08 September 2006 at 5:08am
please demo !

-------------


Posted By: melodik
Date Posted: 14 September 2006 at 6:43pm
Coming soon. Thumbs%20Up


Posted By: javi712
Date Posted: 14 September 2006 at 7:47pm
can't wait


Posted By: melodik
Date Posted: 18 September 2006 at 9:53pm
Demo:
 
http://www.melodik.net/forum/default.asp#LatestForumPosts - http://www.melodik.net/forum/default.asp#LatestForumPosts


Posted By: javi712
Date Posted: 27 September 2006 at 9:03pm
looks great! i love the option to display 10, 20, 30, etc posts!

for some reason i'm getting a dateformat error, any idea what that might be attributed to?

thanks in advance


Posted By: melodik
Date Posted: 30 September 2006 at 11:56pm
   LastLatestPostsDateTime = rsLatestPosts("Message_date")
   LastLatestPostsDate = DateFormat(LastLatestPostsDateTime)
   'if LastLatestPostsDate=strTxtYesterday then LastLatestPostsDate="Dün"
   'if LastLatestPostsDate=strTxtYesterday then LastLatestPostsDate="Yesterday"
   LastLatestPostsTime = TimeFormat(LastLatestPostsDateTime)


Posted By: javi712
Date Posted: 01 October 2006 at 6:10am
Thanks melodik - now I get the following error however:

ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name or ordinal

any suggestions?

Thanks in advance!


Posted By: nothing
Date Posted: 14 October 2006 at 1:35pm
is it for mssql ? 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net