topleft topright

Closed Thread
Results 1 to 14 of 14
  1. #1
    That Guy Array Craig's Avatar
    Join Date
    Dec 1999
    Location
    Atlanta, GA
    Posts
    6,263
    Blog Entries
    18

    Fencing Tournaments from AskFRED

    Check out the Fencing.Net integration at:
    http://www.fencing101.com/component/...red/Itemid,90/

    Thanks Peet!

    Craig

  2. #2
    Senior Member Array fencinman89's Avatar
    Join Date
    Oct 2003
    Location
    pennsylvania, Philly division
    Posts
    421
    I tried it, it didnt work for me, possibly i did it wrong.
    -Tre'
    Ref-"Pool 1: Molly"
    Me-"It's Molloy, with an OY"

  3. #3
    Senior Member Array Peach's Avatar
    Join Date
    Feb 2001
    Location
    Pennsylvania
    Posts
    5,766
    Blog Entries
    1041
    I get:

    Warning: Invalid argument supplied for foreach() in /home/charkins/public_html/components/com_fred/fred.html.php on line 98

    I'm using Mozilla Firefox
    "Arm yourself, Watson, there is an evil hand afoot ahead." -- Dennis Pierce, 2010 Bulwer-Lytton contest, detective fiction category runner-up.

  4. #4
    Senior Member Array Chafunkta's Avatar
    Join Date
    May 2005
    Location
    The Driftwood Bar, Louisiana
    Posts
    508
    It worked for me. It's pretty cool. What about tournament results being applied to specific users? Like looking up someone's handle and finding some tournament results?
    Just push the button!

  5. #5
    Fencing Expert Array veeco's Avatar
    Join Date
    May 2000
    Location
    The valley of the -hot- sun, NorCal
    Posts
    3,184
    It works also for me (with Firefox on Linux). Pretty cool.
    • Epee is the Louis Vuitton bag of fencing: only the best can get it, and the rest of the masses must content themselves with cheap knockoffs (sabre, foil)
    • To not recognize the power of the French grip is to be in denial

  6. #6
    Just Joined Array socoach's Avatar
    Join Date
    May 2005
    Location
    Elsewhere
    Posts
    5
    Quote Originally Posted by Peach
    Warning: Invalid argument supplied for foreach() in /home/charkins/public_html/components/com_fred/fred.html.php on line 98
    Same thing here... it depends on the selection the user makes. If there are NULL results, the php will give a warning. Here a non-array (e.g., empty var) was used in a foreach().

    I found my error with these settings: Upcoming Tournaments, SouthEast Section, Ark-La-Miss.

    It's not always necessary to test if an array has members before using foreach(). You can cast the var as an array, so that even if it is empty it will run without warnings.
    Code:
    foreach ((array)$some_array as $k=>$v) { ... }
    The functionality looks very cool!

  7. #7
    Senior Member Array peet's Avatar
    Join Date
    Jan 2003
    Location
    San Francisco
    Posts
    2,187

    Uh-oh....

    Umm, hey Craig-

    Maybe i didn't make it clear enough in my email, but i sent you that code meaning for you to test it, not neccessarily publicize it just yet. It is missing some error handling, and a "none found" case for when no tournaments are found, as some people have found out the hard way.

    Some of the output could use some prettying up too.

    Again, sorry if my email was not clear.

    I'll keep working on it....

    -p

  8. #8
    Senior Member Array peet's Avatar
    Join Date
    Jan 2003
    Location
    San Francisco
    Posts
    2,187
    Quote Originally Posted by Chafunkta
    It worked for me. It's pretty cool. What about tournament results being applied to specific users? Like looking up someone's handle and finding some tournament results?
    We might get to that kind of thing in time.

    Craig & I are working on integrating FRED & F101 bit by bit. First the obvious stuff like these tournament listings, and then we'll see what comes next.

    Thanks for the suggestion!

    -p

  9. #9
    Senior Member Array oso97's Avatar
    Join Date
    Jul 2004
    Posts
    3,904
    Quote Originally Posted by socoach
    Same thing here... it depends on the selection the user makes. If there are NULL results, the php will give a warning. Here a non-array (e.g., empty var) was used in a foreach().

    I found my error with these settings: Upcoming Tournaments, SouthEast Section, Ark-La-Miss.

    It's not always necessary to test if an array has members before using foreach(). You can cast the var as an array, so that even if it is empty it will run without warnings.
    Code:
    foreach ((array)$some_array as $k=>$v) { ... }
    The functionality looks very cool!
    Well, first of all, Ark-La-Miss Division is in the SouthWEST Section...

  10. #10
    Senior Member Array peet's Avatar
    Join Date
    Jan 2003
    Location
    San Francisco
    Posts
    2,187
    Quote Originally Posted by oso97
    Well, first of all, Ark-La-Miss Division is in the SouthWEST Section...
    Hence that little note about "you probably want to search by section OR division, but not both", as the criteria are being combined with AND logic.....

    cheers!

    -p

  11. #11
    Senior Member Array oso97's Avatar
    Join Date
    Jul 2004
    Posts
    3,904
    Makes sense to me, I was just pointing it out to the original poster that his geography was a little off Hey, I've never had any problems with searches on FRED...

  12. #12
    Just Joined Array socoach's Avatar
    Join Date
    May 2005
    Location
    Elsewhere
    Posts
    5

    Whups!

    Quote Originally Posted by oso97
    Makes sense to me, I was just pointing it out to the original poster that his geography was a little off
    Clearly this feature hasn't been idiot-proofed. Someone could've died!!!

  13. #13
    Senior Member Array peet's Avatar
    Join Date
    Jan 2003
    Location
    San Francisco
    Posts
    2,187
    Quote Originally Posted by socoach
    Clearly this feature hasn't been idiot-proofed. Someone could've died!!!
    LOL!

    Yeah, good thing i don't actually work on anything life sustaining. I'd be killing people left & right!!

    -p

  14. #14
    That Guy Array Craig's Avatar
    Join Date
    Dec 1999
    Location
    Atlanta, GA
    Posts
    6,263
    Blog Entries
    18
    Sorry Peet.

    Pulling the code based on the error messages found. Once we're both comfortable with the code and an error-free base, we'll try again.

    Craig

    Quote Originally Posted by peet
    Umm, hey Craig-

    Maybe i didn't make it clear enough in my email, but i sent you that code meaning for you to test it, not neccessarily publicize it just yet. It is missing some error handling, and a "none found" case for when no tournaments are found, as some people have found out the hard way.

    Some of the output could use some prettying up too.

    Again, sorry if my email was not clear.

    I'll keep working on it....

    -p

Similar Threads

  1. Fencing FAQ (part 3)
    By Morgan Burke in forum Rec Sport Fencing
    Replies: 2
    Last Post: 03-20-2011, 10:45 AM
  2. Fencing FAQ (part 1)
    By Morgan Burke in forum Rec Sport Fencing
    Replies: 2
    Last Post: 08-26-2005, 03:00 AM
  3. Fencing FAQ (part 1)
    By Morgan Burke in forum Fencing Discussion
    Replies: 0
    Last Post: 03-10-2003, 10:33 AM
  4. Fencing FAQ (part 1)
    By Morgan Burke in forum Fencing Discussion
    Replies: 0
    Last Post: 03-10-2003, 10:31 AM
  5. Fencing FAQ (part 3)
    By Morgan Burke in forum Fencing Discussion
    Replies: 0
    Last Post: 03-10-2003, 10:31 AM

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30