Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Active Users - Active Members Record?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
MarkJH Posted - 03 January 2005 : 05:01:07
I was wondering if it was possible to change the way Active Users works so that it displays the record Active Members as well as record Active Users.

Something like this:

Active Members: 10 | Guests: 54 | Total: 64
Active Members Record: 25 | Record Set On: 14 Dec 2004 at 15:09:22
Active Users Record: 189 | Record Set On: 19 Dec 2004 at 22:54:48

How could it be done?<
15   L A T E S T    R E P L I E S    (Newest First)
masterao Posted - 15 August 2005 : 10:49:18
Im glad you got it working, jonaldjustine.<
jonaldjustine Posted - 14 August 2005 : 08:09:49
quote:
Originally posted by masterao

jonaldjustine, I think you forgot the the code which goes into inc_header.asp, namely the ActiveUserTracker() part. Also, don't hijick this topic as your problem isn't related to this. Instead, create your own topic in Help: MOD Implementation forum next time .



Thanks for your help... It worked! There's something mispelled in that portion. Don't worry, I will post there next time...<
masterao Posted - 13 August 2005 : 20:38:49
jonaldjustine, I think you forgot the the code which goes into inc_header.asp, namely the ActiveUserTracker() part. Also, don't hijick this topic as your problem isn't related to this. Instead, create your own topic in Help: MOD Implementation forum next time .<
StephenD Posted - 13 August 2005 : 03:40:03
Did you run audbsetup.asp in the readme file for this mod?<
jonaldjustine Posted - 13 August 2005 : 03:13:39
surely there's something wrong:



can you help me fix it?<
MarkJH Posted - 08 January 2005 : 20:59:21
Thanks for the guidance, Jan! Yes, it looks like it's working perfectly now. <
masterao Posted - 08 January 2005 : 17:45:36
I suspected that . Im glad you got it running.<
MarkJH Posted - 08 January 2005 : 11:50:31
I deleted and added again the two new fields in the database. Currently, I have 6 members online and the record is also 6. Going to keep an eye on it.<
MarkJH Posted - 08 January 2005 : 05:11:48
It was the latter.

Something still isn't right, though. It's telling me that the active members record is 87! My forum's popular but not that popular!

There must still be some kind of error somewhere...<
masterao Posted - 07 January 2005 : 19:43:18
That seems correct. Have you added the two new fields into the database? Have you also added the variables into config.asp? I suspect that it is the last that you haven't done yet, which would explain why the new record and date isn't showing. If it isn't added in config.asp, the variables aren't populated.<
MarkJH Posted - 07 January 2005 : 12:18:22
Okay, I've got so far but I've hit a wall.

I've created a new function in inc_func_common called chkAUMeRecord:

function chkAUMeRecord(intTotalActiveMembers)
  if cInt(intTotalActiveMembers) > cInt(intAUMeRecord) then 'We have a new record!!! :)
    'Check to see if it *Really* is a record, or if Application varaibles just got reset
	strSql = "SELECT C_VALUE FROM " & strTablePrefix & "CONFIG_NEW WHERE C_VARIABLE = 'intAUMeRecord'"
	set rs = my_conn.execute (strSql)
	intOldMeRecord = cint(rs("C_VALUE"))
	rs.close
	set rs = nothing
	if cInt(intOldMeRecord) > cInt(intTotalActiveMembers) then
	  'Oopsi, this was a false alarm
	  strSql = "SELECT C_VALUE FROM " & strTablePrefix & "CONFIG_NEW WHERE C_VARIABLE = 'strAUMeRecordDate'"
	  set rs = my_conn.execute (strSql)
	  strOldMeDate = rs("C_VALUE")
	  rs.close
	  set rs = nothing
      Application(strCookieURL & "INTAUMERECORD") = intOldMeRecord
      Application(strCookieURL & "STRAUMERECORDDATE") = strOldMeDate
      intAUMeRecord = intOldMeRecord
      strAUMeRecordDate = strOldMeDate
	else
      my_conn.execute ("UPDATE " & strTablePrefix & "CONFIG_NEW SET C_VALUE = '" & cstr(intTotalActiveMembers) & "' WHERE C_VARIABLE = 'intAUMeRecord'")
      my_conn.execute ("UPDATE " & strTablePrefix & "CONFIG_NEW SET C_VALUE = '" &DateToStr(strForumTimeAdjust) & "' WHERE C_VARIABLE = 'strAUMeRecordDate'")
      intAUMeRecord = intTotalActiveMembers
      strAUMeRecordDate = DateToStr(strForumTimeAdjust)
      Application(strCookieURL & "INTAUMERECORD") = intTotalActiveMembers
      Application(strCookieURL & "STRAUMERECORDDATE") = DateToStr(strForumTimeAdjust)
	end if
  end if
