Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 External view of users online
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Tracy Della Vecchia
Starting Member

USA
11 Posts

Posted - 06 March 2008 :  21:50:16  Show Profile  Visit Tracy Della Vecchia's Homepage
I have a couple of snitz forums. On one, I've got the current users
online and the highest number of users online. On the other one, I
apparently didn't add that mod. Now, a couple years later, I need
to install that mod.

Does anyone know, from looking at these forums, which mod I used?

http://www.usmcparents.com/forum/default_group.asp (you'll see it at
the bottom of the forum page, to the left of the copyright in the
same place as the "this page was generated in 0.59 seconds."

and this is the one that I don't have it on, though I did change the
inc_footer.asp file for the text; I just don't remember what other
files were used/changed:
http://www.recruitparents.com/forum/default_group.asp

sql databases for both forums...

Any help would be appreciated. Thanks, Tracy

Tracy Della Vecchia
http://www.MarineParents.com
http://www.recruitparents.com
http://www.usmcparents.com

Edited by - Tracy Della Vecchia on 06 March 2008 21:53:29
Go to Top of Page

thermal_seeker
Junior Member

United Kingdom
430 Posts

Posted - 09 March 2008 :  06:44:49  Show Profile
I seem to be missing something here...

I'm using the js version and I seem to be missing a test_js.asp file

can anyone tell me what goes in this file?

Dave

No good at coding, but I can plough a field !!
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 09 March 2008 :  12:21:19  Show Profile
I think this is what you are looking for..
1. create a new file called test_js.asp and insert all this code:

<% Response.ContentType = "text/javascript" %>

    function getSentence()
    {
        var iUsers  = <%= application("HowManyMembersInForum") %>;
        var iGuests = <%= application("HowManyGuestsInForum") %>;
        var sOutput = '';
        
        // validating
        if ( IsNumeric(iUsers)  == false ) iUsers  = 0;
        if ( IsNumeric(iGuests) == false ) iGuests = 0;
        
        // Builing the output text
        if ( iUsers == 0 ) sOutput = 'There is no current members ';
        if ( iUsers == 1 ) sOutput = 'There is 1 current member ';
        if ( iUsers > 1  ) sOutput = 'There are currently ' + iUsers + ' members ';
        
        if ( iGuests == 0 ) sOutput = sOutput + 'and no current guests viewing the forum.';
        if ( iGuests == 1 ) sOutput = sOutput + 'and only 1 guest viewing the forum.';
        if ( iGuests > 1  ) sOutput = sOutput + 'and ' + iGuests + ' guests viewing the forum.';
        
        // Outputting
        document.write(sOutput);
    }
    
    // just to check if the String is a Numeric Number
    function IsNumeric(sText)
    {
        var ValidChars = "0123456789.";
        var IsNumber=true;
        var Char;
        
        for (i = 0; i < sText.length && IsNumber == true; i++) 
        { 
            Char = sText.charAt(i); 
            if (ValidChars.indexOf(Char) == -1) 
            	IsNumber = false;
        }
        return IsNumber;
    }
response.Flush()


2. in your HTML code, put this inside the HEAD tag


<script src="test_js.asp" ></script>


3. and when you want to put the line, add this:


<script type="text/javascript"> getSentence(); </script>
I think that is what you are after

rgds andy
Go to Top of Page

thermal_seeker
Junior Member

United Kingdom
430 Posts

Posted - 09 March 2008 :  13:15:21  Show Profile
Thanks Andy

No good at coding, but I can plough a field !!
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 09 March 2008 :  13:43:44  Show Profile
No problems
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07