Page 4 of 7

Re: eXpansion 0.9.7 @ nighty branch (26/7/2014)

Posted: 31 Jul 2014, 06:53
by chipo89
ok, oilverde8
I Thank you for the beautiful work you did for "expansion"
and for the support ^ ^

i have more question ^^

yes that is the exact time consuming devellopement
I will quietly wait for the next Update
I just go for a ride on your wiki page (expansion) I am trying to see the first party plugin, I'll try to make a plugin (bet / visitor)
but its so hard for i think..... XD i download php storm
and see your tuto on wiki expansion but error lol

good day all and fun

Re: eXpansion 0.9.7 @ nighty branch (26/7/2014)

Posted: 31 Jul 2014, 11:50
by reaby
-best runs widget (top of screen)
Fixed
-event helper
This is used to Sm:Storm PlaformBeta to dispatch events
-ForceSkin — how to configure
Should work in SM:Storm, working status for TM unknow, config at server control panel, use url of the .zip file for the skin
-dedimania script — led error Red
This is normal, some of the plugins are ment for different game titles and game modes :)
-internet relay chat--> works but cannot be turned off (kills manialive)
Fixed
-map suggestions — plugin load but nothing happens xD and can l turning
A small button will appear at bottom left, when you click it it opens a window to send suggestions.
Suggestions are saved to DedicatedServer/UserData/map_suggestion.txt
-musicbox — how to configure (file format)
https://github.com/eXpansionPluginPack/ ... s-musicbox
-network status widget - what is, how to configure
no configuration needed, it shows players at bottom of screen with netlost status (no response in 4 seconds)
You can also use /adm netstat for showing some basic infos, like ping and response times.
-server neighborhood--> not try
ok.
-server statistic — led orange, nonfunctional
If you run windows server, this needs additional php extension to run, before doing this step, make sure your php has the extension file php_com_dotnet.dll at c:\php_basefolder\ext\ folder:

then enable it, edit php.ini:

Code: Select all

extension=php_com_dotnet.dll
-Quiz — how config
No configuration needed, just enable plugin and do /help
there is new chat commands availabe: so type
/ask to ask, after composing a question with answers, the chat is used to match for the chat line to answer
/answer to show the answer and cancel question
/cancel to cancel question, not show answer
/question to show question again
/points to show current points standing
/point to assign points (works only for admins which has assigned permissions)
-suggestion map buton--> does not work when pressed
weird, it works for my server just fine.
-Tm karma — how configure contry karma?
The plugin is at non-working state and is disabled for now, this is after update :)

Re: eXpansion 0.9.7 @ nighty branch (26/7/2014)

Posted: 31 Jul 2014, 16:33
by chipo89
hi reaby

you are very worker

I just re-tested for plugins

  suggestion map button:
button is displayed but error:
error: plugin (plugin path)
All which you want to call a method from, does not exist


quiz:
it works a little pressure but an error
error: trying to get property of non-object

some little thing set on my side

server stats:
everything is good in my dimension but I do not see any change for the plugin on screen

ty

Re: eXpansion 0.9.7 @ nighty branch (26/7/2014)

Posted: 31 Jul 2014, 17:12
by chipo89
I would try to make a small plugin to see the number of visitors on the server
and a plugin bet (with% which amounts to the server if possible)
I went to your wiki
https://github.com/eXpansionPluginPack/ ... rs-:-First% 20plugin
What is FDI?
i have dl PhpStorm
I have created a file MetaData.php
<? php
ManiaLivePlugins namespace \ oliverde8 \ test;

class metadata extends ManiaLivePlugins \ eXpansion \ Core \ type \ {MetaData
/ / @ Todo work easy to configure and set up dependencies
}
I need regular.>
and a test.php file
<? php
ManiaLivePlugins namespace \ oliverde8 \ test;

class test extends ManiaLivePlugins \ eXpansion \ Core \ \ type {BasicPlugin

Public exp_onLoad ()
{
}

Public exp_onReady ()
{
}

Public exp_onUnLoad ()
{
}
}
I need regular.>

