New Posts New Posts RSS Feed - Top 10 users
  FAQ FAQ  Forum Search   Register Register  Login Login

Topic ClosedTop 10 users

 Post Reply Post Reply Page  123>
Author
macpack View Drop Down
Newbie
Newbie


Joined: 19 Jun 2009
Status: Offline
Points: 38
Direct Link To This Post Topic: Top 10 users
    Posted: 18 Oct 2009 at 5:25pm
Is it possible you can help me with some .asp programmering.?
 
I need a code to place on my site so i can show.
 
Alltime Top 10 thread writers
Month Top 10 thread writers
 
Is it something you can make bro.?SmileSmileSmile
Back to Top
slog View Drop Down
Newbie
Newbie


Joined: 15 Sep 2009
Status: Offline
Points: 7
Direct Link To This Post Posted: 19 Oct 2009 at 7:18am
This sounds very nice, let me know if you get anything on that.

I've searching webwizguide foruns for something like that, but they only have tips on how to modificate from top 10 active topics to top 10 users, but it never mention a monthly thing...

Here are some links.




Back to Top
Matt View Drop Down
Admin Group
Admin Group


Joined: 07 Feb 2003
Location: Manchester, UK
Status: Offline
Points: 195
Direct Link To This Post Posted: 19 Oct 2009 at 1:27pm
Overall Top 10 Posters is very easy to do as you can use the Post_Count that is already set in the tblAuthor table.

How ever, Top 10 Posters this month would be difficult since you would need to loop through the Members and some how count all the posts they have made that month at the same time.


I will post the code for Overal Top 10 later, but I may need to get back to you about the Monthly one.
Back to Top
macpack View Drop Down
Newbie
Newbie


Joined: 19 Jun 2009
Status: Offline
Points: 38
Direct Link To This Post Posted: 21 Oct 2009 at 6:05am
Originally posted by Scotty32 Scotty32 wrote:

Overall Top 10 Posters is very easy to do as you can use the Post_Count that is already set in the tblAuthor table.

How ever, Top 10 Posters this month would be difficult since you would need to loop through the Members and some how count all the posts they have made that month at the same time.


I will post the code for Overal Top 10 later, but I may need to get back to you about the Monthly one.
 
Okey its perfect anyway scotty.
 
A Overal top 10 posters, whould also be very nice to start with fore me..
 
Hope to hear from you as soon as possible. Tongue
Back to Top
macpack View Drop Down
Newbie
Newbie


Joined: 19 Jun 2009
Status: Offline
Points: 38
Direct Link To This Post Posted: 23 Oct 2009 at 3:50am
Hey Scotty, is it possible you can fix that overall top 10 posters this week.?Tongue
Back to Top
macpack View Drop Down
Newbie
Newbie


Joined: 19 Jun 2009
Status: Offline
Points: 38
Direct Link To This Post Posted: 29 Oct 2009 at 4:15am
any news scotty..
Maybe its possible it can goes faster, if i can donate some money each time am searching for a new little script or so mate.?
Back to Top
Matt View Drop Down
Admin Group
Admin Group


Joined: 07 Feb 2003
Location: Manchester, UK
Status: Offline
Points: 195
Direct Link To This Post Posted: 30 Oct 2009 at 11:14am

You can donate an amount you feel apropriate by using the link on the Web Wiz Forums Modifications page


Add the following in a code block before the head of your page:


    strSQL = "SELECT TOP 10 " & strDbTable & "Author.Author_ID, " & strDbTable & "Author.Username FROM " & strDbTable & "Author ORDER BY " & strDbTable & "Author.No_of_posts DESC;"
    rsCommon.Open strSQL, adoCon
    if rsCommon.EOF or rsCommon.BOF then
        blnNoMembers = True
    else
        blnNoMembers = False
        saryMembers = rsCommon.getrows()
 
        intMembersFirst = LBound(saryMembers, 2) 
        intMembersLast = UBound(saryMembers, 2)
 
        intMembersCount = intMembersLast
    end if
    rsCommon.Close



Add the following where you want the top 10 posters to appear:

            <table cellspacing="1" cellpadding="3" class="tableBorder">

            <tr class="tableLedger">
                <td colspan="3" height="2">Top 10 Posters</td>
            </tr><%
                if blnNoMembers then
 
                else
                for iLoop = intMembersFirst to intMembersLast
 
                    intAuthorID        = saryMembers(0, iLoop)
                    strAuthorName        = saryMembers(1, iLoop)

            %><tr class="tableRow">
                <td>&nbsp;-&nbsp;<a rel="nofollow" href="member_profile.asp?PF=<%=intAuthorID%>"><%=strAuthorName%></a></td>
            </tr><%
                next
                end if
            %><tr class="tableBottomRow">
                <td align="right"><a rel="nofollow" href="members.asp?SF=&GID=0&SO=PT&OB=desc">View latest members.</a></td>
            </tr>
            </table>



The above code assumes you are adding it to an existing page on your forum and are using MSSQL Server for the database.
Back to Top
macpack View Drop Down
Newbie
Newbie


Joined: 19 Jun 2009
Status: Offline
Points: 38
Direct Link To This Post Posted: 01 Nov 2009 at 2:37pm
I get this error:
 

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[MySQL][ODBC 3.51 Driver][mysqld-5.1.30-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10 tblAuthor.Author_ID, tblAuthor.Username FROM tblAuthor ORDER BY tblAuthor.No_' at line 1

/mf-top-posters.asp, line 13

But am useing mysql, is that a problem or am i doing something wrong mate.?
Back to Top
Matt View Drop Down
Admin Group
Admin Group


Joined: 07 Feb 2003
Location: Manchester, UK
Status: Offline
Points: 195
Direct Link To This Post Posted: 01 Nov 2009 at 3:44pm
Change the SQL to:

strSQL = "SELECT " & strDbTable & "Author.Author_ID, " & strDbTable & "Author.Username FROM " & strDbTable & "Author ORDER BY " & strDbTable & "Author.No_of_posts DESC LIMIT 0,10;"

Back to Top
macpack View Drop Down
Newbie
Newbie


Joined: 19 Jun 2009
Status: Offline
Points: 38
Direct Link To This Post Posted: 02 Nov 2009 at 4:27pm
hey again scotty,
now i have changed the strSQL line, but now it says:
 
 

Microsoft VBScript runtime error '800a01f4'

Variable is undefined: 'blnNoMembers'

/mf-top-posters.asp, line 17

Back to Top
 Post Reply Post Reply Page  123>
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.141 seconds.