Top Five

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
User avatar
RMcGirr83
Former Team Member
Posts: 22027
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: top_five

Post by RMcGirr83 »

figo wrote:How do you get it to show last username that posted? instead of the way it is now, where the topic starter's username appears.


I think it makes more sense for the most recent post should be associated with the most recent username that posted
OPEN

includes/top_five.php

FIND

Code: Select all

p.poster_id = u.user_id
REPLACE WITH

Code: Select all

t.topic_last_poster_id = u.user_id
..and that should do it.

mmontana, I am still looking into your issue, but I don't use mssql so really haven't an idea as to why you are getting that error.
Last edited by RMcGirr83 on Sat Apr 18, 2009 9:37 am, edited 1 time in total.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
..::House::..
Registered User
Posts: 212
Joined: Tue Jul 22, 2008 3:52 am

Re: top_five

Post by ..::House::.. »

Installed and looks great! God job RMcGirr83. :ugeek:
GoogleSupport Request GeneratorNo Support via PMFirefox Download
User avatar
RMcGirr83
Former Team Member
Posts: 22027
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: top_five

Post by RMcGirr83 »

mmontana wrote:SQL ERROR [ mssql_odbc ]

[Microsoft][ODBC SQL Server Driver][SQL Server]Column 'phpbb_users.user_id' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. [37000]

SQL

SELECT TOP 5 MAX(p.post_time) as post_time, u.user_id, u.username, u.user_colour, t.topic_title, t.forum_id, t.topic_last_post_id FROM phpbb_topics t, phpbb_posts p LEFT JOIN phpbb_users u ON (p.poster_id = u.user_id) WHERE p.topic_id = t.topic_id AND p.post_approved = 1 AND t.topic_moved_id = 0 GROUP BY t.topic_id ORDER BY p.post_time DESC

BACKTRACE


FILE: includes/db/mssql_odbc.php
LINE: 165
CALL: dbal_mssql_odbc->sql_error()

FILE: includes/db/mssql_odbc.php
LINE: 217
CALL: dbal_mssql_odbc->sql_query()

FILE: includes/db/dbal.php
LINE: 170
CALL: dbal_mssql_odbc->_sql_query_limit()

FILE: includes/top_five.php
LINE: 57
CALL: dbal_mssql_odbc->sql_query_limit()

FILE: index.php
LINE: 106
CALL: include('includes/top_five.php')


Not being php savvy, I'm not sure where to begin looking for a problem. Can someone point me in the right direction? I'm using the latest downloadable version of phpbb.
Please give this a try, warning though, I've never used mssql so don't know what the outcome maybe

OPEN

includes/top_five.php

FIND

Code: Select all

'GROUP_BY'	=> 't.topic_id',
REPLACE WITH

Code: Select all

'GROUP_BY'	=> 't.topic_id, u.user_id, u.username, u.user_colour, t.topic_title, t.forum_id, t.topic_last_post_id',
..but that's pretty much a "stab in the dark" so to speak.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
mmontana
Registered User
Posts: 7
Joined: Mon Mar 30, 2009 12:05 pm

Re: top_five

Post by mmontana »

RMcGirr83,

Thanks for the attempt, but nothing changed. FYI, I did refresh everything after making the changes as well. Any other thoughts?
User avatar
Nailz
Registered User
Posts: 125
Joined: Fri Nov 10, 2006 8:44 pm

Re: top_five

Post by Nailz »

Nice simple mod to add, the only thing is, I would like the block to look like the other blocks at the bottom, like the block showing birthdays etc

My theme Black Fusion

Image
User avatar
RMcGirr83
Former Team Member
Posts: 22027
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: top_five

Post by RMcGirr83 »

mmontana wrote:RMcGirr83,

Thanks for the attempt, but nothing changed. FYI, I did refresh everything after making the changes as well. Any other thoughts?
Are you still getting the same error. You shouldn't be according to my source who will remain anonymous.
Nailz wrote:Nice simple mod to add, the only thing is, I would like the block to look like the other blocks at the bottom, like the block showing birthdays etc

My theme Black Fusion

Image
You have to format the included html file in a similar way that the birthday block is formatted.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
mmontana
Registered User
Posts: 7
Joined: Mon Mar 30, 2009 12:05 pm

