user panel version 2.01a with Ipod skin

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

Post Reply
jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

user panel version 2.01a with Ipod skin

Post by jouko100 » 01 Feb 2010 06:18

changed code 9.10.2010

example http://yfrog.com/6165276075p
installation:
edit url adresses
// urls edit addresses*********************************************************
global $url;
global $url3;
$url="http://ur webserver address/alarm.php";// edit this***************************
$url3="http://ur webserver address/ipod.jpg";// ipod skin
$ftp="ftp.ur ftp server.net";// must be ftp.xxx
global $ftplogin;
$ftplogin="ur login";
global $ftppass;
$ftppass="ur password";

//end urls******************************************************************
download skin ( use right click and save image as) http://yfrog.com/3dipodup and put it to ur webserver
more skins

http://xxx-ant.letsrock-tm.com/img/ipod-nano-blue.png
http://xxx-ant.letsrock-tm.com/img/ipod-nano-black.png
http://xxx-ant.letsrock-tm.com/img/ipod-nano-grey.png
http://xxx-ant.letsrock-tm.com/img/ipod-nano-pink.png
name plugin to jou.panel.php and put it to plugins dirtectory and add line <plugin>jou.panel.php</plugin> to plugins.xml
**instructins for alarm***********************************************
alarm to admin email shows who made alarm.New alarm.php and jou.panel.php
added button that makes alarm to admin via email and email makes sound. http://yfrog.com/5malarmp
u need firefox load it here http://www.mozilla-europe.org/fi/firefox/
first u need GMAIL make it here https://www.google.com/accounts/NewAcco ... 04f&type=2
Then u need addon for firefox tahat makes sound when email comes gmailhttps://addons.mozilla.org/fi/firefox/addon/1320
then u need webspace where u can upload php. maybe this is good http://maniaworld.eu/
upload alarm.php to yours webspace and edit ur email
copy and save new jou.panel.php
or download it from http://www.gigasize.com/get.php?d=xzok3l0lbvf
name plugin to jou.panel.php and put it to plugins dirtectory and add line <plugin>jou.panel.php</plugin> to plugins.xml
in start of jou.panel.php edit line
$url="http://www.ur webserver address/alarm.php";// edit this***************************


**************versions**************************************************************
version 2.01a
cleaned code

version 2.01 added
global $url;
global $url3;
and changed $url2 to $url3
$url3 is many places
now works same time with nouselink
// urls edit addresses*********************************************************
global $url;
global $url3;
$url="http://ur webserver address/alarm.php";// edit this***************************
$url3="http://ur webserver address/ipod.jpg";// ipod skin
$ftp="ftp.ur ftp server.net";// must be ftp.xxx
global $ftplogin;
$ftplogin="ur login";
global $ftppass;
$ftppass="ur password";

//end urls******************************************************************


version 2.0
example http://yfrog.com/6165276075p
added ipod skin
download skin ( use right click and save image as) http://xxx-ant.letsrock-tm.com/img/ipod-nano-blue.png and put it to ur webserver
more skins
http://yfrog.com/3dipodup
http://xxx-ant.letsrock-tm.com/img/ipod-nano-black.png
http://xxx-ant.letsrock-tm.com/img/ipod-nano-grey.png
http://xxx-ant.letsrock-tm.com/img/ipod-nano-pink.png
edit addresses in jou.panel.php
// urls edit addresses*********************************************************
$url="http://ur webserver address/alarm.php";// edit this***************************
$url2="http://ur webserver address/ipod.jpg";// ipod skin edit this******************''
$ftp="ftp.ur ftp server.net";// must be ftp.xxx
global $ftplogin;
$ftplogin="ur login";
global $ftppass;
$ftppass="ur password";

//end urls******************************************************************
install new jou.panel.php
and follow instructions in earlier versions

i hope someone is making new skins :1



version 1.o
added menu and hide buttons
menu button http://yfrog.com/31menussp
hide button http://yfrog.com/jypastep
menu shows panels and hide hides them.
All players can see his own panels


version 0.8
easier button config
added admin command /copyaseco that backups important files from xaseco folder to ur webserver. u can modify it copy what ever u like(if file types are supported in ur server).Button copy is in second panel.U must have ftp access to ur server and firewall must be opened for xaseco (vista ask it).

