[PLUGIN] SmartStats 2.9

Moderators: vni, NADEO

User avatar
askuri
Posts: 285
Joined: 18 Oct 2011, 15:01
Location: Germany

Re: [PLUGIN] SmartStats 2.6

Post by askuri »

2.6 Released. Fixed Nickname and Login is not displayed in TopCustom.
Updated the SQL Query in the config so you MUST reset the plugin!!!
User avatar
insomnia-yamyam
Posts: 324
Joined: 05 Sep 2011, 04:59
Contact:

Re: [PLUGIN] SmartStats 2.6

Post by insomnia-yamyam »

askuri wrote:2.6 Released. Fixed Nickname and Login is not displayed in TopCustom.
:thumbsup:
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit our TM2 and SM Clanserver or download the INSOMNIA TM2-Trackpack or SM-Mappack !
You also find us at both Mania-Exchanges - search "German INSOMNIA Clan"
User avatar
askuri
Posts: 285
Joined: 18 Oct 2011, 15:01
Location: Germany

Re: [PLUGIN] SmartStats 2.6

Post by askuri »

You are Welcome :)
User avatar
askuri
Posts: 285
Joined: 18 Oct 2011, 15:01
Location: Germany

Re: [PLUGIN] SmartStats 2.7

Post by askuri »

2.7 Released.
User avatar
insomnia-yamyam
Posts: 324
Joined: 05 Sep 2011, 04:59
Contact:

Re: [PLUGIN] SmartStats 2.7

Post by insomnia-yamyam »

askuri wrote:2.7 Released.
Excellent! Thank you!

1.
But there is a little bug again:
<top_menu_serverstats_text>Blubb</top_menu_serverstats_text> does not apply.
But <top_menu_toplists_text> is working fine. Probably just a careless mistake.

2.
Another bug in the serverstats:
If <bar_players_url> or <bar_specs_url> or <bar_cpu_url> are empty because someone wants to uses ingame styles instead of graphics, then those styles are NOT shown at the legend, but they should, of course ;)

3.
And then i would suggest to also add:
  • TopRatedMaps
  • MostRatedMaps (Global vote amount would be cool, if not possible then local vote amount is ok too)
You may ask vni to help you how to add this data from the TM-Karma API (and/or the local database).

4.

Code: Select all

		<serverstats>
			<background_style>BgsPlayerCard</background_style>
			<background_substyle>BgMediaTracker</background_substyle>
			<background_image></background_image>
Coulod you please add two different background images?
One for the top 24 hours (today) and one for the bottom 24 hours (yesterday):

Code: Select all

		<serverstats>
			<background_style>BgsPlayerCard</background_style>
			<background_substyle>BgMediaTracker</background_substyle>
			<background_image_today></background_image_today>
			<background_image_yesterday></background_image_yesterday>
You need also to add a layer to every background_image as it is currently "blinking".
The background image is currently sometimes shwoing up and sometimes its hidden by the background layer.
Make it configurable in the xml or ensure that the background image is ABOVE the main background style but BELOW the statistic-bars. This would be ok too.

This would be :thumbsup: Thanks for your great work and time! :clap:

Making this plugin final and as close as perfect as possible :thx:
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit our TM2 and SM Clanserver or download the INSOMNIA TM2-Trackpack or SM-Mappack !
You also find us at both Mania-Exchanges - search "German INSOMNIA Clan"
User avatar
askuri
Posts: 285
Joined: 18 Oct 2011, 15:01
Location: Germany

Re: [PLUGIN] SmartStats 2.7

Post by askuri »

Only small bugs. I think I'll release 2.8 in the evening ;)
User avatar
askuri
Posts: 285
Joined: 18 Oct 2011, 15:01
Location: Germany

Re: [PLUGIN] SmartStats 2.7

Post by askuri »

I correct: Now. 2.8 released.
User avatar
insomnia-yamyam
Posts: 324
Joined: 05 Sep 2011, 04:59
Contact:

Re: [PLUGIN] SmartStats 2.7

Post by insomnia-yamyam »

askuri wrote:I correct: Now. 2.8 released.
All bugs are fixed ...Top! :thumbsup:
Will you implement TopRatedMaps and MostRatedMaps in 2.9 askuri?

Thanks again for your time and efforts.
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit our TM2 and SM Clanserver or download the INSOMNIA TM2-Trackpack or SM-Mappack !
You also find us at both Mania-Exchanges - search "German INSOMNIA Clan"
User avatar
askuri
Posts: 285
Joined: 18 Oct 2011, 15:01
Location: Germany

Re: [PLUGIN] SmartStats 2.8

Post by askuri »

