Author |
Topic  |
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 13 November 2000 : 11:14:21
|
This Mod is to change the display in the bottom statistics window. Instead of saying X member(s) have made Y posts, it will change it to say X of Y member(s) have made Z posts....
Change are required, in <b>default.asp</b>
Do a search for "Users", You will notice that the first occurence is enclosed in an <font color=blue>if strShowStatistics <> "1" then</font id=blue> loop, remove both the <font color=blue>if strShowStatistics <> "1" then</font id=blue>statement and the corresponding <font color=blue>end if</font id=blue>
Next look for the WriteStatistics function and change all the code between..<pre id=code><font face=courier size=2 id=code><font color=blue> if intPostCount > 0 then ...... end if </font id=blue> with this <font color=red> <td bgcolor="<%= strForumCellColor %>" colspan="<% if ((strShowModerators = "1") or (mlev = "4" or mlev = "3")) then Response.Write("6") else Response.Write("4") end if%>"> <font face="<%= strDefaultFontFace %>" size="<% =strFooterFontSize %>"> <% if Users = 1 then strUser = Users & " Member" else strUser = Users & " Members" end if if Member_Count = 1 then Response.Write("1 of " & strUser & " has made ") else Response.Write(Member_Count & " of " & strUser & " have made ") end if if intPostCount = 1 then Response.Write("1 post in ") else Response.Write(intPostCount & " posts in ") end if if intForumCount = 1 then Response.Write("1 forum") else Response.Write(intForumCount & " forums") end if if (LastPostDate = "" or LastPostLink = "" or intPostCount = 0) then Response.Write("") else Response.Write(", with the last post on <a href=""" & lastPostLink & """>"& lastPostDate & "</a>") if LastPostAuthorLink <> "" then Response.Write(LastPostAuthorLink & ".") else Response.Write(".") end if end if %> </font> </td> </tr> <tr> </font id=red> </font id=code></pre id=code>
<font color=blue>'Resistance is futile'</font id=blue> |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 13 November 2000 : 13:21:34
|
Very nice code<img src=icon_smile.gif border=0 align=middle>
- Alan alan@calvsa.net www.calvsa.net
|
 |
|
Frodoger
Starting Member
Germany
42 Posts |
Posted - 13 November 2000 : 15:53:43
|
nice code, but it doesn't work
if you make the changes and you logged on to the forum, you don't see any forums. it you logged out , you see all free forums.
The "Admin" see all forums, if he is logged on. But any other user don't see this
Edited by - Frodoger on 13 November 2000 15:55:33 |
 |
|
gor
Retired Admin
    
Netherlands
5511 Posts |
Posted - 13 November 2000 : 16:01:36
|
Frodoger,
How could this code make you not see the forums ? It just displays some extra info.
Are you using Netscape ? In that case you might have deleted one </tr> or added one to many, because Netscape is very precise about that....
<b>Pierre Gorissen</b>
<font color=blue><font size=1>Even if you're on the right track, you'll get run over if you just sit there.</font id=blue></font id=size1> <font size=1><font color=black>Will Rogers</font id=size1></font id=black> |
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 13 November 2000 : 16:17:40
|
gor is right, the code is only changing the formatting of the string, nothing else was changed
<font color=blue>'Resistance is futile'</font id=blue> |
 |
|
Frodoger
Starting Member
Germany
42 Posts |
Posted - 13 November 2000 : 17:59:20
|
my code looks like: <pre id=code><font face=courier size=2 id=code> !--#INCLUDE FILE="inc_top.asp" --> <% strDBNTUserName = Request.Cookies(strCookieURL & "User")("Name") if strAuthType = "nt" then strDBNTUserName = Session(strCookieURL & "userID") end if if IsEmpty(Session(strCookieURL & "last_here_date")) then Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName) end if
set rs1 = Server.CreateObject("ADODB.Recordset")
'## Forum_SQL strSql = "SELECT " & strTablePrefix & "TOTALS.P_COUNT, " & strTablePrefix & "TOTALS.T_COUNT, " & strTablePrefix & "TOTALS.U_COUNT " strSql = strSql & " FROM " & strTablePrefix & "TOTALS"
rs1.open strSql, my_Conn
Users = rs1("U_COUNT") Topics = rs1("T_COUNT") Posts = rs1("P_COUNT")
rs1.Close set rs1 = nothing
'## Forum_SQL - Get all Forums From DB </font id=code></pre id=code> thats the first part, and the second:
<pre id=code><font face=courier size=2 id=code> <% if intPostCount > 0 then %> <td bgcolor="<%= strForumCellColor %>" colspan="<% if ((strShowModerators =
"1") or (mlev = "4" or mlev = "3")) then Response.Write("6") else Response.Write("4") end
if%>"> <font face="<%= strDefaultFontFace %>" size="<% =strFooterFontSize %>"> <% if Users = 1 then strUser = Users & " Member" else strUser = Users & " Members" end if if Member_Count = 1 then Response.Write("1 of " & strUser & " has made ") else Response.Write(Member_Count & " of " & strUser & " have made ") end if if intPostCount = 1 then Response.Write("1 post in ") else Response.Write(intPostCount & " posts in ") end if if intForumCount = 1 then Response.Write("1 forum") else Response.Write(intForumCount & " forums") end if if (LastPostDate = "" or LastPostLink = "" or intPostCount = 0) then Response.Write("") else Response.Write(", with the last post on <a href=""" & lastPostLink &
""">"& lastPostDate & "</a>") if LastPostAuthorLink <> "" then Response.Write(LastPostAuthorLink & ".") else Response.Write(".") end if end if %> </font> </td> </tr> <tr> <% end if %> </font id=code></pre id=code>
thats what i have do after with the code from huwr (nice work) thanx.
the ie 5 brings in the last table:
Microsoft VBScript runtime error '800a000d'
Type mismatch
/forum/default.asp, line 514
Edited by - Frodoger on 13 November 2000 18:01:18 |
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 13 November 2000 : 18:24:42
|
Frodoger, could you indicate which is line 514 in your default.asp, it is unlikely to be the same as mine.
<font color=blue>'Resistance is futile'</font id=blue> |
 |
|
Frodoger
Starting Member
Germany
42 Posts |
Posted - 13 November 2000 : 18:30:47
|
line 514 is the last line in the following code <pre id=code><font face=courier size=2 id=code> <% if intPostCount > 0 then %> <td bgcolor="<%= strForumCellColor %>" colspan="<% if ((strShowModerators = "1") or (mlev = "4" or mlev = "3")) then Response.Write("6") else Response.Write("4") end if%>"> <font face="<%= strDefaultFontFace %>" size="<% =strFooterFontSize %>"> <% if Users = 1 then </font id=code></pre id=code>
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 13 November 2000 : 18:47:46
|
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> line 514 is the last line in the following code <pre id=code><font face=courier size=2 id=code> <% if intPostCount > 0 then %> <td bgcolor="<%= strForumCellColor %>" colspan="<% if ((strShowModerators = "1") or (mlev = "4" or mlev = "3")) then Response.Write("6") else Response.Write("4") end if%>"> <font face="<%= strDefaultFontFace %>" size="<% =strFooterFontSize %>"> <% if Users = 1 then </font id=code></pre id=code> <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Try changing it to if cInt(users) = 1 then
let me know if that works
<font color=blue>'Resistance is futile'</font id=blue> |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 14 November 2000 : 01:54:09
|
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Very nice code<img src=icon_smile.gif border=0 align=middle>
- Alan alan@calvsa.net www.calvsa.net <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
I added this code to a fresh install of 3.1sr2 and it worked fine, hence the comment.
I even tried adding and deleting topics/members/forums and it worked great.
- Alan alan@calvsa.net www.calvsa.net
|
 |
|
Frodoger
Starting Member
Germany
42 Posts |
Posted - 14 November 2000 : 05:37:19
|
mmh it don't works... <pre id=code><font face=courier size=2 id=code> <% if intPostCount > 0 then %> <td bgcolor="<%= strForumCellColor %>" colspan="<% if ((strShowModerators = "1") or (mlev = "4" or mlev = "3")) then Response.Write("6") else Response.Write("4") end if%>"> <font face="<%= strDefaultFontFace %>" size="<% =strFooterFontSize %>"> <% if cInt(users) = 1 then strUser = Users & " Member" else </font id=code></pre id=code> ie5 says: Microsoft VBScript runtime error '800a000d'
Type mismatch: 'cint'
/forum/default.asp, line 514
and the netscape version don't work again... stuff. but i think to post the whole default.asp here is to big.
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 14 November 2000 : 06:17:49
|
Frodoger, Could you email me your default.asp, I will take a look at it.
<font color=blue>'Resistance is futile'</font id=blue> |
 |
|
Frodoger
Starting Member
Germany
42 Posts |
Posted - 15 November 2000 : 08:49:31
|
the mail was yeserday mailed to you
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 15 November 2000 : 09:02:45
|
I fixed a couple of things and mailed it back, have you not received it ?
<font color=blue>'Resistance is futile'</font id=blue> |
 |
|
Frodoger
Starting Member
Germany
42 Posts |
Posted - 16 November 2000 : 16:02:59
|
i dont receive your mail yet :(
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 16 November 2000 : 16:22:29
|
Just resent it, I hit reply to your email, and forgot to change the recipient. Appologies to the webmaster here if he didn't have a clue what was going on <img src=icon_smile.gif border=0 align=middle>
<font color=blue>'Resistance is futile'</font id=blue> |
 |
|
Topic  |
|