edit lines in joupanel.php
$url="http://www.ur webserver address/alarm.php";// edit this***************************

$ftp="ftp.ur ftp server.net";// must be ftp.xxx
global $ftplogin;
$ftplogin="ur login";
global $ftppass;
$ftppass="ur password";

version 0.7 now alarm to admin email shows who made alarm.New alarm.php and jou.panel.php


added button that makes alarm to admin via email and email makes sound. http://yfrog.com/5malarmp
u need firefox load it here http://www.mozilla-europe.org/fi/firefox/
first u need GMAIL make it here https://www.google.com/accounts/NewAcco ... 04f&type=2
Then u need addon for firefox tahat makes sound when email comes gmailhttps://addons.mozilla.org/fi/firefox/addon/1320
then u need webspace where u can upload php. maybe this is good http://maniaworld.eu/

upload alarm.php to yours webspace and edit ur email

load new jou.panel.php version 0.4 or higher

in start of jou.panel.php edit line
$url="http://www.ur webserver address/alarm.php";// edit this***************************


alarm.php

Code: Select all

<?php

$to="ur email.com";// put ur email here*****************************must  be gmail account

$subject ="";
$body=" made alarm from server";
utf8_encode($body);
utf8_encode($subject);

$from = $_GET['playerlogin'];




$message = $body;


if (mail($to, $subject, $message, $from)) {
  echo("<p>Alarm is made</p>");
echo"Back to server:Click trackmania in the  bottom";


 } else {
  echo("<p>Message delivery failed...</p>");

 }




?>

version 0.3 added chat command /links http://yfrog.com/16linkswbp

version 0.2 witht 2 sites and scroll

panel 1
http://yfrog.com/5vpanel1hp

panel 2
http://yfrog.com/6zpanel2wp

name plugin to jou.panel.php and put it to plugins dirtectory and add line <plugin>jou.panel.php</plugin> to plugins.xml

u can see it in Vhserver in FIN
jou.panel.php version 2.01

Code: Select all

<?php

//config***********************************************************
//version 2.01a
// urls edit  addresses*********************************************************
global $url;
global $url3;
$url="http://ur webserver address/alarm.php";// edit this***************************
$url3="http://ur webserver address/ipod.jpg";//  ipod skin
$ftp="ftp.ur ftp server.net";// must be ftp.xxx
global $ftplogin;
$ftplogin="ur login";
global $ftppass;
$ftppass="ur password";

//end urls******************************************************************


global $chatcommand;

global $chatcommand2;

global $chatcommand3;

global $chatcommand4;

global $chatcommand5;

global $chatcommand6;
global $chatcommand20;

global $chatcommand21;

global $chatcommand22;

global $chatcommand23;

global $chatcommand24;

global $chatcommand25;

global $chatcommand26;
global $chatcommandtext;
global $chatcommandtext2;
global $chatcommandtext3;
global $chatcommandtext4;
global $chatcommandtext5;
global $chatcommandtext6;
global $chatcommandtext20;
global $chatcommandtext21;
global $chatcommandtext22;
global $chatcommandtext23;
global $chatcommandtext24;
global $chatcommandtext25;
global $chatcommandtext26;

$chatcommand = '/recs';
$chatcommandtext='$i$s$f00recs';

$chatcommand2 = '/worst';
$chatcommandtext2='$i$s$f00worst';

$chatcommand3 = '/list';
$chatcommandtext3='$i$s$f00list';

$chatcommand4 = '/top10';
$chatcommandtext4='$i$s$f00top10';

$chatcommand5 = '/replay';
$chatcommandtext5='$i$s$f00res';

$chatcommand6 = '/skip';
$chatcommandtext6='$i$s$f00skip';

$chatcommand20 = '/helpall';
$chatcommandtext20='$i$s$f00help';

$chatcommand21 = '/wins';
$chatcommandtext21='$i$s$f00wins';

$chatcommand22 = '/stats';
$chatcommandtext22='$i$s$f00stats';

$chatcommand23 = '/links';
$chatcommandtext23='$i$s$f00links';

$chatcommand24 = '/time';
$chatcommandtext24='$i$s$f00time';