Re: top_five

Post by mmontana »

Rich, sorry about that. Been a rough morning already here. I think we're getting closer, but the error message has changed. Here's the new one.

General Error
SQL ERROR [ mssql_odbc ]

[Microsoft][ODBC SQL Server Driver][SQL Server]Column "phpbb_posts.post_time" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause. [37000]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.


Thanks for all the help....
User avatar
RMcGirr83
Former Team Member
Posts: 22027
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: top_five

Post by RMcGirr83 »

Change this

Code: Select all

'GROUP_BY'   => 't.topic_id, u.user_id, u.username, u.user_colour, t.topic_title, t.forum_id, t.topic_last_post_id',
to this

Code: Select all

'GROUP_BY'   => 't.topic_id, post_time, u.user_id, u.username, u.user_colour, t.topic_title, t.forum_id, t.topic_last_post_id',
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
Nailz
Registered User
Posts: 125
Joined: Fri Nov 10, 2006 8:44 pm

Re: top_five

Post by Nailz »

RMcGirr83 wrote:You have to format the included html file in a similar way that the birthday block is formatted.
I tried to edit it with the birthday block, but couldn't get it to wrap around the block, it just added a piece above the new block.
mmontana
Registered User
Posts: 7
Joined: Mon Mar 30, 2009 12:05 pm

Re: top_five

Post by mmontana »

Rich, thanks for the help, that corrected the problem. However, unless I've done something wrong, the links that are in the top five list seem to bypass the forum security. For example, the top five listings from our forum are currently to posts within a password protected forum. When I click the link, it takes me right to the post without asking for the password. Is that customizable?
User avatar
RMcGirr83
Former Team Member
Posts: 22027
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: top_five

Post by RMcGirr83 »

If your forum is the one in your profile, that is the Provision_Red style....is that the one you need help with?
mmontana wrote:Rich, thanks for the help, that corrected the problem. However, unless I've done something wrong, the links that are in the top five list seem to bypass the forum security. For example, the top five listings from our forum are currently to posts within a password protected forum. When I click the link, it takes me right to the post without asking for the password. Is that customizable?
I don't know why you wouldn't be asked for the password. Not really sure what happens when a forum is passworded...let me mess around with it for a bit to see.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
Nailz
Registered User
Posts: 125
Joined: Fri Nov 10, 2006 8:44 pm

Re: top_five

Post by Nailz »

RMcGirr83 wrote:If your forum is the one in your profile, that is the Provision_Red style....is that the one you need help with?
Yes please, love the mod, just doesn't look right not matching the other blocks, thanks for the help.
User avatar
RMcGirr83
Former Team Member
Posts: 22027
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: top_five

Post by RMcGirr83 »

mmontana wrote:Rich, thanks for the help, that corrected the problem. However, unless I've done something wrong, the links that are in the top five list seem to bypass the forum security. For example, the top five listings from our forum are currently to posts within a password protected forum. When I click the link, it takes me right to the post without asking for the password. Is that customizable?
The password is "remembered" if you have already entered it (aka visited the passworded forum already). Try logging out, then loggin back in and see if it asks for the password.
Nailz wrote:
RMcGirr83 wrote:If your forum is the one in your profile, that is the Provision_Red style....is that the one you need help with?
Yes please, love the mod, just doesn't look right not matching the other blocks, thanks for the help.
I'll take a look at the html for you
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
mmontana
Registered User
Posts: 7
Joined: Mon Mar 30, 2009 12:05 pm

Re: top_five

Post by mmontana »

Rich, I cleared the IE cache, including history, cookies, etc. I told the forum not to remember my login, logged out of the forum and closed IE. I opened the forum and clicked on one of the top five links. It took me right to the post without asking for a password or even making me login to the forum.
User avatar
Nailz
Registered User
Posts: 125
Joined: Fri Nov 10, 2006 8:44 pm

Re: top_five

Post by Nailz »

Thanks RM :mrgreen:

Edit, I've had to take this off for now, as was making my site lag, really like the mod, would changing th cache time help at all?

Return to “[3.0.x] MOD Database Releases”