[(X)Aseco] Fufi Widgets (v0.80b)

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

pestacide
wheelbarrow operator
wheelbarrow operator
Posts: 22
Joined: 25 Jul 2009 15:26
Owned TM-games: tmu tmn

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by pestacide » 04 Aug 2009 16:58

<?xml version="1.0" encoding="utf-8" ?>
<aseco_plugins>
<plugin>plugin.localdatabase.php</plugin>
<plugin>plugin.rounds.php</plugin>
<plugin>chat.admin.php</plugin>
<plugin>chat.help.php</plugin>
<plugin>chat.records.php</plugin>
<plugin>chat.records2.php</plugin>
<plugin>chat.recrels.php</plugin>
<plugin>chat.dedimania.php</plugin>
<plugin>chat.players.php</plugin>
<plugin>chat.players2.php</plugin>
<plugin>chat.wins.php</plugin>
<plugin>chat.laston.php</plugin>
<plugin>chat.stats.php</plugin>
<plugin>chat.server.php</plugin>
<plugin>chat.song.php</plugin>
<plugin>chat.me.php</plugin>
<!-- <plugin>plugin.muting.php</plugin> -->
<plugin>plugin.tmxinfo.php</plugin>
<plugin>plugin.sminfo.php</plugin>
<plugin>plugin.track.php</plugin>
<plugin>plugin.checkpoints.php</plugin>
<plugin>plugin.dedimania.php</plugin>
<plugin>plugin.rasp.php</plugin>
<plugin>plugin.rasp_jukebox.php</plugin>
<plugin>plugin.rasp_chat.php</plugin>
<plugin>plugin.rasp_karma.php</plugin>
<plugin>plugin.rasp_nextmap.php</plugin>
<plugin>plugin.rasp_nextrank.php</plugin>
<plugin>plugin.rasp_votes.php</plugin>
<plugin>plugin.chatlog.php</plugin>
<!-- <plugin>plugin.msglog.php</plugin> -->
<plugin>plugin.style.php</plugin>
<plugin>plugin.panels.php</plugin>
<!-- <plugin>plugin.donate.php</plugin> -->
<!-- <plugin>plugin.musicserver.php</plugin> -->
<plugin>plugin.uptodate.php</plugin>
<!-- <plugin>plugin.rpoints.php</plugin> -->
<!-- <plugin>plugin.autotime.php</plugin> -->
<!-- <plugin>plugin.access.php</plugin> -->
<plugin>jfreu.plugin.php</plugin>
<plugin>mistral.idlekick.php</plugin>
<plugin>plugin.fufi.widgets.php</plugin>
</aseco_plugins>
whats in mine

weerwolf1
smooth traffic navigator
smooth traffic navigator
Posts: 236
Joined: 08 May 2008 09:25
Owned TM-games: All but original
Location: The Netherlands

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by weerwolf1 » 04 Aug 2009 22:32

Sry, but i cant seem to reproduce this error. The comment cleary says that the local database plugin has to be activated, but in your config it is ok.
Maybe you can post the aseco.log from top till the first track is starting. use the Code tag for clean posting ;)
Before posting replace the private data with ***
- IP and portnumber server
- Superadminname and password
- Database IP and name

Then i will take a look if something there can be discovered
LYNX°°°° - Maniaplanet Gaming Community!
news | clan | community | & more
°°°°

Markus10
tricycle manager
tricycle manager
Posts: 29
Joined: 29 Mar 2008 09:30
Owned TM-games: TMN,TMU

Re: [(X)Aseco] Fufi Widgets (v0.71a)

Post by Markus10 » 14 Aug 2009 18:37

f*ckfish wrote: 'LocalRecs' for Local Records
'DediRecs' for Dedimania Records
'LiveRanks' for Live Rankings
'TopRanks' for the best server ranks
'TopPlaytime' for your most dedicated visitors
'TopWinners' for the most victorious players
'MostRecords' for the guys with the most records
is there another list für TopDonaters, like TopDons or something?

Xymph
Pit Crew
Pit Crew
Posts: 5653
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: [(X)Aseco] Fufi Widgets (v0.71a)

Post by Xymph » 14 Aug 2009 19:29

Markus10 wrote:is there another list für TopDonaters, like TopDons or something?
No, because the /topdons command was added in XAseco v1.06 in March 2009, way after the latest Widgets (v0.80b) release in December 2008.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

Markus10
tricycle manager
tricycle manager
Posts: 29
Joined: 29 Mar 2008 09:30
Owned TM-games: TMN,TMU

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by Markus10 » 14 Aug 2009 19:37

yes, but there is a /topdons command which shows the Top Donaters. And this command must get his infos from a list, and i want to give this list into one of the scoreboard widgets.

I saw that already on the >zero< server

