[ABD]Forum Leaderboard v1.0.3

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
Sshadow
Registered User
Posts: 299
Joined: Thu Aug 20, 2009 3:54 pm
Name: Chris C.
Contact:

Re: [RC]Forum Leaderboard v1.0.2

Post by Sshadow »

This looks like a great mod. Good work. I get an odd error though when I try to visit the leader board page.

Code: Select all

SQL ERROR [ mysqli ]

Unknown column 'message_reported' in 'where clause' [1054]

SQL

SELECT COUNT(msg_id) as total_msg, author_id, u.username as username, u.user_avatar, u.user_avatar_type FROM dragonslair_privmsgs p, dragonslair_users u WHERE message_time >= 1263270292 AND p.author_id = u.user_id AND message_reported = 0 GROUP BY author_id ORDER BY total_msg DESC LIMIT 0 , 10

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: includes/functions_leaderboard.php
LINE: 218
CALL: dbal_mysqli->sql_query()

FILE: leaderboard.php
LINE: 42
CALL: wax_most_sentpm()
Any help is appreciated.
lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [RC]Forum Leaderboard v1.0.2

Post by lugsciath »

Code: Select all

Unknown column 'message_reported'
the sql database field is missing or named wrong. Solution:


- Check if the sql queries are done (first point intallation) you need myadmin ;)
- Just create it, if you´re able to ;) in myadmin


german translation:

language/de/common.php

Code: Select all

    'LB_EXPLAIN'				=> 'Forum Führendeboard',
	'LEADERBOARD'				=> 'Führendeboard',
language/de/acp/board.php

Code: Select all

						//------- START Forum Leaderboard Mod v1.0.0
	'LB_ONOFF'					=> 'Forum Führendeboard',
	'LB_ONOFF_EXPLAIN'			=> 'Ein oder Aus Forum Führendeboard',
	'LB_NUMUSER'				=> 'Zeige X Benutzer',
	'LB_NUMUSER_EXPLAIN'		=> 'Benutzeranzahl anzeigen',
	'LB_AVATAR_ONOFF'			=> 'Führendeboard Avatars',
	'LB_AVATAR_ONOFF_EXPLAIN'	=> 'Ein oder Aus  Avatars im Führendeboard. LEERE DEINEN TEMPLATE NACH AENDERUNG!!',
	'LB_AVATAR_WIDTH'			=> 'Avatar Weite',
	'LB_AVATAR_HEIGHT'			=> 'Avatar Höhe',
	'LB_TITLE'					=> 'Forum Führendeboard',
	'LB_7DAYLANG'				=> 'Letzte 7 Tage Kopf',
	'LB_30DAYLANG'				=> 'Letzte 30 Tage Kopf',
	//------- End Forum Leaderboard Mod v1.0.0


There is no Possibility in acp? Edit: found, sorry ;) is ok.


One Bug: Missing multilanguagesupport In leaderboard.html, the topics must be in vars -> /de/common.php ;)

Waiting on Definition for translating.
User avatar
Sshadow
Registered User
Posts: 299
Joined: Thu Aug 20, 2009 3:54 pm
Name: Chris C.
Contact:

Re: [RC]Forum Leaderboard v1.0.2

Post by Sshadow »

I am still learning phpMyAdmin. Could you help me with inserting that? I know how to change things but not sure how to create new ones.
lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [RC]Forum Leaderboard v1.0.2

Post by lugsciath »

Hi Sshadow:

Very simple, if you like to insert the german language parts, just follow the xml installation file until you reach the edits of the given english (en) files

language/en/common.php
language/en/acp/board.php

do these edits and repeat the edits for the german files

language/de/common.php
language/de/acp/board.php

as described above and in the xml file . Try to search the right place by only search for the first part of the given line on the en file, means the part in front of this arrow ;) ... =>

Then insert the posted part of the german translation on a new line after this line.

Thats it.

If you doesnt have any german language files (the path language/de/ ... doesnt exist) you do not need any edits, only if you need it in german. If you do you must have the whole german package eg all language files. Try to get it on phpBB.de and after installing the language THEN you have to do the edits (in /de path) , like you would do it in the english ones.

I´m not sure, if you want to know this, but when - thats all. You doesnt need to create any files.
User avatar
Sshadow
Registered User
Posts: 299
Joined: Thu Aug 20, 2009 3:54 pm
Name: Chris C.
Contact:

Re: [RC]Forum Leaderboard v1.0.2

Post by Sshadow »

I am sorry. I meant how to add that DB field I am missing. "message_reported"
lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [RC]Forum Leaderboard v1.0.2

Post by lugsciath »

no problem, read my hint carefully until to the end of posting, you will see the bug:

