Almost There With Adding New Fields
-
This is a great plug-in, and I’ve been looking for something that will do this for years.
My website is a soccer team site, and I want an extremely customized player page, in that I want to have a statistics table included that has regular season, cup competition, tournament, and total season statistic lines, plus the year that the player joined the club, and some other things. That’s too may columns to use your existing structure, so I set about trying to make a new field. If it works, I figured I could make several new fields with the same methodology, so I can make my page.
To try what I’m wanting to do, I’ve re-coded the content-single-player.php and mtsw_team-rosters.php, so I have my new column name in the code. To do that, I edited “position” so that it’s now called “dposition” throughout the code in both .php files and in my excel file).
When I import the csv, all of the standard fields import as expected, e.g.:
retval = 1 ID: 1258 K: _mstw_tr_number V: 0
retval = 1 ID: 1258 K: _mstw_tr_last_name V: Lastname
retval = 1 ID: 1258 K: _mstw_tr_first_name V: Stephen
retval = 1 ID: 1258 K: _mstw_tr_position V: GK
BUT the “dposition” import (i.e., my customized column), imports as:
retval = 20517 ID: 1258 K: dposition V: 0
The 20517 ID is a uniqure number, and when I import again, I get a higher ID (e.g., 20518 ID). Also, the _mstw_tr_ is missing from in front of dposition.
Any pointers on where I need to focus to make the non-standard category come in with the same type of format as the standard ones? Even if it takes some more coding, telling me where to focus would help a ton. I am self-taught, and struggling with this. I think I’ll eventually figure it out, but I’m losing sleep on this one!
My website, which is under construction, is https://www.furyfc.com/blog/, but I don’t know that that helps you to see anything.
If I get this to work, I have the template nicely skinned and would love to show off my work. Thanks!!!
- The topic ‘Almost There With Adding New Fields’ is closed to new replies.