[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, Assembler Maniac, f*ckfish, 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 » 13 Aug 2008 09:26

Ouwe wrote: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?
Not a this time. I have to do this :)
Image
Admin en second des serveurs SSM° / tripatouilleur de PHP
Tous nos serveurs tournent sous GNU/Linux !

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 10:01

Thanks for your answer.
I will just wait...
Thanks for your effort.

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 » 30 Aug 2008 20:56

Niarfman, is there any progress for XAseco?

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 » 01 Sep 2008 18:15

Sorry, stand-by for the moment.

It will took more time than I thought 'cause there are too many differences between Aseco and Xaseco plugins.

I have no time for Trackmania since a month I think.

If I am able to find time for it sooner, I will post here ^^
Image
Admin en second des serveurs SSM° / tripatouilleur de PHP
Tous nos serveurs tournent sous GNU/Linux !

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 » 01 Sep 2008 20:27

Ok, thanks for your answer.
Looking forward to use your edited version though :P

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 » 01 Sep 2008 22:39

I noticed wildcard searching in /list wasn't working on tracks with fancy color-coded names (due to preserving trackname colors for display)... so I made a quick fix:

Code: Select all

			$trackname =str_replace(array('$i','$w','$s','$m','$n','$I','$W','$S','$M','$N','$o','$O'),array('','','','','','','','','','','',''),$row['Name']);
			
			$stripped_trackname = stripFormatting($row['Name']);
			$trackauthor = $row['Author'];
			$trackenv = $row['Environnement'];
			 
			if ( $wildcard == '*' )
				{
				$pos = 0;
				}
			else
				{
				$pos = stripos($stripped_trackname, $wildcard);
				if ( $pos === false )
					{
					$pos = stripos($trackauthor, $wildcard);
					}
				}
Goes in the GetAllChallenges function.. should be easy enough to find.

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

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

Post by Assembler Maniac » 02 Sep 2008 13:38

The whole point of the stripFormatting call is to remove all formatting from the string. Can you give some examples where this was failing? Or are you saying that because of mods made to the jukebox, it was no longer working properly?

Here's a better way to make it display the tracks *with* color info in them (blech), and keep them searchable without formatting in them. Look for "// CHANGED" to see what's different from the ORIGINAL code.

