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: 22106
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: top_five

Post by RMcGirr83 »

wolf2009 wrote:can you show more than 5 ?
OPEN

includes/top_five.php

FIND

every instance of the number 5

REPLACE WITH

any number you want.

May look odd though if you pick 10 topics and 5 users eg.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
slammed83mazda
Registered User
Posts: 44
Joined: Thu Feb 26, 2009 6:05 am

Re: top_five

Post by slammed83mazda »

I uploaded the subsilver2 html file and its the same thing. I need the borders around it like iemonster. Looks very professional that way. I really like this mod. Thanks for the quick reply. :mrgreen:
User avatar
RMcGirr83
Former Team Member
Posts: 22106
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: top_five

Post by RMcGirr83 »

slammed83mazda wrote:I uploaded the subsilver2 html file and its the same thing. I need the borders around it like iemonster. Looks very professional that way. I really like this mod. Thanks for the quick reply. :mrgreen:
you can try this for the top_five_body.html for your style

Code: Select all

<br clear="all" />
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="18" height="18"><img src="./styles/AeroBlue/theme/images/tl.png" width="18" height="18" alt="" /></td>
    <td height="18" style="background:url('./styles/AeroBlue/theme/images/tm.png');"></td>
    <td width="18" height="18"><img src="./styles/AeroBlue/theme/images/tr.png" width="18" height="18" alt="" /></td>
  </tr>
  <tr>
    <td width="18" style="background:url('./styles/AeroBlue/theme/images/ml.png');"></td>
		<table class="tablebg" width="100%" cellspacing="0">
			<tr>
				<th width="40%">{L_NEWEST_TOPICS}</th>
				<th width="20%">{L_TOP_FIVE_ACTIVE}</th>
				<th width="40%">{L_TOP_FIVE_NEWEST}</th>
			</tr>
			<tr>
				<td class="row1"><!-- BEGIN hot_topic_row --><span class="genmed"><a href="{hot_topic_row.U_TOPIC}">{hot_topic_row.TOPIC_TITLE}</a>&nbsp;{hot_topic_row.USERNAME_FULL}</span><br /><!-- END hot_topic_row --></td>
				<td class="row1"><!-- BEGIN top_five_active --><span class="genmed">{top_five_active.USERNAME_FULL} {L_POSTS}: <a href="{top_five_active.S_SEARCH_ACTION}">{top_five_active.POSTS}</a></span><br /><!-- END top_five_active --></td>
				<td class="row1"><!-- BEGIN top_five_newest --><span class="genmed">{top_five_newest.USERNAME_FULL} {L_JOINED}: {top_five_newest.REG_DATE}</span><br /><!-- END top_five_newest --></td>
			</tr>
	</table>
    	</td>
    <td width="18" style="background:url('./styles/AeroBlue/theme/images/mr.png');"></td>
  </tr>
  <tr>
    <td width="18" height="18" align="right"><img src="./styles/AeroBlue/theme/images/bl.png" width="18" height="18" alt="" /></td>
    <td height="18" style="background:url('./styles/AeroBlue/theme/images/bm.png');"></td>
    <td width="18" height="18"><img src="./styles/AeroBlue/theme/images/br.png" width="18" height="18" alt="" /></td>
  </tr>

</table>
...but I'm not guaranteeing anything ;)

Please don't forget to refresh your template in the ACP after uploading into the styles template directory.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
Ahri89
Registered User
Posts: 525
Joined: Sat Apr 07, 2007 2:53 pm
Location: Spain

Re: top_five

Post by Ahri89 »

NICE MOD, thanks!!! :P
Last edited by Ahri89 on Sat Mar 28, 2009 11:26 pm, edited 1 time in total.
MODs translated to Spanish: ACP Add User MOD, ACP Announcement Centre, Advertisement Management, Custom Profile Fields, Update Reminder, Flood time setting per forum, MOD Version Check, Posting template, Prune Log, Simple Trash Bin, TinyPic Plugin, User Reminder, View Profile, View your topics, and more...

Sorry for my bad english xD
User avatar
barryoneoff
Registered User
Posts: 248
Joined: Sat Mar 24, 2007 10:14 pm
Location: East London, England