Maybe later. For the moment I would like to spend my whole time into my new Plugin (hint: it's much work and there was never a Plugin like this before. Under Minecraft some people know a similar system 'glizer' ;))
User avatar
insomnia-yamyam
Posts: 324
Joined: 05 Sep 2011, 04:59
Contact:

Re: [PLUGIN] SmartStats 2.8

Post by insomnia-yamyam »

askuri wrote:Maybe later.
:shock: The plugin is called "SmartStats" and therefore the main feature is to present all available and interesting data and statistics. In my opinion there are important statistics missing in "SmartStats", which makes it kind of uncomplete at the current state (even more as i guess that the current version will be the last version for a long time, except heavy bugs would be found).

In consideration of the above mentioned points and the fact that i know that you only have very rare sparetime to work on your plugins, and even if i am not a coder, i have taken myself 15 minutes this morning (as i considered it as necessary) and added following statistics to SmartStats:
  • Most Played Maps (Local)
  • Most Rated Maps (Local)
  • Top Rated Maps (Local)
As you can see here:
Image
I implemented only LOCAL data from the db, as i do not know the tm-karma API from undef good enough (and again: i am not a coder) to also implement the global karma, global playcount and global votecount. This data maybe should be addiotionaly implemented by you or vni in the future.

###############################################################################################

To get those changes working for all SMARTies (SMART users *gg*) who uses SmartStats you will need to do some codechanges. All i ask you now is to follow my update instructions and release "SmartStats 2.9" (will take you just a few minutes of time as i already have done the code and adjustments), which then will be some kind of a "final" and "nearly complete" version in my eyes:

1.
Open plugin.smartstats.php

2.
SEARCH for line 167-169:

Code: Select all

					case 'topfragratio': case 'topkillratio':
						$entry2display['v1'] = round($entry2display['v1'], 1);
						break;
ADD lines 170-172 below:

Code: Select all

					case 'topmapskarmalocal':
						$entry2display['v1'] = round($entry2display['v1'], 2);
						break;
3.
SEARCH for lines 175-180:

Code: Select all

				$xml.= '<frame posn="'.$x.' '.$y.' 2">
					<label posn="0 0 0" textcolor="'.$pluginsettings->toplists->rank_color.'" text="'.$entry2display['rank'].'" textsize="0.9" />
					<label posn="2 0 0" textcolor="'.$pluginsettings->toplists->nickname_color.'" text="'.$smart->nickname($entry2display['login'], true).'" textsize="0.9" />
					<label posn="13 0 0" textcolor="'.$pluginsettings->toplists->login_color.'" text="'.$entry2display['login'].'" textsize="0.9" />
					<label posn="20 0 0" textcolor="'.$pluginsettings->toplists->value_color.'" text="'.$entry2display['v1'].'" textsize="0.9" />
					';
REPLACE it with lines 175-192:

Code: Select all

				if ($ident == "topmapsplaycountlocal" or "topmapscountvoteslocal" or "topmapskarmalocal")
				{
				$xml.= '<frame posn="'.$x.' '.$y.' 2">
					<label posn="0 0 0" textcolor="'.$pluginsettings->toplists->rank_color.'" text="'.$entry2display['rank'].'" textsize="0.9" />
					<label posn="2 0 0" textcolor="'.$pluginsettings->toplists->nickname_color.'" text="'.$entry2display['mapname'].'" textsize="0.9" />
					<label posn="13 0 0" textcolor="'.$pluginsettings->toplists->login_color.'" text="'.$entry2display['author'].'" textsize="0.9" />
					<label posn="20 0 0" textcolor="'.$pluginsettings->toplists->value_color.'" text="'.$entry2display['v1'].'" textsize="0.9" />
					';
				}
				else
				{
				$xml.= '<frame posn="'.$x.' '.$y.' 2">
					<label posn="0 0 0" textcolor="'.$pluginsettings->toplists->rank_color.'" text="'.$entry2display['rank'].'" textsize="0.9" />
					<label posn="2 0 0" textcolor="'.$pluginsettings->toplists->nickname_color.'" text="'.$smart->nickname($entry2display['login'], true).'" textsize="0.9" />
					<label posn="13 0 0" textcolor="'.$pluginsettings->toplists->login_color.'" text="'.$entry2display['login'].'" textsize="0.9" />
					<label posn="20 0 0" textcolor="'.$pluginsettings->toplists->value_color.'" text="'.$entry2display['v1'].'" textsize="0.9" />
					';
				}
4.
Save plugin.smartstats.php

5.
Open plugin.smartstats.xml

6.
SEARCH for line 163-168:

Code: Select all

				<toplist>
					<enabled>true</enabled>
					<name>TopCustom</name>
					<ident>topcustom</ident>
					<sql>SELECT login, nickname as name, custom as v1 FROM smart_players WHERE custom>0 ORDER BY v1 DESC LIMIT {limit}</sql>
				</toplist>
ADD lines 169-186 below:

Code: Select all

				<toplist>
					<enabled>true</enabled>
					<name>TopPlayedMaps (Local)</name>
					<ident>topmapsplaycountlocal</ident>
					<sql>SELECT name as mapname, author, playcount AS v1 FROM smart_maps WHERE playcount>0 ORDER BY playcount DESC LIMIT {limit}</sql>
				</toplist>
				<toplist>
					<enabled>true</enabled>
					<name>TopVotedMaps (Local)</name>
					<ident>topmapscountvoteslocal</ident>
					<sql>SELECT name as mapname, author, countvotes AS v1 FROM smart_maps WHERE countvotes>0 ORDER BY countvotes DESC LIMIT {limit}</sql>
				</toplist>
				<toplist>
					<enabled>true</enabled>
					<name>TopRatedMaps (Local)</name>
					<ident>topmapskarmalocal</ident>
					<sql>SELECT name as mapname, author, localkarma AS v1 FROM smart_maps WHERE localkarma>0 AND countvotes>=10 ORDER BY localkarma DESC LIMIT {limit}</sql>
				</toplist>
7.
Save plugin.smartstats.xml

8.
Publish SmartStats 2.9

9.
DONE ... three useful and important statistics have been added!
... and they even should work smooth and fine ... if i havn't made any syntax errors :D


Thank you very much Askuri! :thumbsup:



Comment:
As you may have noticed it is some kind of "quick and dirty" coded as i "hardcoded" the rounding of the karma to a value of 2 and the value of how many votes a map needs to be listed in the "TopRatedMaps"-Statistics to a value of 10. This will work for most users but to make it more configurable, which as always will be the best, you may optionaly want to add those variables to the plugin.smartstats.xml sometime.
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit our TM2 and SM Clanserver or download the INSOMNIA TM2-Trackpack or SM-Mappack !
You also find us at both Mania-Exchanges - search "German INSOMNIA Clan"
Post Reply

Return to “SMART Servercontroller”

Who is online

Users browsing this forum: No registered users and 0 guests