[A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71c

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

User avatar
niarfman
road tourist
road tourist
Posts: 83
Joined: 05 Jun 2008 07:57
Owned TM-games: TMUF

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by niarfman » 21 Jul 2008 13:31

Xymph wrote:Some of these are mixed up: Alpine is the same as Rally but should be copied from Snow, and Speed is the same as Bay instead of Desert.
Nice idea though.
I thinked it too. I firstly used the same icon for Rally and Alpine and the same icon for Bay and Speed, but it's wrong !

I have firstly associated like you suggest because I have seen it in Aseco Code ... My current association is the right one. Let test it ;)
Image
Admin en second des serveurs SSM° / tripatouilleur de PHP
Tous nos serveurs tournent sous GNU/Linux !

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

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by Xymph » 21 Jul 2008 18:52

niarfman wrote:Pictures will appear after a little time for download ^^

If you don't see them, restart the game and type /list again.

I didn't found another way to display this picture. So the pics are on my ISP web server.
I checked with Nadeo, but those environment icons are indeed not available as style/substyle quads for ManiaLink code. Too bad. :(
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

User avatar
niarfman
road tourist
road tourist
Posts: 83
Joined: 05 Jun 2008 07:57
Owned TM-games: TMUF

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by niarfman » 21 Jul 2008 21:17

I have tried all icons by hope it includes this pics but no ...

Xymph, I want to write my mod to Xaseco 101 as soon as possible. The actual structure of my mod is based on your Jukebox plug.

I know some administrators who want to see this possibility to display all this informations with /list under Xaseco.

I want to add configurations parameters from XML Jukebox's files to enable / disable display of recs / times / recs owners. Should be integrated with Aseco or Xaseco ...
Image
Admin en second des serveurs SSM° / tripatouilleur de PHP
Tous nos serveurs tournent sous GNU/Linux !

User avatar
niarfman
road tourist
road tourist
Posts: 83
Joined: 05 Jun 2008 07:57
Owned TM-games: TMUF

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by niarfman » 23 Jul 2008 17:22

Yeepa ... Niarf Hapy ...

My provider closed my web page due to too many download from it ! :ftw:

I have to move all my screenshots and links to my dedicated Web server ... :(

The pics used in last version are located on my ISP web page. I have to host them too ... :|

Il will post when all will be ok
Image
Admin en second des serveurs SSM° / tripatouilleur de PHP
Tous nos serveurs tournent sous GNU/Linux !

User avatar
niarfman
road tourist
road tourist
Posts: 83
Joined: 05 Jun 2008 07:57
Owned TM-games: TMUF

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by niarfman » 26 Jul 2008 06:06

I have repaired all broken links to download the plugin.
Image
Admin en second des serveurs SSM° / tripatouilleur de PHP
Tous nos serveurs tournent sous GNU/Linux !

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

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by nocturne » 04 Aug 2008 19:05

Don't know if you spotted this in the 2.1.6 thread...
nocturne wrote:

Code: Select all

	function replayCallvote($command)
		{
		$player = $command['author'];

		// check if track already in jukebox
		if (array_key_exists($uid, $this->jukebox))                             // find by uid in jukebox
			{
			$message = $this->Aseco->formatColors($this->messages['TRACKINJB']);
			$this->Aseco->client->query('ChatSendServerMessageToLogin', $message, $admin->login);
			return;
			}
Mistype in line 2060 of the jukebox plugin? ('$admin->login' to '$player->login')
Should be 2291 in the 1.71 version of your jukebox plugin, I believe...

User avatar
niarfman
road tourist
road tourist
Posts: 83
Joined: 05 Jun 2008 07:57
Owned TM-games: TMUF

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by niarfman » 04 Aug 2008 23:25

Nop I didn't see that,

I will check it up tomorrow.

I didn't work on my mod since 2-3 weeks so I will try to do that thomorrow ^^

Thx for your post, Nocturne
Image
Admin en second des serveurs SSM° / tripatouilleur de PHP
Tous nos serveurs tournent sous GNU/Linux !

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

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by nocturne » 12 Aug 2008 00:09

Why not limit the display of records past the server's maximum, and properly highlight the last place? This should be all you need:

Code: Select all

$this->Aseco->getPlugin("Rasp")->maxrecs

Edit:
Also found a teeny bug... if a player has brackets in their name, it screws up the xml syntax (resulting in /list not working and xml end tag errors)...

Replacing the following line worked for me:

Code: Select all

          $rec_Nickname=str_replace(array('$i','$w','$s','$m','$n','$I','$W','$S','$M','$N','$o','$O','<','>'),array('','','','','','','','','','','','','-','-'),$row_sql->NickName);  // bugfix for names conflicting with xml syntax

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

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by Xymph » 12 Aug 2008 07:48

nocturne wrote:Also found a teeny bug... if a player has brackets in their name, it screws up the xml syntax (resulting in /list not working and xml end tag errors)...

Replacing the following line worked for me:

Code: Select all

          $rec_Nickname=str_replace(array('$i','$w','$s','$m','$n','$I','$W','$S','$M','$N','$o','$O','<','>'),array('','','','','','','','','','','','','-','-'),$row_sql->NickName);  // bugfix for names conflicting with xml syntax
That's not the right (nor complete) way to do it. All data that's put into ML xml should be pulled through htmlspecialchars to escape the angled brackets as well as the ampersand and the double quote.
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

User avatar
niarfman
road tourist
road tourist
Posts: 83
Joined: 05 Jun 2008 07:57
Owned TM-games: TMUF

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by niarfman » 12 Aug 2008 16:41

Hi All,

I have checked up my mod to view your points. I apologize, I haven't enough time before to do it ...

So I have corrected '$admin->login' to '$player->login' such as Nocturne suggest. And message is correctly send to player in 1.71c.

I didn't modify my str_replace function. I have tested "<" and ">" chars and it works fine with 1.71c. I use, as Xymph suggest, htmlspecialchars function to do that.

But, in 1.71b version, the htmlspecialchars function was missing for Nickname (I have forgotten to use it only for nickname, it was used for all others variables ...).

The first post still linked to 1.71b ... I have modified it and it's the last version (1.71c) which is now able.

Thanks to have report this bugs ;)
Image
Admin en second des serveurs SSM° / tripatouilleur de PHP
Tous nos serveurs tournent sous GNU/Linux !

User avatar
niarfman
road tourist
road tourist
Posts: 83
Joined: 05 Jun 2008 07:57
Owned TM-games: TMUF

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by niarfman » 12 Aug 2008 16:43

nocturne wrote:Why not limit the display of records past the server's maximum, and properly highlight the last place? This should be all you need:

Code: Select all

$this->Aseco->getPlugin("Rasp")->maxrecs
Didn't test it ... It give maxrecs for current user ?

I don't think using it will be faster or more proper than my actual code :?
Image
Admin en second des serveurs SSM° / tripatouilleur de PHP
Tous nos serveurs tournent sous GNU/Linux !

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

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by nocturne » 12 Aug 2008 19:27

niarfman wrote:
nocturne wrote:Why not limit the display of records past the server's maximum, and properly highlight the last place? This should be all you need:

Code: Select all

$this->Aseco->getPlugin("Rasp")->maxrecs
Didn't test it ... It give maxrecs for current user ?

I don't think using it will be faster or more proper than my actual code :?
Basically, that string just gives the maximum records limit set in the RASP config, so records past that number can be filtered out. For example, if the maxrecs is set to 50 and a player would have had the 55th record -- that record shouldn't really be displayed (as it doesn't count, after all).

This is the code I used (ignore the extra loops, of course)...

Code: Select all

       if($rank<>0){
		if ($i > $this->Aseco->getPlugin("Rasp")->maxrecs) {
			$i=$this->Aseco->getPlugin("Rasp")->maxrecs;
			}
        $rank=$rank.'/'.$i;
		$last50 = $i - 50; // -nocturne=-
        
        if($rank==1){ // Highlighted Syntax if first
          $rank='$0a0'.$rank;
          $score_map='$0a0'.$score_map;
          }
        if($rank<5 && $rank>1){ // Highlight other top5       -nocturne=-
          $rank='$1a6'.$rank;
          $score_map='$1a6'.$score_map;
          }
        if($rank>=$last50 && $rank<$i){ // Highlight last 50       -nocturne=-
          $rank='$d80'.$rank;
          $score_map='$d80'.$score_map;
          }
        if($rank==$i){
          $score_map='$F50'.$score_map; // Highlighted Syntax if last
          $rank='$F50'.$rank;
          //$rank='$F50399/399';
          }
		if ($rank > $i) {
          $rank='-';
          $score_map='-';
		  }
        }
        else{
          $rank='-';
          $score_map='-';
          }
Xymph wrote:That's not the right (nor complete) way to do it. All data that's put into ML xml should be pulled through htmlspecialchars to escape the angled brackets as well as the ampersand and the double quote.
Well, look at you and your fancy php... :roll:

Yeah, suppose that'd be the best way to handle it... I just noticed the bug, and fixed it, hehe.

Also, I'm hacking up the 1.71 version (looks the best, imho), so if that entails any difference just ignore my comments, hehe.

User avatar
niarfman
road tourist
road tourist
Posts: 83
Joined: 05 Jun 2008 07:57
Owned TM-games: TMUF

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by niarfman » 12 Aug 2008 22:50

Ok, it's to suit with Rasp max records ^^.

By now I prefer to keep all ranks. It allows new players to see a progression despite they are unranked. This recs are saved in database. So why don't use them ;)

I like your modification to add colors for 1st Rank 2nd to 5th one, ...

Have you tried other modifications. Should be good to implement some of them whith my plug.

Code: Select all

About your XMLRPC Crash, modify this line :
$stgout = str_replace('{REC_NICKNAME}', '$FFF'.$rec_Nickname, $stgout);
by

Code: Select all

$stgout = str_replace('{REC_NICKNAME}', '$FFF'.htmlspecialchars($rec_Nickname), $stgout);
I have forgotten it in 1.71b. It was ok with 1.6x ...
Image
Admin en second des serveurs SSM° / tripatouilleur de PHP
Tous nos serveurs tournent sous GNU/Linux !

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

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by nocturne » 13 Aug 2008 03:41

niarfman wrote:Ok, it's to suit with Rasp max records ^^.

By now I prefer to keep all ranks. It allows new players to see a progression despite they are unranked. This recs are saved in database. So why don't use them ;)

I like your modification to add colors for 1st Rank 2nd to 5th one, ...

Have you tried other modifications. Should be good to implement some of them whith my plug.

Code: Select all

About your XMLRPC Crash, modify this line :
$stgout = str_replace('{REC_NICKNAME}', '$FFF'.$rec_Nickname, $stgout);
by

Code: Select all

$stgout = str_replace('{REC_NICKNAME}', '$FFF'.htmlspecialchars($rec_Nickname), $stgout);
I have forgotten it in 1.71b. It was ok with 1.6x ...
Glad you liked it, as it didn't work... hehe (need to place '$rank=$rank.'/'.$i;' in each loop instead of before... suppose it's time for some fancy elseif'ing)

Other than minor formatting tweaks, most of my mods are pretty nonfuctional atm... Working on a votejuke function, a '/list norank' function, tweaking up the display of '/list nofinish' and '/list karma', and adding a callback to load up a recs window when you click a track's top rec holder in /list. Most of the rest is suited to the server it ends up on, ie. ranklimits and round timers for juking and adding. I'd be willing to share whatever I code up, but it seems most of my to-do list involves stuff most would find irrelevant, hehe...

Ouwe
happy cruiser
happy cruiser
Posts: 152
Joined: 07 Sep 2007 15:01
Owned TM-games: TMUF, Canyon
Location: The Netherlands

Re: [A2.x.x/Rasp_Jukebox] SSM°Niarfman v1.71a

Post by Ouwe » 13 Aug 2008 06:30

I would like to use it on my servers to (it looks very nice), but I am running Xaseco.
Is it already available for Xaseco?

Post Reply