Page 40 of 41

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

Posted: 07 Jul 2018 13:46
by L3cKy
-

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.

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

Posted: 07 Jan 2020 00:00
by gorn_z34
I have a problem with the standings table, exactly in top tracks, top winning payouts is displayed nothing, and when i try to enable top betwins xaseco crashes. Could you advice what to do to at least make top tracks table working?

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

Posted: 07 Jan 2020 18:06
by undef.de
The "Top Tracks" Widget will start showing after some maps has been voted. Nearly same for "Winning Payouts", only if more then one Player are driving and someone won the widget will show something.

Please add the related logfile entries for the "crash" when you enable "Top Betwins".

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

Posted: 08 Jan 2020 14:23
by gorn_z34
Maps must been voted? You mean its amount of karma votes? The only thing i noticed in log was: 01/08,14:29:57] >> Updating `mostfinished` counts for all Players...
[PHP Warning] mysql_query(): Unable to save result set on line 1836 in file E:\TMServer\xaseco\plugins\plugin.records_eyepiece.php

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

Posted: 08 Jan 2020 14:41
by gorn_z34
When it comes to Bet Wins, i fixed that, thanks. But still dunno what to do with Top Tracks table at score. I posted the log above. Is that a "most finished" parameter responsible for this?

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

Posted: 08 Jan 2020 16:22
by undef.de
Btw.: There is no need to double post in that short period, just edit your previous post and mark what you have added.
gorn_z34 wrote:
08 Jan 2020 14:23
Maps must been voted? You mean its amount of karma votes?
Right, ManiaKarma or RASP Karma.
gorn_z34 wrote:
08 Jan 2020 14:23
The only thing i noticed in log was:

Code: Select all

[01/08,14:29:57] >> Updating `mostfinished` counts for all Players...
[PHP Warning] mysql_query(): Unable to save result set on line 1836 in file E:\TMServer\xaseco\plugins\plugin.records_eyepiece.php
Nothing more warnings? Only those lines? Anyway, it seems that your database is damage, you should try to repair.