when I look in the way everything is good
  and when I raise expansion:
fatal error: Class 'ManiaLivePLugins \ oliverde8 \ test \ ManiaLivePlugins \ eXpansion \ Core \ type \ MetaData' not found in E \ exp \ libraries \ ManiaLivePlugins \ eXpansion \ oliverde8 \ MetaData.php on line 9

Re: eXpansion 0.9.7 @ nighty branch (26/7/2014)

Posted: 31 Jul 2014, 17:50
by oliverde8
Can you post your code using

Code: Select all

[code] 
[/code] plz, it looks very strange the code you posted thigns are not in the correct order and eveything so hard to understand.

I will try and post download for an empty plugin this weekend. meanwhile you can read php psr-0 compliance to understand how our classes are named and the file sturcture.

For namespaces there is this tutorial like thing not to bad : http://fr.openclassrooms.com/informatiq ... oms-en-php

sinon ce tuto pour de la POO en PHP n'est pas mal sauf que beacoup de choses inutilise c'est trop long a mon gout : http://fr.openclassrooms.com/informatiq ... jet-en-php

Re: eXpansion 0.9.7 @ nighty branch (26/7/2014)

Posted: 31 Jul 2014, 20:30
by oliverde8
chipo89 wrote: server stats:
everything is good in my dimension but I do not see any change for the plugin on screen

ty
Yes it doesen't work since Nadeos last update to the game for some reasons graphs just don't show up :(

I did investigate and I couldn't find what have changed I will see this weekend again if not ask help from Nadeo about graphs because they used to be soooo nice and use them a lot.

We are investigating the other errors without much success we will keep you posted.

For the dedimania widget issue in script mode I still need to look at it, I need to do it with a working head not when tired and rush things up

Re: eXpansion 0.9.7 @ nighty branch (26/7/2014)

Posted: 01 Aug 2014, 19:00
by oliverde8
hey soo some news.

Dedimania widget in script mode should be fixed
allow customization of quit dialog
Fixed adding local maps
rounds points are recovered on expansion start and saved
Change force mode plz see here : http://forum.maniaplanet.com/viewtopic. ... 18&t=28748

Records are saved on map restart on scirpt mode no issues was detected
Issue with server stats graphs has been identified and being worked on

I also worked on a tool to debug issues with update and that should fix the issue or help us fix it. It is coded in shell so I need to code in for windows also.

so, nearly there :)

Re: eXpansion 0.9.7 @ nighty branch (26/7/2014)

Posted: 02 Aug 2014, 11:20
by chipo89
I wanted to point out that there is also a bug with the music,
other player not hear

Re: eXpansion 0.9.7 @ nighty branch (26/7/2014)

Posted: 02 Aug 2014, 12:22
by chipo89
hehe ^^

I train to do a plugin "news"
I have managed to display the "expansion setting"
Image

and in the list of plugins
Image
  but if I click on start its close me Expansion
my patch :\ManiaLivePlugins\eXpansion\news
i have create 1 MetaData.php

Code: Select all

<?php
/**
 * Created by PhpStorm.
 * User: chipo
 * Date: 02/08/14
 * Time: 12:02
 */

namespace ManiaLivePlugins\eXpansion\news;


use ManiaLivePlugins\eXpansion\Core\types\config\types\Int;
use ManiaLivePlugins\eXpansion\Core\types\config\types\String;

class MetaData extends \ManiaLivePlugins\eXpansion\Core\types\config\MetaData{

    public function onBeginLoad() {
        parent::onBeginLoad();
        $this->setName("news");
        $this->setDescription("Ajoutez vos news");
        $config = Config::getInstance();

        $var = new String('text', $config, false);
        $var->setDefaultValue('hello');
        $var->setGroup('news');
        $this->registerVariable($var);

        $var = new String('text', 'news 1', $config, false);
        $var->setDefaultValue('hello');
        $var->setGroup('news');
        $this->registerVariable($var);



    }
} ?>
1files Config.php

Code: Select all

<?php
/**
 * Created by PhpStorm.
 * User: chipo
 * Date: 02/08/14
 * Time: 12:08
 */
namespace ManiaLivePlugins\eXpansion\news;

class Config extends \ManiaLib\Utils\Singleton {

    public $text = "hello";
    public $size = 30;  // image width in maniaplanet display units

    public $x = -30;  // image position x in maniaplanet display units
    public $y = 90; // image position y in maniaplanet display units
}

?>

and news.php

Code: Select all

<?php

namespace ManiaLivePlugins\eXpansion\news;

/**
 *
 */
class news extends \ManiaLivePlugins\eXpansion\Core\types\ExpPlugin
{

    /** @var Config */
    private $config;

    private $settingsChanged = false;

    public function exp_onReady()
    {
        $this->config = Config::GetInstance();
        $this->displayWidget(null);
        $this->enableApplicationEvents();
    }

    public function onSettingsChanged(\ManiaLivePlugins\eXpansion\Core\types\config\Variable $var)
    {
        $name = $var->getName();

        if(isset($this->config->$name)){
            $this->settingsChanged = true;
        }
    }

    function onPreLoop()
    {
        if($this->settingsChanged){
            $this->displayWidget(null);
            $this->settingsChanged = false;
        }
    }


    public function displayWidget($login)
    {
        $widget = Gui\Widgets\WidgetAd::Create($login);


        $widget->setImage($this->config->text, $this->config->text);

        $widget->setPositionX($this->config->x);
        $widget->setPositionY($this->config->y);
        $widget->show();
    }

}
in news directory i have created other directory Gui/Widgets/WidgetAd

Code: Select all

<?php
/**
 * Created by PhpStorm.
 * User: chipo
 * Date: 02/08/14
 * Time: 12:42
 */

namespace ManiaLivePlugins\eXpansion\news\Gui\Widgets;


class WidgetAd extends \ManiaLivePlugins\eXpansion\Gui\Widgets\PlainWidget {

    protected $quad;

    protected function onConstruct() {
        parent::onConstruct();
        $this->quad = new \ManiaLib\Gui\Elements\Quad();
        $this->addComponent($this->quad);
    }

    public function setText( $text) {
        $this->quad->setText($text, true);

    }



}
i think a very big problem xD in my config , i noob in codage
(i have take your widgetsadevertissing codage for try my plugin

Re: eXpansion 0.9.7 @ nighty branch (26/7/2014)

Posted: 02 Aug 2014, 12:55
by oliverde8
hey :)

first of all your plugins doesen't go in the eXpansion folder, that is for eXpansion ;) you put in ManiaLivePlugins/chipo89/news.

And change all your namespaces to :

Code: Select all

namespace ManiaLivePlugins\chipo89 \news;
Ok that is not why it crashes :)

I didnt try but it probably crashes due to this :

Code: Select all

$this->quad->setText($text, true);
This creaets a manialink quad, manialink quads don't have text so it cant work. You need to create a label

Code: Select all

$this->label = new \ManiaLib\Gui\Elements\Label();
and then have

Code: Select all

$this->label ->setText($text, true);
the code becomes :

Code: Select all

<?php
/**
* Created by PhpStorm.
* User: chipo
* Date: 02/08/14
* Time: 12:42
*/

namespace ManiaLivePlugins\chipo89\news\Gui\Widgets;


class WidgetAd extends \ManiaLivePlugins\eXpansion\Gui\Widgets\PlainWidget {

    protected $label;

    protected function onConstruct() {
        parent::onConstruct();
        $this->label= new \ManiaLib\Gui\Elements\Quad();
        $this->addComponent($this->quad);
    }

    public function setText( $text) {
        $this->label->setText($text, true);

    }
}
Try and see how to use auto completation in your ide, when you do $this->label-> and then click CTRL+SPACE it should tell the methods you can call. This works nearly always when you do
$this->something = new just do CTRL+SPACE and it will help you find the class you want to initiate.