Author |
Topic |
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 29 November 2003 : 04:01:01
|
Sure you could do that You'll need some more SQL to Select the COUNT(*) of the number of rows in FORUM_REPLY that match the TOPIC_ID for each item as you display it. |
Kiwihosting.Net - The Forum Hosting Specialists
|
|
|
RebelTech
Average Member
USA
613 Posts |
Posted - 29 November 2003 : 04:42:20
|
I tried this for the sql strSql = strSql & strTablePrefix & "TOPICS.T_REPLIES, "
That was wrong and she no gonna work. And I was trying to use & objRS("T_REPLIES") & to display the results. I have no idea yet if that one will work because I think there is a serious error in my sql statement.. |
|
|
RebelTech
Average Member
USA
613 Posts |
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 29 November 2003 : 05:07:35
|
mytest.asp I think I like best, hard choice to make actually they both look fine. |
Kiwihosting.Net - The Forum Hosting Specialists
|
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 29 November 2003 : 08:42:11
|
Not the most efficient but this will get you your reply count.
While Not objRS.EOF
strSQL = "SELECT COUNT(*) FROM FORUM_REPLY WHERE TOPIC_ID = " & objRS("TOPIC_ID")
Set objRS2 = objConn.Execute(strSQL)
Response.Write "Posted by: " & objRS("M_NAME") & " on " & strToDate(objRS("T_DATE")) & "<BR>"
Response.Write ChkString(objRS("T_SUBJECT"),"title") & "<BR>"
Response.Write Left(RemoveHTML(FormatStr(objRS("T_MESSAGE"))),CharsToDisplay) & "<BR>"
Response.Write "<a href='topic.asp?TOPIC_ID=" & objRS("TOPIC_ID") & "'>more (" & objRS2(0) & ") »</a>"
Response.Write "<HR SIZE='1' NOSHADE>"
objRS.MoveNext()
Wend
objRS2.Close()
Set objRS2 = Nothing
objRS.Close()
Set objRS = Nothing
objConn.Close()
Set objConn = Nothing
Response.End
|
Kiwihosting.Net - The Forum Hosting Specialists
|
Edited by - Gremlin on 29 November 2003 08:42:36 |
|
|
RebelTech
Average Member
USA
613 Posts |
Posted - 29 November 2003 : 09:41:58
|
Ok, the reply changes work great. Ready to release it as a mod? I have the cosmetics done (so-so) and the zip file ready to download. The zip contains the basic page, an include version and the readme. |
|
|
RebelTech
Average Member
USA
613 Posts |
Posted - 29 November 2003 : 09:58:00
|
Crypto, thanks for spotting that. Did you get gremlin's fix? I hope that helped with your blog project. I have been thinking about the blog thing also. Have you got yours ready to show? I would like to see how your doing it.
I see you did get the fix |
Edited by - RebelTech on 29 November 2003 10:01:56 |
|
|
RebelTech
Average Member
USA
613 Posts |
Posted - 29 November 2003 : 09:59:56
|
quote: Originally posted by masterao
There is a function in the Content Display mod which removes all forum code from a message. That sounds as if it should work here just as well, although it will probably have to be changed a little. If you decide to use it, you should comment the function and mention which mod the function comes from along with the author's name (@tomic), so that you credit him properly.
Thank you for the information. |
|
|
RebelTech
Average Member
USA
613 Posts |
Posted - 29 November 2003 : 10:25:58
|
Moderators, could you move this topic to MOD Add-On Forum (W/Code)? Thanks |
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 29 November 2003 : 19:59:51
|
Might want to put some caveat's in there stating the topics aren't checked to see if they're in a private forum or not, so if you set the display = "ALL" it would show recent posts even in private member only or password protected forums. |
Kiwihosting.Net - The Forum Hosting Specialists
|
|
|
RebelTech
Average Member
USA
613 Posts |
Posted - 29 November 2003 : 20:28:06
|
I will update the zip now! |
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 29 November 2003 : 22:02:28
|
Cheers.
Maybe call it something else too, to be honest I'd prefer not to support it as a MOD (i have pleanty to support now with my hosting customers) all I did really was give you a start in the right direction. |
Kiwihosting.Net - The Forum Hosting Specialists
|
|
|
acoustika
Junior Member
Denmark
311 Posts |
Posted - 30 November 2003 : 02:30:38
|
I have tried making this work on MySql, and it won't THE SAME PROB: I HAVE WITH ALOT OF MODS and MySQL, it seems that all the Mods that use the "SELECT TOP" statement won't work with my MySql, it like the TOP statement isn't a MySQl command. And I'm not strong enough in this, I corrected this in My Personalization Mod by using LIMIT instead, and in some statistics MOds by simply remomving the "TOP" word, but is it because the TOP statement only is for Access???? |
May The Code Be With You www.UniqueDk.dk *** The Open Forums of Denmark *** |
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 30 November 2003 : 03:21:58
|
Yes TOP is MS Specific, just remove the TOP x and replace it with a LIMIT x at the end of the select for mySQL. Depending on your version of mySQL you may also have problems with the JOINS I think too. |
Kiwihosting.Net - The Forum Hosting Specialists
|
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 30 November 2003 : 08:51:07
|
quote: Originally posted by acoustika
I have tried making this work on MySql, and it won't THE SAME PROB: I HAVE WITH ALOT OF MODS and MySQL, it seems that all the Mods that use the "SELECT TOP" statement won't work with my MySql, it like the TOP statement isn't a MySQl command. And I'm not strong enough in this, I corrected this in My Personalization Mod by using LIMIT instead, and in some statistics MOds by simply remomving the "TOP" word, but is it because the TOP statement only is for Access????
Onewaymule pointed out the snitz fix for this in your topic from a few days ago. There's a function in "inc_func_common" called "TopSql" that configures the sql for the different servers. My coding is not to good but I used it on the code I posted for acoustika the other day and it works fine. Below is just an example of how I used it.
Just remove "Top" and open instead of this 'set rs = my_Conn.Execute (strSql)
use this set rs = Server.CreateObject("ADODB.Recordset") rs.open TopSQL(strSql,numDis), my_Conn
Where numDis is the variable for the number to display. |
_-/Cripto9t\-_ |
|
|
Topic |
|