Xymph
Pit Crew
Pit Crew
Posts: 5653
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by Xymph » 14 Aug 2009 21:31

Markus10 wrote:yes, but there is a /topdons command which shows the Top Donaters. And this command must get his infos from a list, and i want to give this list into one of the scoreboard widgets.
You didn't read what I said. :roll: That command didn't exist yet when latest Widgets version was released, so obviously it doesn't support its use out of the box.
Markus10 wrote:I saw that already on the >zero< server
They must have hacked it up themselves.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

Jojo_44
road tourist
road tourist
Posts: 87
Joined: 13 Jan 2009 16:57
Owned TM-games: Tmnf, Tmuf

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by Jojo_44 » 17 Aug 2009 13:01

Markus10 wrote:yes, but there is a /topdons command which shows the Top Donaters. And this command must get his infos from a list, and i want to give this list into one of the scoreboard widgets.

I saw that already on the >zero< server

Yes i have done this ;) It´s exclusive for Zero, sry.

regards Jojo >Zero<

User avatar
szkodnik
cyclist
cyclist
Posts: 30
Joined: 17 Aug 2009 16:27
Owned TM-games: TMU, TMS, TMO
Manialink(s): tmtp://#join=szkodziu
Location: Poland, Szczecin

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by szkodnik » 17 Aug 2009 17:40

SS from my server
Image

Find code and add green things in \xaseco\plugins\plugin.fufi.widgets.php
1.
  • function getMostRecsList($limit=50){
    $query='select p.Login, p.Nickname, count(p.Id) as Count from records r inner join players p on r.PlayerId = p
    .Id group by p.Id order by count desc limit '.$limit;
    $res = mysql_query($query);
    $rankings = array();
    while ($row = mysql_fetch_object($res)) {
    $player = new CTUPlayer($row->Nickname, $row->Login);
    $ranking['player'] = $player;
    $ranking['score'] = $row->Count;
    $rankings[] = $ranking;
    }
    return $rankings;
    }

    function getchat_topdonsList($limit=50){
    $query = 'SELECT p.NickName, x.donations FROM players p
    LEFT JOIN players_extra x ON (p.Id=x.PlayerId)
    WHERE x.donations!=0 ORDER BY x.donations DESC LIMIT ' .$limit;
    $res = mysql_query($query);
    $rankings = array();
    while ($row = mysql_fetch_object($res)) {
    $player = new CTUPlayer($row->NickName, $row->Login);
    $ranking['player'] = $player;
    $ranking['score'] = $row->donations;
    $rankings[] = $ranking;
    }
    return $rankings;
    }

    function getTopWinnersList($limit=50){
    $query = 'SELECT Login, NickName, Wins FROM players ORDER BY Wins DESC LIMIT '.$limit;
    $res = mysql_query($query);
    $rankings = array();
    while ($row = mysql_fetch_object($res)) {
    $player = new CTUPlayer($row->NickName, $row->Login);
    $ranking['player'] = $player;
    $ranking['score'] = $row->Wins;
    $rankings[] = $ranking;
    }
    return $rankings;
    }
2.
  • function getShowPoints($content){
    $gamemode = $this->Aseco->server->gameinfo->mode;
    $showPoints = false;
    switch ($content){
    case 'LocalRecs':
    if ($gamemode==4) $showPoints = true; break;
    case 'LiveRanks':
    if ($gamemode==0 || $gamemode==4 || $gamemode==5) $showPoints = true; break;
    case 'TopRanks':
    $showPoints = true; break;
    case 'NatRanks':
    $showPoints = true; break;
    case 'TopWinners':
    $showPoints = true; break;
    case 'chat_topdons':
    $showPoints = true; break;

    case 'MostRecs':
    $showPoints = true; break;
    default: break;
    }
    return $showPoints;
    }