Code: Select all

			$trackname = stripFormatting($row['Name']);
			$trackauthor = $row['Author'];
			$trackenv = $row['Environnement'];
			if ( $wildcard == '*' )
				{
				$pos = 0;
				}
			else
				{
				$pos = stripos($trackname, $wildcard);
				if ( $pos === false )
					{
					$pos = stripos($trackauthor, $wildcard);
					}
				}

			// env is a additive compare always, so /list xxx env:bay will give all bay tracks with xxx in track or author
			if ($env != '*' &&
				($wildcard == '*' || ( $wildcard != '*' && !($pos === false))))
				{
				$pos = stripos($trackenv, $env);
				}

			if (!($pos === false))
				{
				$trkarr = array();
				$stgout = $detail;
				$stgout = str_replace('{TRACKNUM}', $tid, $stgout);
				$stgout = str_replace('{TRACKID}', $tid . '. ', $stgout);
				$stgout = str_replace('{TRACKNAME}', htmlspecialchars($row['Name']) . '  ', $stgout);	// CHANGED
				$stgout = str_replace('{TRACKAUTHOR}', htmlspecialchars($trackauthor), $stgout);
				$stgout = str_replace('{TRACKENV}', $trackenv, $stgout);
				$s .= $stgout;
				$tid++;
				$ctr++;
				if ( $ctr == 20 && $showwindow )
					{
					$ctr = 0;
					$s = $header . $s . $footer;
					$content[] = $s;
					$s = '';
					}
				$trkarr['name'] = $row['Name'];	// CHANGED
				$trkarr['filename'] = $row['FileName'];
				$trkarr['uid'] = $row['UId'];

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 » 02 Sep 2008 16:44

Assembler Maniac wrote:The whole point of the stripFormatting call is to remove all formatting from the string. Can you give some examples where this was failing? Or are you saying that because of mods made to the jukebox, it was no longer working properly?
In that case, it's due to the mod if search doesn't work. I have replaced stripFormatting call to a str_replace wich only remove some known $x and keep $xxx color codes. I didn't know there is a search function wich use $trackname from GetAllChallenges :?

I will fix it sooner ^^

Thx for the report, nocturne. I will use your fix or AM suggestion.
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 » 03 Sep 2008 02:47

Assembler Maniac wrote:The whole point of the stripFormatting call is to remove all formatting from the string. Can you give some examples where this was failing? Or are you saying that because of mods made to the jukebox, it was no longer working properly?
Yeah, it's due to the mod...

AM's code is a bit cleaner, though it's still a good idea to strip out the $w's...

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 » 03 Sep 2008 07:05

nocturne wrote:Yeah, it's due to the mod...

AM's code is a bit cleaner, though it's still a good idea to strip out the $w's...
The 2 functions have different goals. I didn't create Jukebox, so I didn't know that displayed infos were used by search functions ^^.

When I have started to modify this plug I didn't understand why all color were stripped ... It's more difficult to see clearly what is displayed in a single color. Now I understand :D

Ps : - Excuse for any misunderstanding. English is not my native language and it's a bit difficult for me to explain (or to understand) correctly :oops:

- AM, the community needs you. It's a very good point if you still help us :3
Image
Admin en second des serveurs SSM° / tripatouilleur de PHP
Tous nos serveurs tournent sous GNU/Linux !

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

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

Post by Assembler Maniac » 03 Sep 2008 12:45

You guys may not realize that I didn't create RASP at all, Eyez did. I just took it over when he stopped working on it (with an Ok from him).

There are several reasons that there is no color on the track names, and no, it really doesn't make it any more difficult to read.
  • It makes the names searchable
  • It prevents sizing problems that come from shadow, wide, italic, bold
  • It prevents text from not being readable because the color is close, or identical, to the background
  • If someone made the text in a book be different colors, do you really think it would be easier to read?
Of course my code is cleaner 8) , I've been working on RASP/ASECO for several years. I've been designing/developing code for 25+ years in more than a few languages (BASIC, C, C++, VB, VC, Assembler (Z-80 and x86), dBase, Clipper, PowerBuilder). What you see in RASP (and in some cases the ASECO core) is not accidental, I put a fair amount of thought into everything I did with it.

Modifying getAllChallenges alone won't change the display for listing by Karma or NoFinish, you'll need to change code in the corresponding functions too.

I'm still here, just not doing much in the way of coding for A/R as the moment.
niarfman wrote:
nocturne wrote:Yeah, it's due to the mod...

AM's code is a bit cleaner, though it's still a good idea to strip out the $w's...
The 2 functions have different goals. I didn't create Jukebox, so I didn't know that displayed infos were used by search functions ^^.

When I have started to modify this plug I didn't understand why all color were stripped ... It's more difficult to see clearly what is displayed in a single color. Now I understand :D

Ps : - Excuse for any misunderstanding. English is not my native language and it's a bit difficult for me to explain (or to understand) correctly :oops:

- AM, the community needs you. It's a very good point if you still help us :3

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 » 03 Sep 2008 15:25

Thanks for your reply, AM 8)

I haven't modified nofinish and karma lists because I don't use them. You are right when you suggest to modify another ones. I have to do it ^^

Your code is clean and it's why I use it to make my mod. You say cleaner ... can you indicate me lacks of my code. If I can improve it, it's welcome :)

I have removed function to strip color because. For me, authors have used it to allow players to see it. You are also right when you say that an unique color can prevent the readability in some case. It's more professional but it's a game :)
I only remove $x codes which are known to modify the size of the text to prevent for sizing problems.
Ps : We are not in a book but in a game ;)
Players are here to have fun :thumbsup:

Your work is very impeccable and your codes work fine, it's not by magic. Just don't forget it's only a game and have fun too when you work for the community :lovetm
Image
Admin en second des serveurs SSM° / tripatouilleur de PHP
Tous nos serveurs tournent sous GNU/Linux !

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

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