$chatcommand25 = '/copyaseco';
$chatcommandtext25='$i$s$f00copy';



global $buttonmainposition;
$buttonmainposition = '-60 -30 1';
// end  config*********************************************************




Aseco::registerEvent('onPlayerConnect', 'nouseButtonOn2');

Aseco::registerEvent('onNewChallenge', 'nouseButtonOn2');

Aseco::registerEvent('onEndRace', 'nouseButtonOff2');

Aseco::registerEvent('onEndRace', 'nouseButtonOff3');
Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick0');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick2');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick3');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick4');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick5');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick6');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick20');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick21');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick30');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick31');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick32');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick33');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick34');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick35');

Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick36');
Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick40');






global $aseco;















function nouseButtonOn2($aseco) {

   global $buttonmainposition;

   global $hits;
   global $url;
   global $url3;
   global $chatcommandtext;
   global $chatcommandtext2;
   global $chatcommandtext3;
   global $chatcommandtext4;
   global $chatcommandtext5;
   global $chatcommandtext6;



       $xml = '<manialink id="0815470000122">

      <format style="TextCardInfoSmall" textsize="1" />

      <frame posn="'.$buttonmainposition.'">

         

//menu***************************************************************************
<quad posn="72.2 -13 0" sizen="5 2.5"  halign="center" valign="center" style="Bgs1InRace" substyle="NavButton"  />

<label posn="72.2 -12.8 1" sizen="3 2" halign="center" valign="center" text="$i$s$f00Ipod" action="27008520"/>

// end menu*********************************************************************


      </frame>

   </manialink>';
$aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));



   

}



function nouseButtonOff2($aseco) {

   $xml = '<manialink id="0815470000122">

   <frame posn="0 0 0">

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008511" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008506" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008507" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008508" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008509" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008510" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008520" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008521" />
      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008531" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008532" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008533" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008534" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008535" />
      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008540" />
      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008531" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008532" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008533" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008534" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008535" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008536" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008520" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008521" />
      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008511" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008506" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008507" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008508" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008509" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008510" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008520" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008521" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008540" />    

      

      

   </frame>

   </manialink>';

   $aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));

}





function nouseButtonHandleClick0($aseco, $command) {

   global $chatcommand;

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   

   if ($action == '27008511'){

      $chat = array();

      $chat[0] = $playerid;

      $chat[1] = $login;

      $chat[2] = $chatcommand;

      $chat[3] = true;

      $aseco->playerChat($chat);

   }



   }

function nouseButtonHandleClick2($aseco, $command) {

   global $chatcommand2;

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   

  

if ($action == '27008506'){

      $chat = array();

      $chat[0] = $playerid;

      $chat[1] = $login;

      $chat[2] = $chatcommand2;

      $chat[3] = true;

      $aseco->playerChat($chat);

   }





}



function nouseButtonHandleClick3($aseco, $command) {

   global $chatcommand3; 

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   

  

if ($action == '27008507'){

      $chat = array();

      $chat[0] = $playerid;

      $chat[1] = $login;

      $chat[2] = $chatcommand3;

      $chat[3] = true;

      $aseco->playerChat($chat);

   }





}



function nouseButtonHandleClick4($aseco, $command) {

   global $chatcommand4; 

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   

  

if ($action == '27008508'){

      $chat = array();

      $chat[0] = $playerid;

      $chat[1] = $login;

      $chat[2] = $chatcommand4;

      $chat[3] = true;

      $aseco->playerChat($chat);

   }





}



function nouseButtonHandleClick5($aseco, $command) {

   global $chatcommand5; 

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   

  

if ($action == '27008509'){

      $chat = array();

      $chat[0] = $playerid;

      $chat[1] = $login;

      $chat[2] = $chatcommand5;

      $chat[3] = true;

      $aseco->playerChat($chat);

   }





}



function nouseButtonHandleClick6($aseco, $command) {

   global $chatcommand6; 

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   

  

if ($action == '27008510'){

      $chat = array();

      $chat[0] = $playerid;

      $chat[1] = $login;

      $chat[2] = $chatcommand6;

      $chat[3] = true;

      $aseco->playerChat($chat);

   }





}