3.
  • // Initialization of the FufiWidgets


    if (IN_XASECO)

    […]

    if ((in_array('LocalRecs', $fufiWidgets->settings["sblwidget"]["used"])
    || in_array('TopWinners', $fufiWidgets->settings["sblwidget"]["used"])
    || in_array('MostRecs', $fufiWidgets->settings["sblwidget"]["used"])
    || in_array('chat_topdons', $fufiWidgets->settings["sblwidget"]["used"])
    || in_array('TopRanks', $fufiWidgets->settings["sblwidget"]["used"])) || $fufiWidgets->settings["localrecordsw
    idget"]["enabled"] || $fufiWidgets->settings["karmawidget"]["enabled"]){
    global $ldb_settings;
    $fufiWidgets->addDependence("Local Database", 'ldb_settings');
    }
and on end of file:
  • if ((in_array('LocalRecs', $_PLUGIN->settings["sblwidget"]["used"])
    || in_array('TopWinners', $_PLUGIN->settings["sblwidget"]["used"])
    || in_array('MostRecs', $_PLUGIN->settings["sblwidget"]["used"])
    || in_array('chat_topdons', $_PLUGIN->settings["sblwidget"]["used"])
    || in_array('TopRanks', $_PLUGIN->settings["sblwidget"]["used"])) ||
    $_PLUGIN->settings["localrecordswidget"]["enabled"] || $_PLUGIN->settings["karmawidget"]["enabled"]){
    $_PLUGIN->addDependence("LocalDb", 1);
    }
Now edit xaseco\plugins\fufi\fufi_widgets_xaseco.xml
Add another <list></list> between <scoreboardlists></scoreboardlists> :

Code: Select all

                       <list>
                                <title>Donated Coppers</title>
                                <content>chat_topdons</content>
                                <x>5</x>
                                <y>45.3</y>
                                <width>18</width>
                                <entrycount>7</entrycount>
                        </list>

I used lists because in codes aren't colors.
You can see it on tmtp://#join=szkodziu
enjoy! : )
I don't know english, PHP and MySQL but I scratch along ; )
TM accs: 20szn, szkodziu, szkodnisia

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by nouseforname » 17 Aug 2009 20:01

thanks, i was just on the way to start making it, when i found you made it already. ;)

ya, sharing work in a nice community is just nice and the base of a good community, even without telling others, that the work is best, special, beeing selfish or whatever. :)
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

jeffroselier
road tourist
road tourist
Posts: 102
Joined: 25 Oct 2006 07:59
Location: MARSEILLE

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by jeffroselier » 18 Aug 2009 06:38

Hello,

As in the top100 players to have to display the karma Top100 tracks?

Thank you.

User avatar
szkodnik
cyclist
cyclist
Posts: 30
Joined: 17 Aug 2009 16:27
Owned TM-games: TMU, TMS, TMO
Manialink(s): tmtp://#join=szkodziu
Location: Poland, Szczecin

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by szkodnik » 18 Aug 2009 08:00

I don't know, I understood correctly, but if anything is in database, you can list it in fufi.
I don't know english, PHP and MySQL but I scratch along ; )
TM accs: 20szn, szkodziu, szkodnisia

User avatar
Katagrama
road tourist
road tourist
Posts: 86
Joined: 22 Nov 2008 18:31
Owned TM-games: TMNF
Location: Brazil

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by Katagrama » 23 Aug 2009 19:16

szkodnik wrote:if anything is in database, you can list it in fufi.
How?? Is it easy or hard??
One thing I would love to have in my server is the server rank widget always visible, not only in the scoreboard, but during the races too and showing the top X players in the serverrank + the Y players close to the current player that is viewing the widget (like we already have for the dedimania and local records widgets during races). Is it hard to do?
Image

User avatar
szkodnik
cyclist
cyclist
Posts: 30
Joined: 17 Aug 2009 16:27
Owned TM-games: TMU, TMS, TMO
Manialink(s): tmtp://#join=szkodziu
Location: Poland, Szczecin

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by szkodnik » 24 Aug 2009 20:42

I did Top Clans, Top Donators and National rank. I never worked with MySQL and PHP before created my own TM server.
Answer: for me it's not easy. I can realize my ideas but not everything. I'm telling about all scripts etc.
I don't know english, PHP and MySQL but I scratch along ; )
TM accs: 20szn, szkodziu, szkodnisia

User avatar
Katagrama
road tourist
road tourist
Posts: 86
Joined: 22 Nov 2008 18:31
Owned TM-games: TMNF
Location: Brazil

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by Katagrama » 24 Aug 2009 21:30

wow! a National Rank would be awesome! :)
Maybe it was hard becase the widgets you created didnt have a command in Xaseco, because that guy said that if the command is in Xaseco it is easier. But he didn't explain how to do!! Someone explain please: If the command is in Xaseco, then how can I do a widget for it in the easier way??? :gobananas:
Image

User avatar
szkodnik
cyclist
cyclist
Posts: 30
Joined: 17 Aug 2009 16:27
Owned TM-games: TMU, TMS, TMO
Manialink(s): tmtp://#join=szkodziu
Location: Poland, Szczecin

Re: [(X)Aseco] Fufi Widgets (v0.80b)

Post by szkodnik » 25 Aug 2009 19:31

I made Top Clans from /topclans, Nat Rank based on /topclans (query to MySQL) and Top Donators from /topdons
I will publish code for National Rank, but I must add something to query but I don't know how :D Please be patient :P

How make a widget from command? I don't have universal algorithm. Watch on code for /topdons, modify MySQL query basing on any other widget from scoreboard and try do it. If I can, you can too : )
I don't know english, PHP and MySQL but I scratch along ; )
TM accs: 20szn, szkodziu, szkodnisia

Post Reply