T O P I C R E V I E W |
balexandre |
Posted - 26 May 2007 : 06:16:47 I just made this for my self as an add-on of what I did in the Forum main page (show the last 10 messages posted).
the objective was something like "GMAIL - Inbox (3)" and this is the code I uses in my page.
you can have the same in 2 steps please note that this is only to change the title of the page, the Top 10 messages that you can see in the images below ARE NOT included in this tutorial, another thing is, this only works with Access DB and MySQL above version 4.x.
- ADD THIS IN inc_header.asp BEFORE the 2nd response.write function that had the tag:
<title> (so, search for <title> , the 2nd one STOP and scroll up until you get the response.write, above that line, paste the include)
paste this:
- in a new file called
inc_showMsgNrOnTitle.asp paste this:
Hope you find this useful
my Forum: www.ga-paneuropean.com
www.ga-paneuropean.com/gape.v2/ajuda/NrMoreMessages2.gif" border="0">
www.ga-paneuropean.com/gape.v2/ajuda/NrMoreMessages.gif" border="0">
< |
15 L A T E S T R E P L I E S (Newest First) |
phy1729 |
Posted - 10 July 2008 : 16:17:34 It already has been http://forum.snitz.com/forum/topic.asp?TOPIC_ID=65954< |
Target_Locked |
Posted - 12 November 2007 : 21:58:02 quote: Originally posted by balexandre
well, this topic only concerns in showing how many messages since your last message, and the code it's here
for the Latest Top 10 messages, that I think that is what you are interest in, I need to pick up the code and implemented in a MOD, it's just one file and you include it where you need, right now, it's a vertical table, and the Snitz Forum as you know does not have that space at the forum left side... I had to edit the include header file for that effect, I will create a new topic with the file you need.
"Latest Top 10 messages" That's what I am looking for. Hoping that your MOD will be released soon.< |
balexandre |
Posted - 08 November 2007 : 03:37:13 well, this topic only concerns in showing how many messages since your last message, and the code it's here
for the Latest Top 10 messages, that I think that is what you are interest in, I need to pick up the code and implemented in a MOD, it's just one file and you include it where you need, right now, it's a vertical table, and the Snitz Forum as you know does not have that space at the forum left side... I had to edit the include header file for that effect, I will create a new topic with the file you need.
< |
Target_Locked |
Posted - 07 November 2007 : 22:32:40 Hi Bruno Alexandre, Could you show detailed instruction to implement your MOD. Such as which file, go to which line number? and how that line look like? and what ver of Snitz was tested? Thanks.< |
balexandre |
Posted - 29 May 2007 : 07:00:08 nice one AnonJr
updated !
(2 many functions and not that inside the core of the Forum code )
kolucoms6 I don't have it so you can modify, I will do it with documentation, it's a <TABLE> with all the info so you will need to know the code to get the best position on it.
to get my "layout" you need to change a lot in the original forum, cause it's tricky.
I can do something so you can ADD on top of the Forum or at Bottom, using for example 5 messages in a row and so you will have 2 rows with the last 10 messages...
do you need this? send me an email if you prefer (u can find it on the code, or use the Forum send email function).< |
AnonJr |
Posted - 27 May 2007 : 14:32:51 Good catch. Best solution would probably be to use the TopSQL() function - its found in inc_func_common.asp.< |
modifichicci |
Posted - 27 May 2007 : 11:58:54 Remember that SELECT TOP 20 doesn't work in mysql it needs LIMIT 20< |
kolucoms6 |
Posted - 27 May 2007 : 11:30:42 Can you put/place the code to diaplay last 10 messages in left bar ?(I know you have to use active.asp kind of code)< |
balexandre |
Posted - 26 May 2007 : 10:41:13 never used mySQL, and I do not know what are the differences on t-sql, my world is only MS SQL
please fell free to update a T-SQL Code
about looping, yes, but my Access Database knowledge is limited and only led me to that, in MS SQL, I would use an SP, retrieve both count and sum ... easy, but not supported by Access.
But: I changed the code, so now I request the TOP 20 and if more than 20 I simple say (+20) instead of looping all the messages in the Database... this was a really issue if the user is a new member and not yet any posts <Obrigado!>
As suggested, I will edit my post and add that message about UNION function
about the images... humm, I even added "Objective", the Top 10 messages is other MOD that I created, and like AnonJR said, I will post it as well, but right now it's codded for my Forum, and no comments or other options as 1 vertical table with all 10 messages.
to place the MOD I should, at least, place some options, like Vertical / Horizontal and how many Rows / Columns< |
ruirib |
Posted - 26 May 2007 : 10:38:46 You should make it clear that this is supported only in SGBDs that support UNION queries, which excludes MySQL versions previous to 4.x. Also, the images posted are a bit misleading, since the code will only change the title of the page in a normal base Snitz version.
As a comment not meant to be seen in a negative light, the current code can be quite inefficient, since it needs to navigate through all the records to find out the total number of new posts. You could use the current UNION query as subquery of a new query just to count the number records returned by the UNION query and then just retrieve the returned value.
As an alternative, two SELECT COUNT(*) queries, one for the topics, another for replies, would do it too. This latter option would even be available to MySQL 3.x databases.< |
balexandre |
Posted - 26 May 2007 : 10:23:42 Now you lost me ...
single file?
all you need to do is copy that code in the scrolling window into a new file and rename it, saving into your forum root directory where all the forum files are, then search inside inc_header.asp for the second <title> and include that line above the response.write function for that 2nd <title>< |
kolucoms6 |
Posted - 26 May 2007 : 09:51:35 Is it ready to download as a single file ?< |
balexandre |
Posted - 26 May 2007 : 08:52:48 just added some pictures so everyone knows what's the propose of this code < |
AnonJr |
Posted - 26 May 2007 : 08:44:58 quote: Originally posted by balexandre
didn't know about scrollcode done !
Glad to help.
quote: Originally posted by balexandre
humm... It's a nice ideia, but I can do that for yourself and show the code, I don't thing I'll used it cause... if you're not login, just click the Active posts link
the Objective is 2 be logged in and minimize the window or put the window in a new tab, and soon someone put's a message you can see it right away
I kinda figured that. It was just a thought.
quote: Originally posted by balexandre
By the way,
do you think I should put here the code for the Top 10 Messages MOD that I created in the forum?
Sure. We try to encourage everybody post back fun code like that - it helps the community grow. < |
balexandre |
Posted - 26 May 2007 : 07:36:47 didn't know about scrollcode done !
humm... It's a nice ideia, but I can do that for yourself and show the code, I don't thing I'll used it cause... if you're not login, just click the Active posts link
the Objective is 2 be logged in and minimize the window or put the window in a new tab, and soon someone put's a message you can see it right away
but if you want I can add that feature! to many years under ASP / T-SQL... that's simple to implement.
By the way,
do you think I should put here the code for the Top 10 Messages MOD that I created in the forum?< |
|
|