Page 40 of 40

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Posted: 07 Jul 2018 13:46
by L3cKy
There is a problem with the music widget and the function "re_getMusicServerPlaylist" somehow records eyepiece dont sort the song id`s correctly at a map change after a player choosed a song.

Walkthrough to the issue:
Restart xaseco > change map > choose song > change map (correct song is playing) > choose song > change map (correct song is playing OR here already the wrong song is playing) > choose song > change map (wrong song is playing)

It seems like records eyepiece is playing a song before or after the (by player) choosed one.

With adding a new event at the plugin.musicserver.php the issue is gone at records eyepiece (but of course the problem is somewhere at the plugin.records_eyepiece.php and need to be fixed ^^):

Code: Select all

//Thanks to [X]Skills
Aseco::registerEvent('onNewChallenge', 'test_fix');

function test_fix($aseco) {
	global $music_server;

    if ($music_server->cachetags) {
    	refresh_tags($aseco, $music_server);
        $aseco->releaseEvent('onMusicboxReloaded', null);
	}
}

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Posted: 08 Sep 2018 18:10
by L3cKy
I added a little nice feature to see the track difficulty at Current Track inside the Challengewidget.
This works only if the track is uploaded on TMX otherwise the feature is disabled.

Image


Code: Select all

Search in the plugin.records_eyepiece.php for the function "re_buildChallengeWidget" and add/replace the lines from start to end ... you maybe also need to adjust the coordinates ... 

/*
#///////////////////////////////////////////////////////////////////////#
#									#
#///////////////////////////////////////////////////////////////////////#
*/

function re_buildChallengeWidget ($state = 'race') {
	global $aseco, $re_config;


	if ($re_config['CHALLENGE_WIDGET'][0]['ENABLED'][0] == true) {

		$xml = false;
		if ($state == 'race') {

			// Set the right Icon and Title position
			$position = (($re_config['CHALLENGE_WIDGET'][0]['RACE'][0]['POS_X'][0] < 0) ? 'right' : 'left');

			if ($position == 'right') {
				$imagex	= ($re_config['Positions'][$position]['image_open']['x'] + ($re_config['CHALLENGE_WIDGET'][0]['WIDTH'][0] - 15.5));
				$iconx	= ($re_config['Positions'][$position]['icon']['x'] + ($re_config['CHALLENGE_WIDGET'][0]['WIDTH'][0] - 15.5));
				$titlex	= ($re_config['Positions'][$position]['title']['x'] + ($re_config['CHALLENGE_WIDGET'][0]['WIDTH'][0] - 15.5));
			}
			else {
				$imagex	= $re_config['Positions'][$position]['image_open']['x'];
				$iconx	= $re_config['Positions'][$position]['icon']['x'];
				$titlex	= $re_config['Positions'][$position]['title']['x'];
			}


			// Create the ChallengeWidget at Race
			$xml = str_replace(
				array(
					'%manialinkid%',
					'%actionid%',
					'%posx%',
					'%posy%',
					'%image_open_pos_x%',
					'%image_open_pos_y%',
					'%image_open%',
					'%posx_icon%',
					'%posy_icon%',
					'%posx_title%',
					'%posy_title%',
					'%halign%',
					'%trackname%',
					'%authortime%',
					'%author%'
				),
				array(
					$re_config['ManialinkId'] .'05',
					$re_config['ManialinkId'] .'02',
					$re_config['CHALLENGE_WIDGET'][0]['RACE'][0]['POS_X'][0],
					$re_config['CHALLENGE_WIDGET'][0]['RACE'][0]['POS_Y'][0],
					$imagex,
					-5.35,
					$re_config['Positions'][$position]['image_open']['image'],
					$iconx,
					$re_config['Positions'][$position]['icon']['y'],
					$titlex,
					$re_config['Positions'][$position]['title']['y'],
					$re_config['Positions'][$position]['title']['halign'],
					$re_config['Challenge']['Current']['name'],
					$re_config['Challenge']['Current']['authortime'],
					$re_config['Challenge']['Current']['author']
				),
				$re_config['Templates']['CHALLENGE_DEFAULT']['HEADER']
			);
			$xml .= $re_config['Templates']['CHALLENGE_DEFAULT']['FOOTER'];


			# START ADD ##############################################################################################################


			if ($re_config['Challenge']['Current']['pageurl'] != false) {
				if ($re_config['Challenge']['Current']['diffic'] == 'Beginner') {
					$diffi = "http://i.imgur.com/aYN1adR.png";
				} elseif ($re_config['Challenge']['Current']['diffic'] == 'Intermediate') {
					$diffi = "http://i.imgur.com/4vo4fHe.png";
				} else {
					$diffi = "http://i.imgur.com/3TBYFId.png";
				}

   				$xml .= '<manialink id="444444445555555555">
         	 				<frame posn="58.5 41.5 0">
     	   					<label scale="0.825" textsize="1" posn="0 0 0" sizen="6 2" halign="center" text="$z$FFFDifficulty:$z"/>
          	 				<quad posn="3.5 -0.5 0" sizen="2 1.5" halign="center" valign="center" image="'.$diffi.'" />
     	  	 				</frame>
   		 	  			</manialink>';
			} else {
				$xml .= '<manialink id="444444445555555555"></manialink>';
			}

		}
		else if ($state == 'score') {

			// Create the ChallengeWidget at Score
			$xml = str_replace(
				array(
					'%manialinkid%',
					'%posx%',
					'%posy%',
					'%nexttrackname%',
					'%nextauthortime%',
					'%nextauthor%',
					'%nextenv%',
					'%nextmood%',
					'%nextgoldtime%',
					'%nextsilvertime%',
					'%nextbronzetime%'
				),
				array(
					$re_config['ManialinkId'] .'05',
					$re_config['CHALLENGE_WIDGET'][0]['SCORE'][0]['POS_X'][0],
					$re_config['CHALLENGE_WIDGET'][0]['SCORE'][0]['POS_Y'][0],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['name'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['authortime'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['author'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['env'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['mood'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['goldtime'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['silvertime'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['bronzetime']
				),
				$re_config['Templates']['CHALLENGE_SCORE']['HEADER']
			);
			$xml .= $re_config['Templates']['CHALLENGE_SCORE']['FOOTER'];
			$xml .= '<manialink id="444444445555555555"></manialink>';
		}
		
############################################################################################################### END ADD #

		if ($xml != false) {
			return $xml;
		}
	}
}

/*
#///////////////////////////////////////////////////////////////////////#
#									#
#///////////////////////////////////////////////////////////////////////#
*/
Greetings L3cky

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Posted: 15 Sep 2018 11:20
by NoTimeToDrive
Hey L3cKy.

Thanks for this little upgrade :thumbsup:
I add it today into the server.
And it looks great 8)
Nice idea from you :lovetm

Thanks A Lot!!! :1

Grt Ed

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Posted: 16 Sep 2018 04:29
by L3cKy
NoTimeToDrive wrote:
15 Sep 2018 11:20
Hey L3cKy.

Thanks for this little upgrade :thumbsup:
I add it today into the server.
And it looks great 8)
Nice idea from you :lovetm

Thanks A Lot!!! :1

Grt Ed
Thanks for the feedback ... ;)

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Posted: 21 Apr 2019 20:18
by pete9516
undef.de wrote:
11 Mar 2018 14:26
weasel wrote:
11 Mar 2018 13:54
Omg , that amound of maps :P
Doesn't that slow down xaseco much ?
If you turn off the re-reading of the map at each mapchange, then it shouldn't bother much.
Hey there, can you tell us how to turn off the re-reading of the map at each mapchange? Thank you really much

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Posted: 22 Apr 2019 08:53
by undef.de
pete9516 wrote:
21 Apr 2019 20:18
undef.de wrote:
11 Mar 2018 14:26
weasel wrote:
11 Mar 2018 13:54
Omg , that amound of maps :P
Doesn't that slow down xaseco much ?
If you turn off the re-reading of the map at each mapchange, then it shouldn't bother much.
Hey there, can you tell us how to turn off the re-reading of the map at each mapchange? Thank you really much
Edit "rasp.settings.php" and set "$reset_cache_start" to "false";

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Posted: 17 Sep 2019 00:33
by gorn_z34
What does reloading at each maps gives? And why its worth to disable it? What do i will notice when i will disable it?

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Posted: 17 Sep 2019 14:34
by undef.de
gorn_z34 wrote:
17 Sep 2019 00:33
What does reloading at each maps gives? And why its worth to disable it? What do i will notice when i will disable it?
If you have many maps (e.g. 2000+) on your server you have now a slow map change, like the Records-Eyepiece widgets will be shown later. If you turn off the re-read, then the widgets will be shown on time.

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Posted: 17 Sep 2019 15:53
by gorn_z34
I know but does it affect, for example signs loading to the players? Is it needful? What are the disadvantages of disabling it?

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Posted: 17 Sep 2019 18:05
by undef.de
gorn_z34 wrote:
17 Sep 2019 15:53
I know but does it affect, for example signs loading to the players?
No, it's just for XAseco/Records-Eyepiece.
gorn_z34 wrote:
17 Sep 2019 15:53
Is it needful?
If you have more then 2000 maps on your server, then yes.
gorn_z34 wrote:
17 Sep 2019 15:53
What are the disadvantages of disabling it?
If you add maps with an external tool (like RemoteCP or AdminServ...) then newly added maps will not be shown in XAseco/Records-Eyepiece.