MOD: Latest Top 10 Messages - Postet den (13886 Views)
Junior Member
balexandre
Innlegg: 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:

<
   
 Sidestørrelse 
Postet den
Advanced Member
Etymon
Innlegg: 2396
2396
Thank you very much, Bruno for sharing your code with us! smile
Cheers,

Etymon
<
Postet den
Junior Member
balexandre
Innlegg: 418
418
just updated...
complete MOD with Rows and Columns ... check the instructions in the Topic smile<
Postet den
Starting Member
Target_Locked
Innlegg: 38
38
Originally posted by balexandre
just updated...
complete MOD with Rows and Columns ... check the instructions in the Topic smile

balexandre,
Thanks for your sharing code. Everything is good, however I would like to suggest:
1. Bring the "Topic name" to top of cell and use bigger font/Bold..., because this is the most important part. 2. Bring item "by User...date...time" to middle position, and use normal font size. Move "date...time" follow to the right of "User" to save a line. 3. Modify the topic link (Topic name) so that it will jump to the last page of the thread. Currently it just jump to the first page.
Thanks.<
Snitz 2000 Ver 3.4.06
Postet den
Junior Member
balexandre
Innlegg: 418
418
Target_Locked:

1. Topics kind to be really big, so I did not added as Big Text to save space, dont forget that this was originaly just for my forum and I use 10 rows by 1 columns

2. this is merelly layout, you can fix the code for that

3. I dont know if you saw it, but there is the same ICON that is used in the forum to jump to last message of the topic, the blue arrow... that one will jump to the last message while the topic name will jump to the first message of the topic, just like any topic in the forum, so you have both links

Etymon:
always welcome smile<
Postet den
Average Member
richfed
Innlegg: 999
999
What would need to be done in this code to prevent previews of posts in private and password protected forums from showing up in the table?
Thanks for any help!<
Postet den
Average Member
kolucoms6
Innlegg: 845
845
Good Question !!!<
Postet den
Junior Member
balexandre
Innlegg: 418
418
hummm... I'm not familiarize with password protected forums, can you give me that MOD link so I can see what new columns does it add so I can provide you with the correct SQL Query for that?
thxs

smile<
Postet den
Average Member
richfed
Innlegg: 999
999
Not a MOD, Bruno ... I believe it is in the base forum code.<
Postet den
Junior Member
balexandre
Innlegg: 418
418
hummm let me download a fresh version and work with it smile
give me a few minutes.

Edited: Done, new version 1.2 will block every message that is not on a forum setup to everyone to see smile<
Postet den
Junior Member
leesh695
Innlegg: 101
101
I have tried this out,

http://www.hwaronecity.info/oriphan/forum/inc_topmessages.asp


Everytime I gives me this error.
Active Server Pages error 'ASP 0113'
Script timed out

/oriphan/forum/inc_topmessages.asp

The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.


Am i doing somthing wrong?<
Du må legge inn en melding