function nouseButtonHandleClick30($aseco, $command) {

   global $chatcommand20; 

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   

  

if ($action == '27008531'){

      $chat = array();

      $chat[0] = $playerid;

      $chat[1] = $login;

      $chat[2] = $chatcommand20;

      $chat[3] = true;

      $aseco->playerChat($chat);

   }





}





function nouseButtonHandleClick31($aseco, $command) {

   global $chatcommand21; 

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   

  

if ($action == '27008532'){

      $chat = array();

      $chat[0] = $playerid;

      $chat[1] = $login;

      $chat[2] = $chatcommand21;

      $chat[3] = true;

      $aseco->playerChat($chat);

   }





}



function nouseButtonHandleClick32($aseco, $command) {

   global $chatcommand22; 

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   

  

if ($action == '27008533'){

      $chat = array();

      $chat[0] = $playerid;

      $chat[1] = $login;

      $chat[2] = $chatcommand22;

      $chat[3] = true;

      $aseco->playerChat($chat);

   }





}



function nouseButtonHandleClick33($aseco, $command) {

   global $chatcommand23; 

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   

  

if ($action == '27008534'){

      $chat = array();

      $chat[0] = $playerid;

      $chat[1] = $login;

      $chat[2] = $chatcommand23;

      $chat[3] = true;

      $aseco->playerChat($chat);

   }





}



function nouseButtonHandleClick34($aseco, $command) {

   global $chatcommand24; 

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   

  

if ($action == '27008535'){

      $chat = array();

      $chat[0] = $playerid;

      $chat[1] = $login;

      $chat[2] = $chatcommand24;

      $chat[3] = true;

      $aseco->playerChat($chat);

   }





}



function nouseButtonHandleClick35($aseco, $command) {

   global $chatcommand25; 

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   

  

if ($action == '27008536'){

      $chat = array();

      $chat[0] = $playerid;

      $chat[1] = $login;

      $chat[2] = $chatcommand25;

      $chat[3] = true;

      $aseco->playerChat($chat);

   }





}

function nouseButtonHandleClick20($aseco, $command) {

   global $chatcommand6; 

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   global $url;
   global $url3;

  

if ($action == '27008520'){

$xml = '<manialink id="0815470000123">

<frame posn="0 0 0">

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008531" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008532" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008533" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008534" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008535" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008536" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008520" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008521" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008511" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008506" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008507" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008508" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008509" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008510" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008520" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008521" /> 

       <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008540" />     

      

   </frame>

   </manialink>';

   

$aseco->client->addCall('SendDisplayManialinkPageToLogin', array($login, $aseco->formatColors($xml), 0, false));

global $url3;

global $url;

global $buttonmainposition;

global $hits;
global $chatcommandtext;
global $chatcommandtext2;
global $chatcommandtext3;
global $chatcommandtext4;
global $chatcommandtext5;
global $chatcommandtext6;
global $chatcommandtext20;
global $chatcommandtext21;
global $chatcommandtext22;
global $chatcommandtext23;
global $chatcommandtext24;
global $chatcommandtext25;
global $chatcommandtext26;

$xml = '<manialink id="0815470000122">

<format style="TextCardInfoSmall" textsize="1" />

<frame posn="'.$buttonmainposition.'">

// ipod*************************************************************
<quad posn="93 20 0" sizen="30 50"  halign="center" valign="center" image="'.$url3.'" />

<label posn="82 39 1" sizen="5 2" halign="left" valign="center" text="'.$chatcommandtext.'" action="27008511"/>

<label posn="82 37.5 1" sizen="5 2" halign="left" valign="center" text="'.$chatcommandtext2.'" action="27008506"/>

<label posn="82 36 1" sizen="5 2" halign="left" valign="center" text="'.$chatcommandtext3.'" action="27008507"/>

<label posn="82 34.5 1" sizen="5 2" halign="left" valign="center" text="'.$chatcommandtext4.'" action="27008508"/>

<label posn="82 33 1" sizen="5 2" halign="left" valign="center" text="'.$chatcommandtext5.'"action="27008509"/>

<label posn="82 31.5 1" sizen="5 2" halign="left" valign="center" text="'.$chatcommandtext6.'" action="27008510"/>



<label posn="82 30 1" sizen="5 2" halign="left" valign="center" text="'.$chatcommandtext20.'" action="27008531"/>





<label posn="82 28.5 1" sizen="5 2" halign="left" valign="center" text="'.$chatcommandtext21.'" action="27008532"/>





<label posn="82 27 1" sizen="5 2" halign="left" valign="center" text="'.$chatcommandtext22.'" action="27008533"/>





<label posn="82 25.5 1" sizen="5 2" halign="left" valign="center" text="'.$chatcommandtext23.'" action="27008534"/>





<label posn="82 24 1" sizen="5 2" halign="left" valign="center" text="'.$chatcommandtext24.'" action="27008535"/>





<label posn="82 22.5 1" sizen="5 2" halign="left" valign="center" text="'.$chatcommandtext25.'" action="27008536"/>

//hide********************************
<label posn="93 15 1" sizen="5 2" halign="center" valign="center" text="$i$s$766HIDE" action="27008540"/>
//ALARM*******************************************

<label posn="82 21 1" sizen="5 2" halign="left" valign="center" text="$i$s$f00alarm" url="'.$url.'" addplayerid="1"/>
//end ipod**********************************************************************


//menu***************************************************************************
<quad posn="72.2 -13 0" sizen="5 2.5"  halign="center" valign="center" style="Bgs1InRace" substyle="NavButton"  />

<label posn="72.2 -12.8 1" sizen="3 2" halign="center" valign="center" text="$i$s$f00Ipod" action="27008520"/>


// end menu*********************************************************************



      </frame>

   </manialink>';
$aseco->client->addCall('SendDisplayManialinkPageToLogin', array($login, $aseco->formatColors($xml), 0, false));



}

}
//hide************************************************************************

function nouseButtonHandleClick40($aseco, $command) {

   global $chatcommand6; 

   $playerid = $command[0];

   $login = $command[1];

   $action = $command[2].'';

   global $url;

  

if ($action == '27008540'){

$xml = '<manialink id="0815470000123">

   <frame posn="0 0 0">

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008531" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008532" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008533" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008534" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008535" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008536" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008520" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008521" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008511" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008506" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008507" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008508" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008509" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008510" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008520" />

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008521" /> 

      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008540" />      

      

   </frame>

   </manialink>';

   

$aseco->client->addCall('SendDisplayManialinkPageToLogin', array($login, $aseco->formatColors($xml), 0, false));

global $url;

global $url;

global $buttonmainposition;

global $hits;
global $chatcommandtext;
global $chatcommandtext2;
global $chatcommandtext3;
global $chatcommandtext4;
global $chatcommandtext5;
global $chatcommandtext6;

   $xml = '<manialink id="0815470000122">

      <format style="TextCardInfoSmall" textsize="1" />

      <frame posn="'.$buttonmainposition.'">

         
//menu***************************************************************************
<quad posn="72.2 -13 0" sizen="5 2.5"  halign="center" valign="center" style="Bgs1InRace" substyle="NavButton"  />

<label posn="72.2 -12.8 1" sizen="3 2" halign="center" valign="center" text="$i$s$f00Ipod" action="27008520"/>

// end menu*********************************************************************



      </frame>

   </manialink>';
$aseco->client->addCall('SendDisplayManialinkPageToLogin', array($login, $aseco->formatColors($xml), 0, false));



}

}

// copy xaseco files******************************************************


Aseco::addChatCommand('copyaseco', 'copy aseco');function chat_copyaseco($aseco, $command) {
   global $ftplogin;
   global $ftppass;
   global $ftp;   $admin = $command['author'];   $login = $admin->login;   $player = $aseco->server->players->getPlayer($login);   $playernick = ($player->nickname);if ($aseco->isMasterAdmin($login)) {$conn = ftp_connect($ftp) or die("Could not connect");ftp_login($conn,$ftplogin,$ftppass);ftp_nb_put($conn,"bannedips.xml","bannedips.xml",FTP_ASCII);

ftp_close($conn);
$conn = ftp_connect($ftp) or die("Could not connect");ftp_login($conn,$ftplogin,$ftppass);
ftp_nb_put($conn,"adminops.xml","adminops.xml",FTP_ASCII);

ftp_close($conn);


$conn = ftp_connect($ftp) or die("Could not connect");ftp_login($conn,$ftplogin,$ftppass);
ftp_nb_put($conn,"plugins.xml","plugins.xml",FTP_ASCII);

ftp_close($conn);
$conn = ftp_connect($ftp) or die("Could not connect");ftp_login($conn,$ftplogin,$ftppass);

ftp_nb_put($conn,"config.xml","config.xml",FTP_ASCII);
ftp_close($conn);


$conn = ftp_connect($ftp) or die("Could not connect");
ftp_login($conn,$ftplogin,$ftppass);
ftp_nb_put($conn,"localdatabase.xml","localdatabase.xml",FTP_ASCII);
ftp_close($conn);

$conn = ftp_connect($ftp) or die("Could not connect");ftp_login($conn,$ftplogin,$ftppass);
ftp_nb_put($conn,"rasp.xml","rasp.xml",FTP_ASCII);
ftp_close($conn);

$conn = ftp_connect($ftp) or die("Could not connect");
ftp_login($conn,$ftplogin,$ftppass);

ftp_nb_put($conn,"dedimania.xml","dedimania.xml",FTP_ASCII);

ftp_close($conn);
$conn = ftp_connect($ftp) or die("Could not connect");
ftp_login($conn,$ftplogin,$ftppass);

ftp_nb_put($conn,"autotime.xml","autotime.xml",FTP_ASCII);
ftp_close($conn);

   


} else {if ($aseco->isMasterAdmin($admin)) {   

$conn = ftp_connect($ftp) or die("Could not connect");
ftp_login($conn,$ftplogin,$ftppass);ftp_nb_put($conn,"bannedips.xml","bannedips.xml",FTP_ASCII);

ftp_close($conn);
$conn = ftp_connect($ftp) or die("Could not connect");
ftp_login($conn,$ftplogin,$ftppass);ftp_nb_put($conn,"adminops.xml","adminops.xml",FTP_ASCII);

ftp_close($conn);


$conn = ftp_connect($ftp) or die("Could not connect");
ftp_login($conn,$ftplogin,$ftppass);
ftp_nb_put($conn,"plugins.xml","plugins.xml",FTP_ASCII);

ftp_close($conn);
$conn = ftp_connect($ftp) or die("Could not connect");
ftp_login($conn,$ftplogin,$ftppass);

ftp_nb_put($conn,"config.xml","config.xml",FTP_ASCII);
ftp_close($conn);


$conn = ftp_connect($ftp) or die("Could not connect");
ftp_login($conn,$ftplogin,$ftppass);
ftp_nb_put($conn,"localdatabase.xml","localdatabase.xml",FTP_ASCII);
ftp_close($conn);

$conn = ftp_connect($ftp) or die("Could not connect");
ftp_login($conn,$ftplogin,$ftppass);
ftp_nb_put($conn,"rasp.xml","rasp.xml",FTP_ASCII);
ftp_close($conn);

$conn = ftp_connect($ftp) or die("Could not connect");
ftp_login($conn,$ftplogin,$ftppass);

ftp_nb_put($conn,"dedimania.xml","dedimania.xml",FTP_ASCII);

ftp_close($conn);
$conn = ftp_connect($ftp) or die("Could not connect");
ftp_login($conn,$ftplogin,$ftppass);

ftp_nb_put($conn,"autotime.xml","autotime.xml",FTP_ASCII);
ftp_close($conn);



} else {      $message = '$000[$fffAseco$000]$FC0 Sorry '.$playernick.'$z$s$FC0, you need to be a MasterAdmin to backup xaseco files!';              $aseco->addCall('ChatSendServerMessage', array($message));



}}}

//end copy aseco files*****************************************************************





// links******************************************

//replace  existing  links with your  own links



Aseco::addChatCommand('links', 'links page');



function chat_links($aseco, $command) {



    if ($aseco->server->getGame() == 'TMF') {

        $header = '{#welcome}Links page';

        $data = array();

        $data[] = array('{#message}');

        $data[] = array('Game  $l[tmtp:///:game]Manialink$l ');// i hope u dont  remove  this

                $data[] = array('Donate  $l[tmtp:///:donasivu]Manialink$l ');

        $data[] = array('Jous $l[http://www.freewebs.com/jouko100]site$l ');

                $data[] = array('VH $l[http://www.vhteam.foorumi.eu/index.php]forum$l ');



        

        display_manialink($command['author']->login, $header, array('Icons64x64_1', 'TrackInfo', -0.01), $data, array(0.9), 'OK');

    }

}  



// end  links******************************************

?>
Last edited by jouko100 on 14 Nov 2010 03:03, edited 147 times in total.

jamie_macdonald
TM-Patrol
TM-Patrol
Posts: 1612
Joined: 10 Jul 2008 19:48
Owned TM-games: TMUF, TMNF, TMS
Manialink(s): ET
Location: London, UK
Contact:

Re: user panel

Post by jamie_macdonald » 01 Feb 2010 16:36

presuming this in an extension of the clickable chat commands code in the other thread?

If so nice of you to share i will take a peek when home from work ^^

Thanks.

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

Re: user panel

Post by Ouwe » 01 Feb 2010 17:33

Nice plugin jouko, it's working just fine.
Only thing is I moved the buttons more to the right so now I see the Yes F5 and No F6 button when I press RES.
Thanks for this addon.

Image

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: user panel

Post by jouko100 » 01 Feb 2010 17:58

on the right is admin panel but maybe part of buttons right of it.

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

Re: user panel

Post by Ouwe » 01 Feb 2010 18:52

My admin panel is somewhere else :P

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: user panel

Post by jouko100 » 01 Feb 2010 19:52

maybe i put res and skip under F6 and make buttons little smaller.
Manana

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: user panel

Post by Ant » 01 Feb 2010 20:40

this looks very handy, much better than my way of creating plugins for each button - nice work :thumbsup:

dukez30
sunday driver
sunday driver
Posts: 59
Joined: 23 Aug 2008 14:26
Owned TM-games: TMU

Re: user panel

Post by dukez30 » 01 Feb 2010 20:42

Hi im getting an error here i think maybe something to do with xxx ants serverhelp plugin:



[XAseco] Load plugin [plugin.nouseforname.php]

Fatal error: Cannot redeclare nousebuttonon() (previously declared in C:\Users\P
C1\Desktop\Xaseco 1.10\plugins\plugin.serverhelp.PHP:20) in C:\Users\PC1\Desktop
\Xaseco 1.10\plugins\plugin.nouseforname.php on line 63
Press any key to continue . . .

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: user panel

Post by Ant » 01 Feb 2010 20:48

Yeah it probably has some same named global variables or functions - just disable my modded button and add the command from that into this one, then it should be fine.

EDIT--> Yes this is the same in both, it needs to be changed

Code: Select all

function nouseButtonOn
Maybe if you want, in the server help plugin (pretty much though, that is nousefornames original plugin with the position changed), change the functions to have a 2 at the end, for example:

Code: Select all

function nouseButtonOn2
and check for other similarly named functions and just add a 2, or add the function into this new user panel button plugin :thumbsup:

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: user panel

Post by jouko100 » 02 Feb 2010 03:08

XXX-Ant wrote:Yeah it probably has some same named global variables or functions - just disable my modded button and add the command from that into this one, then it should be fine.

EDIT--> Yes this is the same in both, it needs to be changed

Code: Select all

function nouseButtonOn
Maybe if you want, in the server help plugin (pretty much though, that is nousefornames original plugin with the position changed), change the functions to have a 2 at the end, for example:

Code: Select all

function nouseButtonOn2
and check for other similarly named functions and just add a 2, or add the function into this new user panel button plugin :thumbsup:

I done this.original code is changed

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: user panel

Post by jouko100 » 02 Feb 2010 03:51

New panel position.It is little over cp times but so is donatepanel too.So its place is this.

http://yfrog.com/8955201442p

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: user panel

Post by Ant » 03 Feb 2010 04:57

I have these 2 buttons already, could you make it so it works with these ??

Code: Select all

<?php

// Xaseco plugin to display single manialink button which execute one chatcommand
// by nouseforname

Aseco::registerEvent('onNewChallenge', 'nouseButtonOn');
Aseco::registerEvent('onPlayerConnect', 'nouseButtonOn');
Aseco::registerEvent('onEndRace', 'nouseButtonOff');
Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick');

global $chatcommand;
global $buttonmainposition;

// config
$chatcommand = '/helpall';
$buttonmainposition = '58 -30 1';



function nouseButtonOn($aseco) {
   global $buttonmainposition;
   $xml = '<manialink id="0815470000122">
      <format style="TextCardInfoSmall" textsize="1" />
      <frame posn="'.$buttonmainposition.'">
         <quad posn="0 0 0" sizen="10 2.5"  halign="center" valign="center" style="Bgs1InRace" substyle="NavButtonBlink"  />
      <label posn="0 0.2 1" sizen="8 2" halign="center" valign="center" text="$fffServer Help" action="27008505"/>
      </frame>
   </manialink>';
   $aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));
}

function nouseButtonOff($aseco) {
   $xml = '<manialink id="0815470000122">
   <frame posn="0 0 0">
      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="27008505" />
   </frame>
   </manialink>';
   $aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));
}

function nouseButtonHandleClick($aseco, $command) {
   global $chatcommand;
   $playerid = $command[0];
   $login = $command[1];
   $action = $command[2].'';
   
   if ($action == '27008505'){
      $chat = array();
      $chat[0] = $playerid;
      $chat[1] = $login;
      $chat[2] = $chatcommand;
      $chat[3] = true;
      $aseco->playerChat($chat);
   }
}

?>

Code: Select all

<?php

// Xaseco plugin to display single manialink button which execute one chatcommand
// by nouseforname

Aseco::registerEvent('onNewChallenge', 'nouseButtonOn2');
Aseco::registerEvent('onPlayerConnect', 'nouseButtonOn2');
Aseco::registerEvent('onEndRace', 'nouseButtonOff2');
Aseco::registerEvent('onPlayerManialinkPageAnswer', 'nouseButtonHandleClick2');

global $chatcommand2;
global $buttonmainposition2;

// config
$chatcommand2 = '/afk';
$buttonmainposition2 = '58 -27.5 1';



function nouseButtonOn2($aseco2) {
   global $buttonmainposition2;
   $xml2 = '<manialink id="08154700001222">
      <format style="TextCardInfoSmall" textsize="1" />
      <frame posn="'.$buttonmainposition2.'">
         <quad posn="0 0 0" sizen="10 2.5"  halign="center" valign="center" style="Bgs1InRace" substyle="NavButtonBlink"  />         
         <label posn="0 0.2 1" sizen="8 2" halign="center" valign="center" text="$fffA  F  K" action="270085052"/>
      </frame>
   </manialink>';
   $aseco2->client->addCall('SendDisplayManialinkPage', array($xml2, 0, false));
}

function nouseButtonOff2($aseco2) {
   $xml2 = '<manialink id="08154700001222">
   <frame posn="0 0 0">
      <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="270085052" />
   </frame>
   </manialink>';
   $aseco2->client->addCall('SendDisplayManialinkPage', array($xml2, 0, false));
}

function nouseButtonHandleClick2($aseco2, $command2) {
   global $chatcommand2;
   $playerid2 = $command2[0];
   $login2 = $command2[1];
   $action2 = $command2[2].'';
   
   if ($action2 == '270085052'){
      $chat2 = array();
      $chat2[0] = $playerid2;
      $chat2[1] = $login2;
      $chat2[2] = $chatcommand2;
      $chat2[3] = true;
      $aseco2->playerChat($chat2);
   }
}

?>
Would be much appreciated ta :1

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: user panel

Post by jouko100 » 03 Feb 2010 05:06

removed
Last edited by jouko100 on 04 Feb 2010 06:39, edited 1 time in total.

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: user panel

Post by Ant » 03 Feb 2010 16:29

sorry man, it doesn't work - I'll look into fixing it myself soon, for now though i'll just use my own 2 buttons - cheers for tryin to help though :thumbsup:

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: user panel version 0.2

Post by jouko100 » 05 Feb 2010 07:51

version 0.2 witht 2 sites and scroll

panel 1

http://yfrog.com/5vpanel1hp

panel 2

http://yfrog.com/6zpanel2wp

Post Reply