Post by Assembler Maniac » 03 Sep 2008 17:57

I wasn't commenting on the overall code you've re-done, just the section in getAllChallenges that I replied to. :)

At some point I may download the mods that have been done and take a look at the code and make improvements if needed.

It's great that the author decided to colorize their track name for IN GAME DISPLAY, but when it comes to listing out the tracks, I think people would much rather see a clear, easy to read, list of the tracks and their associated info than a bunch of jumbled colors that make you want to scream in terror.

I'm aware this is a game, but the same things that drive me crazy in business also drive me crazy in a game. A cluttered UI is a problem that people don't seem to realize is bugging them, even though it's right in front of them. I've designed hundreds of forms & windows for people to put data into, and similar numbers of reports, and the one thing that I usually get compliments on is ease of use and readability. In short, more is not always better.

The good part about ASECO being in PHP is that you can modify it to the way you want. The bad part is that after you've made your changes, you have to manually update the code if there's changes in the original that you want to have. It's totally up to you on how you want it to look, and making those changes available to the public just means people have more choices, and that's a good thing.

niarfman wrote:Thanks for your reply, AM 8)

I haven't modified nofinish and karma lists because I don't use them. You are right when you suggest to modify another ones. I have to do it ^^

Your code is clean and it's why I use it to make my mod. You say cleaner ... can you indicate me lacks of my code. If I can improve it, it's welcome :)

I have removed function to strip color because. For me, authors have used it to allow players to see it. You are also right when you say that an unique color can prevent the readability in some case. It's more professional but it's a game :)
I only remove $x codes which are known to modify the size of the text to prevent for sizing problems.
Ps : We are not in a book but in a game ;)
Players are here to have fun :thumbsup:

Your work is very impeccable and your codes work fine, it's not by magic. Just don't forget it's only a game and have fun too when you work for the community :lovetm

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.71c

Post by nocturne » 05 Sep 2008 21:14

Well, if it's based on personal preference, why not just create a config option (inside an additional jukebox config, as not to mess with updates as much)? That way, you could also merge the several plugin versions easily enough (I myself prefer the old style).

As far as color coding in the list goes, either way has it's pros and cons. I find a lot of players can more easily find the track they want by the associated color codes, but readability is still an issue (I just adjust the color slightly when I notice it). Color coding for the player names, though, doesn't serve as much point in my opinion...

I've been hacking up the jukebox a bit in my spare time, to finish the whole concept of making the rec info available. Basically, updating the other list functions such as karma and nofinish, adding norank and nogold, and moving the new detailed list function to become '/list detailed' to preserve the original simple list display. If I ever actually get it all finished, I'll be sure to toss it Niarf's way in case he wants to integrate anything.

And to AM, I completely understand your views on a simplistic UI. For example, the records fufi widget distracts the heck out of me -- so I just disabled it's display by default to all players above the first hundred ranks (they can't do without it, it seems). Everything else, like the pb/rec display box, I've been slowly moving off to the bottom or sides, to keep it out of view but leave it available for reference if needed. When you stopped by Let'sRock the other day, aseco was admittedly an ugly mess -- but you didn't have to be so mean about it! :cry:

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

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

Post by Assembler Maniac » 06 Sep 2008 01:15

nocturne wrote:When you stopped by Let'sRock the other day, aseco was admittedly an ugly mess -- but you didn't have to be so mean about it! :cry:
Ummm, you may have taken a comment about a track to be the UI layout. OR, if you were talking about the "crap" comment, I was having a really bad day already, and getting on a server with a bunch of junk around the sides and no way to turn it off kinda bugged me more than it should have. Wasn't trying to be mean, was trying to ask a simple question and just did it kinda bad.

:(

I may not have known it was yours and was just basically annoyed. Too many people seem to think more is better and that just gets under my skin. It wasn't a direct comment to you or the layout. It's kinda the feeling you get when you buy a new comp and it has a load of "crapware" installed, you just want to rip it all out and have a nice clean OS to work with.

Post Reply