Manialinks using ManiaControl

ManiaControl, the completely new designed and easy to use controller managing all your Maniaplanet server.

Moderators: Wabbitface, Jocy, steeffeen, NADEO

Post Reply
User avatar
chco
Posts: 290
Joined: 24 Dec 2012, 09:11

Manialinks using ManiaControl

Post by chco »

Just been gone for two weeks and wanted to finish our plugin.
I dived back into the source for showing maniaexchange lists, but really without documentation I found it hard to get things done, I keep bumbing into stuff where I need to go through other pieces of code to figure out how it is implemented.
First wanted to use cells and such, but I was quickly at a loss there as well.
Is there someone in the team that knows all about ManiaLinks that can help a hand ?

Cheers,
Charly
Image
User avatar
steeffeen
Translator
Translator
Posts: 2463
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Manialinks using ManiaControl

Post by steeffeen »

the framework mainly used for manialinks has been announced in this thread:
http://forum.maniaplanet.com/viewtopic.php?t=26099

on the github page you can find many examples that should be clearer and easier to understand because they are only doing one thing at a time

regarding cells, complete tables, etc. there is something planned but i didn't have the time yet

is there anything special i can help you with?
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    User avatar
    chco
    Posts: 290
    Joined: 24 Dec 2012, 09:11

    Re: Manialinks using ManiaControl

    Post by chco »

    That is a good resource, gonna dive into that for now.
    Don't want to bother people if I don't need to ;)
    Image
    User avatar
    chco
    Posts: 290
    Joined: 24 Dec 2012, 09:11

    Re: Manialinks using ManiaControl

    Post by chco »

    ok, I do would like to know if this approach is the way to do it :

    The plugin show a small widget that can be clicked on to open a large manialink with a list of sounds that can be played.
    So ..
    1.

    Code: Select all

    public function load(ManiaControl $maniaControl)
    has a call to a private function called displayWidget.
    2. displayWidget creates a manialinkPageAnswerListener for the action when the widget is pressed to send it to a function called 'showSoundbox'.
    3. it then calls a function called displaySoundboxWidget, that actually creates the widget and sends it to

    Code: Select all

    $this->maniaControl->manialinkManager->sendManialink($maniaLink, $login);
    Here's where I'm not sure what to do .. Does the 'showSoundbox' function register another ManialinkPageAnswerListener or does it just shows the list of sounds and the closing is done from the Mainalink?

    I did have a look at the Paging examples from the link above you send and I would rather implement that, cause then I do not need to code the paging manually. Is it implemented ?

    Cheers,
    Charly
    Image
    User avatar
    steeffeen
    Translator
    Translator
    Posts: 2463
    Joined: 14 Oct 2012, 16:22
    Location: Germany

    Re: Manialinks using ManiaControl

    Post by steeffeen »

    chco wrote:1.

    Code: Select all

    public function load(ManiaControl $maniaControl)
    has a call to a private function called displayWidget.
    2. displayWidget creates a manialinkPageAnswerListener for the action when the widget is pressed to send it to a function called 'showSoundbox'.
    you should register for the manialink page answer on startup/load because that's a one-time action
    so putting that call into a function named 'showSoundbox' might lead to unnecessary registering later on

    chco wrote:3. it then calls a function called displaySoundboxWidget, that actually creates the widget and sends it to

    Code: Select all

    $this->maniaControl->manialinkManager->sendManialink($maniaLink, $login);
    Here's where I'm not sure what to do .. Does the 'showSoundbox' function register another ManialinkPageAnswerListener or does it just shows the list of sounds and the closing is done from the Mainalink?
    the sendManialink method does only the sending of the xml, nothing else
    if you need a closing behavior you different ways to do that
    the commin approach is to add a close button with an action for that you listen, when the user triggers the action by clicking on the button you send a new empty manialink with the same id which will overwrite and discard the old widget

    chco wrote:I did have a look at the Paging examples from the link above you send and I would rather implement that, cause then I do not need to code the paging manually. Is it implemented ?
    i don't really get your question, sorry ^^
    the examples work in maniacontrol as well, because the framework is used in the same state as on github
    so it should be quite easy to create a fancy paging while building the manialink without any further work of the controller
      Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

      ManiaControl, FancyManiaLinks
      User avatar
      chco
      Posts: 290
      Joined: 24 Dec 2012, 09:11

      Re: Manialinks using ManiaControl

      Post by chco »

      Thanks for the info!
      Had a chat with Kremsy last night as well.
      Gonna have a go at it now, see where I end up ;)

      Cheers Steeffeen!
      Image
      User avatar
      chco
      Posts: 290
      Joined: 24 Dec 2012, 09:11

      Re: Manialinks using ManiaControl

      Post by chco »

      Got this working finally. Thanks for the info Steeffeen and Kremsy for taking the time to help me out.
      Image
      Post Reply

      Return to “ManiaControl”

      Who is online

      Users browsing this forum: No registered users and 1 guest