Normally we went into phpMyAdmin - your sql Admin tool and open your database, choosing the table and just insert (on and of the table with "new") a new field.

Lets take a look FIRST on the sql query:

Unknown column 'message_reported' in 'where clause' [1054]

Code: Select all

SQL

SELECT COUNT(msg_id) as total_msg, author_id, u.username as username, u.user_avatar, u.user_avatar_type FROM dragonslair_privmsgs p, dragonslair_users u WHERE message_time >= 1263270292 AND p.author_id = u.user_id AND message_reported = 0 GROUP BY author_id ORDER BY total_msg DESC LIMIT 0 , 10
Youre sure that the leaderboard mod produces this error (and when, where did you get it) ? Seams to be a message problem! The table is php_privmsgs, the desired field has to be on end of this table:

Code: Select all

Field  	                Type  	        Kollation  	 Attribut 	Null  	Standard	
message_reported  	tinyint(1)  	 	UNSIGNED  	No  	0
These are the contents.

But remember: This field MUST be there, you dont need to create it normally ! Check the query once more ;), seams there is a missing p in front of message_reported:must be p.message_reported, ;) ?

Thats seams the bug, i hope.


So we have this query:

Code: Select all

SELECT COUNT(msg_id) as total_msg, author_id, u.username as username, u.user_avatar, u.user_avatar_type FROM dragonslair_privmsgs p, dragonslair_users u WHERE message_time >= 1263270292 AND p.author_id = u.user_id AND p.message_reported = 0 GROUP BY author_id ORDER BY total_msg DESC LIMIT 0 , 10
btw. the author_id needs also a p. like p.author_id.
User avatar
waxxie
Registered User
Posts: 119
Joined: Fri Oct 16, 2009 5:21 pm

Updated to Forum Leaderboard v1.0.3

Post by waxxie »

Forum Leaderboard v1.0.3
MySQL query fix in functions_leaderboard.php, oddly the bug only appears to affect some users.

Enjoy!
lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [RC]Forum Leaderboard v1.0.3

Post by lugsciath »

updated ;) ... works great, btw. Please add in next versions the language vars in the template, i will do the translations in german. Isn´t it heavy to do that, i think :) - it would be perfect.
User avatar
eunaumtenhoid
Registered User
Posts: 996
Joined: Wed Jun 03, 2009 12:46 am
Location: ????

Re: [RC]Forum Leaderboard v1.0.3

Post by eunaumtenhoid »

is mod only for team board or anyone user?
My translations of the extensions for Brazilian Portuguese
https://github.com/phpBBTraducoes
lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [RC]Forum Leaderboard v1.0.3

Post by lugsciath »

anyone will see the leaderboard. If you like it only for mods, simply set a switch in the overall.html ;)
MydnyteSyn
Registered User
Posts: 383
Joined: Sun Oct 07, 2007 10:02 am

Re: [RC]Forum Leaderboard v1.0.3

Post by MydnyteSyn »

Just one small problem I'm having with this. When I first set the options for this mod in the admin CP, I had it set to yes to show avatars. After looking at it with the avatars, I decided I did not want to show avatars so I went back into the admin CP and changed it to no. I purged the template cache, purged the general cache, and even hit ctrl+F5 when I revisited the leaderboard page. The avatars still show. I even logged out, rebooted my computer, and went back to look and the avatars still show and the setting is set to no.
User avatar
Sshadow
Registered User
Posts: 299
Joined: Thu Aug 20, 2009 3:54 pm
Name: Chris C.
Contact:

Re: [RC]Forum Leaderboard v1.0.3

Post by Sshadow »

Great thanks guys. Grabbing this new version now.
User avatar
waxxie
Registered User
Posts: 119
Joined: Fri Oct 16, 2009 5:21 pm

Re: [RC]Forum Leaderboard v1.0.3

Post by waxxie »

MydnyteSyn wrote:Just one small problem I'm having with this...
Oversight on my part

open your template file "leadboard.html" and add the L_AVATAR_ONFOFF code to each line with _IMG <> '' --><td width="50">

example:

Code: Select all

<!-- IF leadrow_0.MOST_TOPICS_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_0.MOST_TOPICS_IMG}</td><!-- ENDIF --><!-- ENDIF -->
I will add this to the next update but in the meanwhile you can do as mentioned above

here's what the full file fix would look like:

Code: Select all

<!-- INCLUDE overall_header.html -->
<style type="text/css">
.leaderboard_numcount{
	font-size: 13px;
	font-weight: bold;
}
.leaderboard_h3{
	padding-left: 50px;
}
a.leaderboard_link{
	color: #CC0000;
	font-size: 13px;
	font-weight: bold;
	text-transform: uppercase;
}
h2.leaderboard_head{
	font-weight: bold;
	color: #333333;
	border-bottom: 2px solid #333333;
}

