1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom user fields.

Discussion in 'XenForo Development Discussions' started by Hecter, Oct 17, 2016.

  1. Hecter

    Hecter Member

    I have developed my own system which takes stats directly from the EA sports website for the game mode FIFA which pulls stats onto my site for teams signed upto my site, these stats range from goals, clean sheets, assists, games played, passing percentage or teams, players just an extensive list.

    I'm wondering how I can pull these stats into custom user fields, I'm assuming as its written into xenforo I can just do a php call back? But I'm having a little trouble understanding and was wondering if someone could perhaps help me with the first one just so I don't ruin it.

    I can't find any examples so I'm wondering exactly what is it I need to call back on, the xenforo template or the actual php file within the library.

    I'm assuming its something like this?

    Where I have a php file in library/YFL/Rivals/ControllerPublic/Rivals.php and the code is as follows:


    case 'attacker':
    $fields = array("played", "shots", "mom", "shots_per_game", "goals_per_game", "assists", "goals", "rating");
    $orderBy = 'goals';

    php callback: YFL_Rivals_ControllerPublic_Rivals
    method: goals

    Or am I completely getting this wrong?
     
    Last edited: Oct 17, 2016
  2. Hecter

    Hecter Member

    I tried this, the call back is correct I believe but the method is wrong, its that part I'm stuck at.
     
  3. Hecter

    Hecter Member

    Or is it possible to create custom fields from the mySQL database?
     

Share This Page