Results 1 to 11 of 11

Thread: Sport - Team players

  1. #1
    User
    Join Date
    03-28-13.
    Location
    Bietigheim-Bissingen
    Posts
    55

    Default Sport - Team players

    Hi. I'm creating a site for a sport-team. We have 2 teams, men and women. I would need to add the players with some custom fields and I need a list page where I list the players, and a single page for the players. I searched a lot a plugin, or something, but nothing good. Somebody said that it could be done with the page members with some plugins (xtmembers_fieldeditor), but I don't want to mix the players in the members section, and I would need more images as custom fields for the players, but in this extension I don't see the possibility to add image.

    Does anybody have any idea how could I do this in a clean way, or the 'easiest' would be to create a small extension?
    Greetings!
    Last edited by zoltanseer; 08/12/2014 at 15:33. Reason: another question

  2. #2

    Default

    Hi ^^

    Can you give more details on the functions you want to create ?
    Exemple : The players can be members or you just want to add manually the players in team ? Players can subscribe to a team themselves ?

  3. #3
    User
    Join Date
    03-28-13.
    Location
    Bietigheim-Bissingen
    Posts
    55

    Default

    Hi.

    No extra function. Just to present the team. No player can subscribe him/herself, the admin/editor will create/add the players manually. Every player should have 2 images, some info fields (text-fields). Important for the team to be visible separate as men/women (team page) and every player should have a separate page (player page) where the infos are shown. Nothing more

    Thanks for your time!

  4. #4

    Default

    Quote Originally Posted by zoltanseer View Post
    Hi.

    No extra function. Just to present the team. No player can subscribe him/herself, the admin/editor will create/add the players manually. Every player should have 2 images, some info fields (text-fields). Important for the team to be visible separate as men/women (team page) and every player should have a separate page (player page) where the infos are shown. Nothing more

    Thanks for your time!
    Hum, I think create a entire module is the better thing to do.

    Two ways to create the module :

    You want only two teams, for a "oneused" module or You want to use this module again, with differents teams in the future.

    1st way :
    Create a module who contains fields :
    - id
    - tstamp
    - name (text)
    - alias (text - based on name field)
    - team (select with options "Men / Women")
    - image1
    - fields you want ...

    2st way :
    Create a module "Team" and a module "Player" (children of Team)

    Team Fields :
    - id
    - tstamp
    - name
    - alias

    Players Fields
    - id
    - tstamp
    - pid (ID of Team)
    - name
    - alias
    - image1
    - fields you want...


    For the two ways you have to create specific FrontEnd module. But you'll have all the design / fields you want, in the HTML you want.
    If you never have create a Contao module, I recommand you to read this blog : http://blog.qzminski.com/article/cre...he-basics.html

  5. #5
    User
    Join Date
    03-28-13.
    Location
    Bietigheim-Bissingen
    Posts
    55

    Default

    Hi Lupus,

    Thank you very much for your help and the usefull link. I chose the 2nd way, everything works awesome.

    Greetings!

  6. #6
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    If you like to have the great features of member management best will be to pimp the member BE module and not to write a new BE module.

    Therefore you can first use xtmembers_fieldeditor to create the extension that pimps members and then deinstall xtmembers_fieldeditor. Open and edit the files of the created extension and set up the fields as you like. https://contao.org/de/manual/3.3/dat....html#referenz

    Somewhere there will be a FE module "memberlist" that you can use to show members in FE.
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

  7. #7
    User
    Join Date
    03-28-13.
    Location
    Bietigheim-Bissingen
    Posts
    55

    Default

    Hi. Thanks Andreas for the tipp, maybe next time if I need to make something like this, I will try your idea. I like the idea of making a new module, becuase it gives pretty much freedom, but I think it's a bit overcomplicated for such an easy task.
    But i worked pretty much on it and it's nearly fully-functional Nearly, because I have one question:
    currently the team players are listed under root/team-man.html. I could do that if the url is root/team-man.html?player=john-doe than it will show the single page with John's infos. But i would like to rewrite the url, so that should work with root/team-man/john-doe or root/team-man/player/john-doe (which one is easier).

    Is there a solution for this in Contao or should be made in .htaccess? How?
    Thank you!
    Last edited by zoltanseer; 08/12/2014 at 23:49. Reason: visibility

  8. #8
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    There's a solution with Contao but I don't know how. It's done with every news, events and faq details page. And I think it's done with the listing module as there you can use a details page as well. And also with the member list module.
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

  9. #9

    Default

    I search how to have a free rewriting url in Contao since few days but I always block on one problem or another...

    If I find something, I'll write it here. (Probably tomorrow ^^)

  10. #10

    Default

    I FOUND IT !! \o/

    It's really easy...

    If you want an URL like : domain.com/player/player-alias.html
    You just get the variable "player-alias" by using :

    PHP Code:
    $playerAlias = \Input::get('auto_item'); 
    And that's all !

    PS : Just in case, in your system configuration, "Using auto_items" had to be checked =)

  11. #11
    User
    Join Date
    03-28-13.
    Location
    Bietigheim-Bissingen
    Posts
    55

    Default

    That's awesome. I will try it out. Thank you!!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •