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

This forum is dedicated to the Aseco/Rasp 2 server records and control script by Flo and Assembler Maniac. Announcements and issues can be discussed in this forum.

Moderators: Flo, f*ckfish, Assembler Maniac, TM-Patrol

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

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

Post by Assembler Maniac » 23 Jan 2009 13:20

kama wrote:Any chance somebody could help me with my most winners widget issue? It shows the lesser winners and not the most :( (0 victories...)
My server is a Stunt server, that would be the only explanation I can come up with, since others servers running same config but different modes run OK.....
Any ideas ?
Tx in advance.
Sounds like the code for the menu doesn't take stunts mode into account. In stunts, the order of "winning" players should be reversed. 0 in a stunts record is actually the worst possible score, not the best unlike any of the other racing modes where the score is a # of seconds.

Fufi will have to fix the code so that Stunts is handled properly.

User avatar
kama
happy cruiser
happy cruiser
Posts: 135
Joined: 27 Mar 2008 22:13
Owned TM-games: TMO, TMS, TMU, TMN

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

Post by kama » 24 Jan 2009 14:00

That is what I kinda figured :(
Just hope correction is not too boresome, and that fufi will have the time....
Tx in advance for any further developments on this, I'll stay tuned.
Keep up da good work :thumbsup:
Co Leader of Spanish/German TMN Fanatics! Team (http://fanatics.sytes.net)
Spain:
F MiniKarting Rounds 42 pts.
F Rec Attack TA
Germany:
F HCR Rounds 36 pts
F Dirty Hamburg Rounds 36 points

User avatar
f*ckfish
Pit Crew
Pit Crew
Posts: 1302
Joined: 15 Jun 2007 07:59
Owned TM-games: TMNF, TMUF
Location: Dresden, Germany
Contact:

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

Post by f*ckfish » 24 Jan 2009 17:58

I'll have a look at all those stats issues the next time I'll update the widgets. But that's not priority for now.
inactive, sorry

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

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

Post by w1lla » 06 Mar 2009 10:41

Anychance that when a player connects he sends a command /savwidgets for example that his widgets are saved on the way he would like it. That would mean if set true it shows for the player when he/she connect and false if he/she doesnt want to see the widgets. Have been walking with this kind of command every time i connect to servers that have this beautifully plugin.

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

User avatar
kama
happy cruiser
happy cruiser
Posts: 135
Joined: 27 Mar 2008 22:13
Owned TM-games: TMO, TMS, TMU, TMN

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

Post by kama » 26 Apr 2009 14:35

Assembler Maniac wrote:
kama wrote:Any chance somebody could help me with my most winners widget issue? It shows the lesser winners and not the most :( (0 victories...)
My server is a Stunt server, that would be the only explanation I can come up with, since others servers running same config but different modes run OK.....
Any ideas ?
Tx in advance.
Sounds like the code for the menu doesn't take stunts mode into account. In stunts, the order of "winning" players should be reversed. 0 in a stunts record is actually the worst possible score, not the best unlike any of the other racing modes where the score is a # of seconds.

Fufi will have to fix the code so that Stunts is handled properly.

Any news?¿ Been quite a while now.....
Co Leader of Spanish/German TMN Fanatics! Team (http://fanatics.sytes.net)
Spain:
F MiniKarting Rounds 42 pts.
F Rec Attack TA
Germany:
F HCR Rounds 36 pts
F Dirty Hamburg Rounds 36 points

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

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

Post by Xymph » 26 Apr 2009 21:54

kama wrote:Any news?¿ Been quite a while now.....
viewtopic.php?p=151602#p151602
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

Bikerben666
cyclist
cyclist
Posts: 32
Joined: 12 Dec 2008 02:59
Owned TM-games: TMUF

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

Post by Bikerben666 » 19 Oct 2009 20:29

I just updated our server to Xaseco1.10 with the latest Fufi widgets.

Do some one have a idea, why i don't have backgrounds anymore in the widgets?
Image

The problem is the text this way is most of the time not readable in the game.

thx

User avatar
oliverde8
solid chaser
solid chaser
Posts: 1135
Joined: 07 Oct 2006 07:03
Owned TM-games: TMU
Manialink(s): oliverde8
Location: Turkey
Contact:

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

Post by oliverde8 » 19 Oct 2009 21:04

here is for Aseco, not Xaseco. YOu should look over here: viewtopic.php?f=127&t=15897
ImageImage
Manialink : oliverde8color>
Servers : STATS <> United | VeryShort | Made In Turkey

carly
highway camper
highway camper
Posts: 4
Joined: 20 Nov 2009 20:16
Owned TM-games: tmu

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

Post by carly » 18 Dec 2009 13:26

Hello
Please how do that right records be in left beneath

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

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

Post by nocturne » 18 Dec 2009 15:00

Edit the xml files in the /plugins/fufi/ directory.

carly
highway camper
highway camper
Posts: 4
Joined: 20 Nov 2009 20:16
Owned TM-games: tmu

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

Post by carly » 18 Dec 2009 16:13

I know but where there

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

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

Post by nocturne » 19 Dec 2009 17:09

I swear, the questions around here keep getting dumber and dumber. It's as if there wasn't a search button, nor instructions included in the first post... :grmblz:
You can adjust the configuration in the pretty self explaining "fufi_widgets_config.xml".

Some more specific settings on when to show which widget on which place with which size you can find in the files "./plugins/fufi/fufi_widgets_aseco.xml" and "./plugins/fufi/fufi_widgets_aseco.xml" (be sure to edit the one which matches your system).

You can also take a shot in pimping the graphical output by editing the XML files in the "./plugins/fufi" folder.

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

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

Post by nocturne » 08 Oct 2010 01:56

For the past two years I've had the problem of the widgets 'bugging out' with certain tracknames (with apostrophes, en/em dashes, etc), having the scoreboard widgets stuck until the next endround unless a player runs /togglewidgets twice. My previous fix was just invoking togglewidgets player by player at the beginning of every round, which proved inelegant as the widgets' xml code would need to be rebuilt all over again and still didn't fix the bugged challengeinfo widget.

Recently I was following a discussion on php.net and found an updated version of the classic fix_latin function, and decided to try it out.. And viola -- it worked! At the moment I have it running along fufi's regular getValidUTF8String function, though I haven't looked hard enough to see if it completely supercedes it.

Anyways, here's the new plugin.fufi.widgets.php : http://www.letsrock-tm.com/files/plugin ... dgets.phps

And if you want to know the difference..:

Code: Select all

//put in the vars section...
private $byte_map;
private $nibble_good_chars;

//functions to add into main class...
function init_byte_map(){
  for($x=128;$x<256;++$x){
    $this->byte_map[chr($x)]=utf8_encode(chr($x));
  }
  $cp1252_map=array(
    "\x80"=>"\xE2\x82\xAC",    // EURO SIGN
    "\x82" => "\xE2\x80\x9A",  // SINGLE LOW-9 QUOTATION MARK
    "\x83" => "\xC6\x92",      // LATIN SMALL LETTER F WITH HOOK
    "\x84" => "\xE2\x80\x9E",  // DOUBLE LOW-9 QUOTATION MARK
    "\x85" => "\xE2\x80\xA6",  // HORIZONTAL ELLIPSIS
    "\x86" => "\xE2\x80\xA0",  // DAGGER
    "\x87" => "\xE2\x80\xA1",  // DOUBLE DAGGER
    "\x88" => "\xCB\x86",      // MODIFIER LETTER CIRCUMFLEX ACCENT
    "\x89" => "\xE2\x80\xB0",  // PER MILLE SIGN
    "\x8A" => "\xC5\xA0",      // LATIN CAPITAL LETTER S WITH CARON
    "\x8B" => "\xE2\x80\xB9",  // SINGLE LEFT-POINTING ANGLE QUOTATION MARK
    "\x8C" => "\xC5\x92",      // LATIN CAPITAL LIGATURE OE
    "\x8E" => "\xC5\xBD",      // LATIN CAPITAL LETTER Z WITH CARON
    "\x91" => "\xE2\x80\x98",  // LEFT SINGLE QUOTATION MARK
    "\x92" => "\xE2\x80\x99",  // RIGHT SINGLE QUOTATION MARK
    "\x93" => "\xE2\x80\x9C",  // LEFT DOUBLE QUOTATION MARK
    "\x94" => "\xE2\x80\x9D",  // RIGHT DOUBLE QUOTATION MARK
    "\x95" => "\xE2\x80\xA2",  // BULLET
    "\x96" => "\xE2\x80\x93",  // EN DASH
    "\x97" => "\xE2\x80\x94",  // EM DASH
    "\x98" => "\xCB\x9C",      // SMALL TILDE
    "\x99" => "\xE2\x84\xA2",  // TRADE MARK SIGN
    "\x9A" => "\xC5\xA1",      // LATIN SMALL LETTER S WITH CARON
    "\x9B" => "\xE2\x80\xBA",  // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
    "\x9C" => "\xC5\x93",      // LATIN SMALL LIGATURE OE
    "\x9E" => "\xC5\xBE",      // LATIN SMALL LETTER Z WITH CARON
    "\x9F" => "\xC5\xB8"       // LATIN CAPITAL LETTER Y WITH DIAERESIS
  );
  foreach($cp1252_map as $k=>$v){
    $this->byte_map[$k]=$v;
  }
}

function fix_latin($instr){
  if(mb_check_encoding($instr,'UTF-8'))return $instr; // no need for the rest if it's all valid UTF-8 already
  $outstr='';
  $char='';
  $rest='';
  while((strlen($instr))>0){
    if(1==preg_match($this->nibble_good_chars,$instr,$match)){
      $char=$match[1];
      $rest=$match[2];
      $outstr.=$char;
    }elseif(1==preg_match('@^(.)(.*)$@s',$instr,$match)){
      $char=$match[1];
      $rest=$match[2];
      $outstr.=$byte_map[$char];
    }
    $instr=$rest;
  }
  return $outstr;
}

//in init function, or wherever really
$this->byte_map=array();
$this->init_byte_map();
$ascii_char='[\x00-\x7F]';
$cont_byte='[\x80-\xBF]';
$utf8_2='[\xC0-\xDF]'.$cont_byte;
$utf8_3='[\xE0-\xEF]'.$cont_byte.'{2}';
$utf8_4='[\xF0-\xF7]'.$cont_byte.'{3}';
$utf8_5='[\xF8-\xFB]'.$cont_byte.'{4}';
$this->nibble_good_chars = "@^($ascii_char+|$utf8_2|$utf8_3|$utf8_4|$utf8_5)(.*)$@s";
Last edited by nocturne on 09 Oct 2010 09:23, edited 1 time in total.
Chief Janitorial Supervisor of the Let'sRock! TM community : www.LetsRock-TM.com

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

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

Post by Ant » 08 Oct 2010 03:13

Nice work man !

Using this on XAseco gave me this error first time (used whole code from your link)

Code: Select all

[XAseco] Load plugin [plugin.fufi.widgets.php]
PHP Fatal error:  Call to undefined function init_byte_map() in /home/xxx-ant/XAseco/plugins/plugin.fufi.widgets.php on line 232
That line was

Code: Select all

init_byte_map();
changing it to

Code: Select all

$this->init_byte_map();
fixed it though, and it's working perfectly now :thumbsup:

I had to incorporate the edits into my existing version of the plugin though because of the Play panel (using yours after the above change made the karma widget display wrongly)

If anyone wants that version, download here

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

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

Post by nocturne » 09 Oct 2010 09:22

Arg.. figured I'd screw something up, hehe...

The version I had running on our servers was working fine, but due to all my edits for various other things I figured I'd make a clean edit off the distribution version... but forgot a few of my class-based changes, hehe.

Edited the source in my link above to reflect the fix... And could use some feedback from any others who have experienced similar issues with tracknames with incompatible latin characters..
Chief Janitorial Supervisor of the Let'sRock! TM community : www.LetsRock-TM.com

Post Reply