MOD: Latest Top 10 Messages - Posted (13882 Views)
Junior Member
balexandre
Posts: 418
418
continuing what I said in this topic about the "Show how many messages since yours" here is the Finished MOD that you can start use...
Code:

' **********************************************************************************************
' Author: Bruno Alexandre <bruno [dot] in [dot] dk [at] gmail [dot] com>
' Date: April 2007
' MOD: Get last 10 messages in the Forum
' Function:
' Displays vertically and horizontally the Top messages in the Forum
' it turns user own message in a different color
' Versions:
' 1.0 Original version
' 1.1 26.11.07 Added more string to the translate part
' Added Rows and Columns in order to display
' 1.2 01.03.08 Added block preventing private messages to show
' 1.3 02.03.08 Updated with TopSQL() so it runs in mySQL as well (>4.x)
'
' **********************************************************************************************


How to use it It's really simple, the MOD will build a table with Rows and Columns that you can specified in the 2 variables, the TOP messages displayed will be the multiplication of those 2 values, so if you specify 2 rows by 5 cols you will get the Top 10 messages in the forum, if you select 4 rows by 5 cols you will get the Top 20 messages in the forum.
There are more variables that you can play with, and the right translation as well using the Session.LCID variable in ASP.

How to get it check it here to see the code
save as inc_topMessages.asp and just place the include where you need it like

Code:
<!-- #include file="inc_topMessages.asp" -->

How can I test it you have this direct link that, by default shows you 2 rows by 5 columns, to use with more variations, I changed the code so you can use the query to pass how many rows and how many columns you want to be displayed...
so, instead of http://ga-paneuropean.com/gape.v2/test_topMessages.asp you can add ?rows=4&cols=2 to be like http://ga-paneuropean.com/gape.v2/test_topMessages.asp?rows=4&cols=2 so it will show you 4 rows by 2 columns.
Hope you like the MOD.
Images so you can see what the mod does:

<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Starting Member
Jays
Posts: 24
24
Thank you for your response, here is a link to my site
http://newsthatsused.com/newsthatsused/aion/forum/
I am using Internet Explorer

I'm wondering if it has anything to do will the "select case session.lcid" which I have included below. The first part is written in Portuguese (I'm assuming).
select case session.lcid
case 2070 ' PT-pt
strTop10TopMsg = "Últimas " & cStr(TABLE_TYPE_TOP) & " mensagens!"
strTop10MsgBottomLink = "Últimos tópicos activos"
strTop10MsgTopic = "Tópico"
strTop10MsgBy = "por"
strTop10MsgIn = "em"
strTop10Error = "TABLE_TYPE_ROWS e/ou TABLE_TYPE_COLS não são um valor numerico!"
case else ' All the others
strTop10TopMsg = "Top " & cStr(TABLE_TYPE_TOP) & " messages!"
strTop10MsgBottomLink = "Active topics"
strTop10MsgTopic = "Topic"
strTop10MsgBy = "by"
strTop10MsgIn = "in"
strTop10Error = "TABLE_TYPE_ROWS and/or TABLE_TYPE_COLS are not a numeric value!"
end select

TIA
Jays
Posted
Starting Member
Jays
Posts: 24
24
Sorry, I had to remove it from my site, but thank you anyway.
I suspect I have an open tag somewhere

Jays
You Must enter a message