Re: top_five

Post by barryoneoff »

Great mod. Easy to install. Thanks.
Just one question: Would it be difficult to change the position to the top of the forum rather than the bottom?
Image
Click above to support St. Josephs Hospice.
Barryoneoff's London. ... City of London walks.
User avatar
Snorlaxative
Registered User
Posts: 85
Joined: Wed Feb 11, 2009 3:34 am
Location: The Web Tower

Re: top_five

Post by Snorlaxative »

What would I need to edit to display ranks (first, second, etc) next to the usernames? (Example in red)

1. username with highest posts
2. username with second highest
3. username with 3rd
4. username with 4th
5. username with 5th

I tried a $num variable within the while loop but it didn't work out the way I planned.
Any help is appreciated!! :D
Notam
Registered User
Posts: 28
Joined: Mon Oct 06, 2008 10:46 am

Re: top_five

Post by Notam »

is it possible to exclude any forum while getting the posts
User avatar
RMcGirr83
Former Team Member
Posts: 22106
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: top_five

Post by RMcGirr83 »

barryoneoff wrote:Great mod. Easy to install. Thanks.
Just one question: Would it be difficult to change the position to the top of the forum rather than the bottom?
OPEN

styles/xxx/template/index_body.html

FIND

Code: Select all

<!-- INCLUDE top_five_body.html -->

and move it before

Code: Select all

<!-- INCLUDE forumlist_body.html -->
Snorlaxative wrote:What would I need to edit to display ranks (first, second, etc) next to the usernames? (Example in red)
ranks are cached, you could try the way they are displayed in viewtopic.php
Notam wrote:is it possible to exclude any forum while getting the posts
OPEN

includes/top_five.php

FIND

Code: Select all

$sql_and = ' AND ' . $db->sql_in_set('p.forum_id', $forum_array, true);
and change to

Code: Select all

$sql_and = ' AND ' . $db->sql_in_set('p.forum_id', $forum_array, true) . ' OR p.forum_id <> some_forum_number';
replacing some_forum_number with the forum id you want to exclude.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
barryoneoff
Registered User
Posts: 248
Joined: Sat Mar 24, 2007 10:14 pm
Location: East London, England

Re: top_five

Post by barryoneoff »

Thanks for that. Worked a treat. :D
Image
Click above to support St. Josephs Hospice.
Barryoneoff's London. ... City of London walks.
User avatar
Snorlaxative
Registered User
Posts: 85
Joined: Wed Feb 11, 2009 3:34 am
Location: The Web Tower

Re: top_five

Post by Snorlaxative »

Oops, sorry. I don't mean ranks like posting ranks, I meant like rank of the top poster.

Like the person listed first on this mod would be "1" second would be "2" third would be "3" and so on.

Any ideas?
User avatar
RMcGirr83
Former Team Member
Posts: 22106
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: top_five

Post by RMcGirr83 »

Ah, you mean that.

OPEN

includes/top_five.php

FIND

Code: Select all

	 foreach ($user_posts as $row)
	 {
		$username_string = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
REPLACE WITH

Code: Select all

	$place = 0;
	 foreach ($user_posts as $row)
	 {
		$place++;
		$username_string = '<span style="color:red;"> ' . $place . '</span>&nbsp;' . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
Snorlaxative
Registered User
Posts: 85
Joined: Wed Feb 11, 2009 3:34 am
Location: The Web Tower

Re: top_five

Post by Snorlaxative »

Thanks! 8-)
User avatar
Chabbal
Registered User
Posts: 189
Joined: Wed Mar 18, 2009 6:17 pm

Re: top_five

Post by Chabbal »

downloading...
Uploading using FTP...
10%
70%
100%
Uploaded...
installing using "AutoMod"
installed successfully!
Working Fine...
Thanks!
mmontana
Registered User
Posts: 7
Joined: Mon Mar 30, 2009 12:05 pm

Re: top_five

Post by mmontana »

I'm a phpbb newb and I'm trying to add the top five mod as requested by my boss. I'm getting this error after installation.

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.
figo
Registered User
Posts: 129
Joined: Tue Sep 18, 2007 4:57 am

Re: top_five

Post by figo »

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

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