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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: Latest Top 10 Messages
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 4

balexandre
Junior Member

Denmark
418 Posts

Posted - 26 November 2007 :  01:49:37  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
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...


' **********************************************************************************************
' 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

<!-- #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:






<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 10 July 2008 16:31:51

Etymon
Advanced Member

United States
2385 Posts

Posted - 26 November 2007 :  16:04:45  Show Profile  Visit Etymon's Homepage  Reply with Quote
Thank you very much, Bruno for sharing your code with us!

Cheers,

Etymon
<
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 26 November 2007 :  18:31:05  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
just updated...

complete MOD with Rows and Columns ... check the instructions in the Topic <

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page

Target_Locked
Starting Member

Vietnam
38 Posts

Posted - 06 December 2007 :  02:22:52  Show Profile  Reply with Quote
quote:
Originally posted by balexandre

just updated...

complete MOD with Rows and Columns ... check the instructions in the Topic



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

Edited by - Target_Locked on 06 December 2007 02:30:45
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 07 December 2007 :  16:24:54  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
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 <

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 29 February 2008 :  14:36:51  Show Profile  Visit richfed's Homepage  Reply with Quote
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!<
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 29 February 2008 :  14:40:25  Show Profile  Reply with Quote
Good Question !!!<
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 01 March 2008 :  14:38:17  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
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

<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 01 March 2008 :  15:42:33  Show Profile  Visit richfed's Homepage  Reply with Quote
Not a MOD, Bruno ... I believe it is in the base forum code.<

Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 01 March 2008 :  17:03:35  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
hummm let me download a fresh version and work with it

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 <

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 01 March 2008 17:57:20
Go to Top of Page

leesh695
Junior Member

101 Posts

Posted - 01 March 2008 :  21:10:26  Show Profile  Reply with Quote
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?<
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 01 March 2008 :  22:39:08  Show Profile  Visit bobby131313's Homepage  Reply with Quote
It's not going to work standalone. It needs other include files, so it will have to be included on a forum page to work.<

Switch the order of your title tags
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 02 March 2008 :  05:02:36  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
bobby131313:
it works standalone as you can see it here:
http://ga-paneuropean.com/gape/test_topMessages.asp

leesh695:
in your page it says: "Top 1 messages!"
how is your specifications on the rows and columns?
on this code, use rows = 10 and cols = 1 just for testing and dont change anything else
TABLE_TYPE_ROWS = 10			' Number of rows ( Can't be <= 0 ) >> please read note
TABLE_TYPE_COLS = 1 			' Number of columns ( Can't be <= 0 ) >> please read note
TABLE_TYPE_TOP  = TABLE_TYPE_ROWS * TABLE_TYPE_COLS

' NOTE: in order to mantain a reading layout, the SELECT TOP function is determinated by
'       multipling Rows by Columns.
'       SELECT TOP ( Rows x Columns ) ... 

MAX_MESSAGE_LEN = 70			' Display the first 70 characters
MAX_MESSAGE_BREAK_LEN = 40		' If in thoose 70 charcarters there is no white space, add one
OWN_MESSAGE_COLOR = "#E6EFF7"	' Background color of message if it belongs to the user logged in

but it's easy to get the actual error, just comment
on error resume next

and uncomment
on error goto 0

2nd and 3rd line

from this
on error resume next
'on error goto 0


pass to this
'on error resume next
on error goto 0


and paste the error, or send me directly to
bruno [dot] in [dot] dk [at] gmail [dot] com<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 02 March 2008 05:07:21
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 02 March 2008 :  08:46:21  Show Profile  Visit richfed's Homepage  Reply with Quote
Are we sure the code has been updated at the above link?<

Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 02 March 2008 :  11:02:07  Show Profile  Visit bobby131313's Homepage  Reply with Quote
Sorry Bruno, that's what I get for assuming.

Anyways, here's the error message...

ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/inc_topMessages.asp, line 103
<

Switch the order of your title tags

Edited by - bobby131313 on 02 March 2008 11:14:29
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 02 March 2008 :  12:58:39  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
richfed:

just check for the correct version of the TXT file, the header must be the same as the header in the 1st topic, if you are seeing version 1.1 refresh the page

bobby131313:

can you send me your MSN by email please, I will try to help you by MSN cause I can't see what's happening, it seams that the query does not return any row.



--
always remember that the code is online in my forum<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 02 March 2008 13:09:46
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07