end function


In inc_activeusers I've created a new variable called intTotalActiveMembers which is basically intTotalActiveUsers without adding the guests. Therefore, I've changed the code thus:

'## Ls3k - Now lets count those peskey guests.
strSql = "SELECT COUNT(AU_IP) AS CNT FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID = -1"
set rs = my_conn.execute (strSql)
intActiveGuests = rs("CNT")
rs.close
set rs = nothing
intTotalActiveMembers = intTotalActiveUsers
intTotalActiveUsers = intTotalActiveUsers + intActiveGuests


I've added the call to the function to check the record:

'## Ls3k - Ok, now it is time to check the record, cause it would be cool if we broke it!
chkAUMeRecord(intTotalActiveMembers)
chkAURecord(intTotalActiveUsers)


I've added a new line of code to the stats which displays the new active members record like this:

if (strAUAdminColor <> "" or strAUModColor <> "") AND intActiveMembers > 0 then
      response.write "                  [ <font color=""" & strAUAdminColor & """>" & fLang(strLangMOD_Ls3kAU_00050) & "</font> | <font color=""" & strAUModColor & """>" & fLang(strLangMOD_Ls3kAU_00060) & "</font> ]" & VBNewLine
    end if
    response.write "            <br>" & VBNewLine & _
                   "            " & fLang(strLangMOD_Ls3kAU_00120) & ": " & intAUMeRecord & " | " & fLang(strLangMOD_Ls3kAU_00080) & ": " & ChkDate(strAUMeRecordDate," " & fLang(strLangMOD_Ls3kAU_00090) & " ",true) & VBNewLine & _
                   "            <br>" & VBNewLine & _
                   "            " & fLang(strLangMOD_Ls3kAU_00070) & ": " & intAURecord & " | " & fLang(strLangMOD_Ls3kAU_00080) & ": " & ChkDate(strAURecordDate," " & fLang(strLangMOD_Ls3kAU_00090) & " ",true) & VBNewLine & _
                   "        </td>" & VBNewLine & _
                   "      </tr>" & VBNewLine & _
                   "      <tr>" & VBNewLine & _
                   "        <td class=""forumheader"" colspan=""" & sGetColspan(6,5) & """>" & VBNewLine & _
                   "            " & fLang(strLangMOD_Ls3kAU_00100) & ": "


(strLangMOD_Ls3kAU_00120 = "Active Members Record: ")

I've added the new variables to the CONFIG_NEW table in the database using the alternative mod setup as you suggested, and checking the database, they are being populated with the members record and time of record.

BUT, the results are not showing up on default.asp. All I'm getting is "Active Members Record: | Record Set On: "

I think I'm close but can you see where I've gone wrong?<
masterao Posted - 06 January 2005 : 09:21:35
Oh, ok .

Adding those isn't too difficult, as you can use the alternative mod setup. The code needed would be something like this:

[INSERT]
CONFIG_NEW
(C_VARIABLE,C_VALUE)#('intAUMeRecord','0')
(C_VARIABLE,C_VALUE)#('strAUMeRecordDate','11111111111111')
[END]

That assumes that you name the new variables intAUMeRecord and strAUMeRecordDate.<
MarkJH Posted - 05 January 2005 : 11:39:08
Actually, I was referring to the new_config table in the database. <
masterao Posted - 05 January 2005 : 08:33:07
Just remember to backup the files and add one piece of code at a time. That way you can see if a table gets out of its borders.

If you get stuck and need help, post here and I will help you.<
MarkJH Posted - 04 January 2005 : 19:04:16
I'm a cut-and-paste coder at best, Jan. I see what you are saying and I think I see how it can be done... without too much ASP knowledge. If I can set aside some time, I'll see if I can create the MOD. Would make a nice addition to the AU MOD, IMHO.

To be honest, I think I'm more scared about messing up the tables!<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.1 seconds. Powered By: Snitz Forums 2000 Version 3.4.07