</style>

<div class="panel bg2">
	<div class="inner"><span class="corners-top"><span></span></span>
		<h2 class="leaderboard_head">{L_LEADERBOARD_TITLE} - {L_LEADERBOARD_07DAY}</h2>
		<table width="100%" border="0" cellpadding="4" cellspacing="4">
		<tr>
			<td align="center"><h3>Created Most Topics</h3></td>
			<td align="center"><h3>Has most topic views</h3></td>
			<td align="center"><h3>Has most topic replies</h3></td>
			<td align="center"><h3>Wrote most replies</h3></td>
		</tr>
		<!-- BEGIN leadrow_0 -->
		<tr class="<!-- IF leadrow_0.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_0.MOST_TOPICS_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_0.MOST_TOPICS_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_0.MOST_TOPICS_USERLINK}" class="leaderboard_link">{leadrow_0.MOST_TOPICS_USER}</a><div class="leaderboard_numcount">{leadrow_0.MOST_TOPICS_COUNT}</div></td>
			  </tr>
			</table>
			</td>
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_0.MOST_VIEWS_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_0.MOST_VIEWS_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_0.MOST_VIEWS_USERLINK}" class="leaderboard_link">{leadrow_0.MOST_VIEWS_USER}</a><div class="leaderboard_numcount">{leadrow_0.MOST_VIEWS_COUNT}</div></td>
			  </tr>
			</table>
			</td>
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_0.MOST_REPLIES_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_0.MOST_REPLIES_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_0.MOST_REPLIES_USERLINK}" class="leaderboard_link">{leadrow_0.MOST_REPLIES_USER}</a><div class="leaderboard_numcount">{leadrow_0.MOST_REPLIES_COUNT}</div></td>
			  </tr>
			</table>
			</td>
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_0.MOST_REPLIED_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_0.MOST_REPLIED_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_0.MOST_REPLIED_USERLINK}" class="leaderboard_link">{leadrow_0.MOST_REPLIED_USER}</a><div class="leaderboard_numcount">{leadrow_0.MOST_REPLIED_COUNT}</div></td>
			  </tr>
			</table>
			</td>
		</tr>
		<!-- END leadrow_0 -->
		<tr>
			<td align="center"><h3>Posted most attachments</h3></td>
			<td align="center"><h3>Created most polls</h3></td>
			<td align="center"><h3>MOST PM's sent</h3></td>
			<td align="center"><h3>MOST PM's received</h3></td>
		</tr>
		<!-- BEGIN leadrow_0 -->
		<tr class="<!-- IF leadrow_0.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_0.MOST_ATTACH_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_0.MOST_ATTACH_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_0.MOST_ATTACH_USERLINK}" class="leaderboard_link">{leadrow_0.MOST_ATTACH_USER}</a><div class="leaderboard_numcount">{leadrow_0.MOST_ATTACH_COUNT}</div></td>
			  </tr>
			</table>
			</td>
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_0.MOST_POLLS_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_0.MOST_POLLS_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_0.MOST_POLLS_USERLINK}" class="leaderboard_link">{leadrow_0.MOST_POLLS_USER}</a><div class="leaderboard_numcount">{leadrow_0.MOST_POLLS_COUNT}</div></td>
			  </tr>
			</table>
			</td>
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_0.MOST_SENTPM_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_0.MOST_SENTPM_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_0.MOST_SENTPM_USERLINK}" class="leaderboard_link">{leadrow_0.MOST_SENTPM_USER}</a><div class="leaderboard_numcount">{leadrow_0.MOST_SENTPM_COUNT}</div></td>
			  </tr>
			</table>
			</td>
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_0.MOST_GOTPM_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_0.MOST_GOTPM_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_0.MOST_GOTPM_USERLINK}" class="leaderboard_link">{leadrow_0.MOST_GOTPM_USER}</a><div class="leaderboard_numcount">{leadrow_0.MOST_GOTPM_COUNT}</div></td>
			  </tr>
			</table>
			</td>
		</tr>
		<!-- END leadrow_0 -->
		</table>
		<h2 class="leaderboard_head">{L_LEADERBOARD_TITLE} - {L_LEADERBOARD_30DAY}</h2>
		<table width="100%">
		<tr>
			<td align="center"><h3>Created Most Topics</h3></td>
			<td align="center"><h3>Has most topic views</h3></td>
			<td align="center"><h3>Has most topic replies</h3></td>
			<td align="center"><h3>Wrote most replies</h3></td>
		</tr>
		<!-- BEGIN leadrow_1 -->
		<tr class="<!-- IF leadrow_1.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_1.MOST_TOPICS_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_1.MOST_TOPICS_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_1.MOST_TOPICS_USERLINK}" class="leaderboard_link">{leadrow_1.MOST_TOPICS_USER}</a><div class="leaderboard_numcount">{leadrow_1.MOST_TOPICS_COUNT}</div></td>
			  </tr>
			</table>
			</td>
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_1.MOST_VIEWS_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_1.MOST_VIEWS_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_1.MOST_VIEWS_USERLINK}" class="leaderboard_link">{leadrow_1.MOST_VIEWS_USER}</a><div class="leaderboard_numcount">{leadrow_1.MOST_VIEWS_COUNT}</div></td>
			  </tr>
			</table>
			</td>
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_1.MOST_REPLIES_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_1.MOST_REPLIES_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_1.MOST_REPLIES_USERLINK}" class="leaderboard_link">{leadrow_1.MOST_REPLIES_USER}</a><div class="leaderboard_numcount">{leadrow_1.MOST_REPLIES_COUNT}</div></td>
			  </tr>
			</table>
			</td>
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_1.MOST_REPLIED_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_1.MOST_REPLIED_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_1.MOST_REPLIED_USERLINK}" class="leaderboard_link">{leadrow_1.MOST_REPLIED_USER}</a><div class="leaderboard_numcount">{leadrow_1.MOST_REPLIED_COUNT}</div></td>
			  </tr>
			</table>
			</td>
		</tr>
		<!-- END leadrow_1 -->
		<tr>
			<td align="center"><h3>Posted most attachments</h3></td>
			<td align="center"><h3>Created most polls</h3></td>
			<td align="center"><h3>MOST PM's sent</h3></td>
			<td align="center"><h3>MOST PM's received</h3></td>
		</tr>
		<!-- BEGIN leadrow_1 -->
		<tr class="<!-- IF leadrow_1.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_1.MOST_ATTACH_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_1.MOST_ATTACH_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_1.MOST_ATTACH_USERLINK}" class="leaderboard_link">{leadrow_1.MOST_ATTACH_USER}</a><div class="leaderboard_numcount">{leadrow_1.MOST_ATTACH_COUNT}</div></td>
			  </tr>
			</table>
			</td>
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_1.MOST_POLLS_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_1.MOST_POLLS_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_1.MOST_POLLS_USERLINK}" class="leaderboard_link">{leadrow_1.MOST_POLLS_USER}</a><div class="leaderboard_numcount">{leadrow_1.MOST_POLLS_COUNT}</div></td>
			  </tr>
			</table>
			</td>
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_1.MOST_SENTPM_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_1.MOST_SENTPM_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_1.MOST_SENTPM_USERLINK}" class="leaderboard_link">{leadrow_1.MOST_SENTPM_USER}</a><div class="leaderboard_numcount">{leadrow_1.MOST_SENTPM_COUNT}</div></td>
			  </tr>
			</table>
			</td>
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<!-- IF leadrow_1.MOST_GOTPM_IMG <> '' --><!-- IF  L_AVATAR_ONOFF == 1 --><td width="50">{leadrow_1.MOST_GOTPM_IMG}</td><!-- ENDIF --><!-- ENDIF -->
				<td align="center" valign="middle"><a href="{leadrow_1.MOST_GOTPM_USERLINK}" class="leaderboard_link">{leadrow_1.MOST_GOTPM_USER}</a><div class="leaderboard_numcount">{leadrow_1.MOST_GOTPM_COUNT}</div></td>
			  </tr>
			</table>
			</td>
		</tr>
		<!-- END leadrow_1 -->
		</table>
		<div class="back2top"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>

			<span class="corners-bottom"><span></span></span></div>
</div>

<!-- INCLUDE overall_footer.html -->
User avatar
Balsa
Registered User
Posts: 57
Joined: Mon Jul 06, 2009 1:12 pm

Re: [RC]Forum Leaderboard v1.0.3

Post by Balsa »

Thank you for that great MOD! I really like it! ^_^

Maybe I made a mistake, but on the leaderboard site I can only click on the users under "Created Most Topics" to get to their profile. When I click on other nicknames or avatars (Has most topic views, Has most topic replies, ...) the leadership site just reloads.
MydnyteSyn
Registered User
Posts: 383
Joined: Sun Oct 07, 2007 10:02 am

Re: [RC]Forum Leaderboard v1.0.3

Post by MydnyteSyn »

Fantastic, thank you :)
Locked

Return to “[3.0.x] Abandoned MODs”