Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Melodik - Latest Posts
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Melodik - Latest Posts

 Post Reply Post Reply Page  12>
Author
melodik View Drop Down
Newbie
Newbie
Avatar

Joined: 26 March 2003
Location: Turkey
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote melodik Quote  Post ReplyReply Direct Link To This Post Topic: Melodik - Latest Posts
    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/
'
'#############################
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 *******************
%>


Edited by melodik - 18 September 2006 at 9:56pm
Back to Top
javi712 View Drop Down
Senior Member
Senior Member


Joined: 22 May 2003
Location: United States
Status: Offline
Points: 488
Post Options Post Options   Thanks (0) Thanks(0)   Quote javi712 Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
rahimi View Drop Down
Groupie
Groupie
Avatar

Joined: 12 January 2004
Location: Iran
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote rahimi Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
melodik View Drop Down
Newbie
Newbie
Avatar

Joined: 26 March 2003
Location: Turkey
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote melodik Quote  Post ReplyReply Direct Link To This Post Posted: 07 September 2006 at 11:24pm
Line 384-385
'Clean up
' Call closeDatabase() '***************************** melodik *****************************************
Back to Top
TechnoDream View Drop Down
Newbie
Newbie


Joined: 23 May 2005
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote TechnoDream Quote  Post ReplyReply Direct Link To This Post Posted: 08 September 2006 at 5:08am
please demo !
Back to Top
melodik View Drop Down
Newbie
Newbie
Avatar

Joined: 26 March 2003
Location: Turkey
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote melodik Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2006 at 6:43pm
Coming soon. Thumbs%20Up
Back to Top
javi712 View Drop Down
Senior Member
Senior Member


Joined: 22 May 2003
Location: United States
Status: Offline
Points: 488
Post Options Post Options   Thanks (0) Thanks(0)   Quote javi712 Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2006 at 7:47pm
can't wait
Back to Top
melodik View Drop Down
Newbie
Newbie
Avatar

Joined: 26 March 2003
Location: Turkey
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote melodik Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2006 at 9:53pm
Back to Top
 Post Reply Post Reply Page  12>

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.