A few months ago, I began working on my first fully OC skin that shows the previous and next game for any football/soccer team. Unfortunately, I had to step away from it as university work piled on. Now that I'm finally on vacation, I'm back at work on this project, but I'm stuck trying to come up with a solution to this problem and I didn't find much help online.
Basically what I'm looking to do is to create a search box in my settings skin that will allow the user to select which team they want. I have a .txt file that contains the names of 10,000 teams along with the URL to their pages on the website I'm using. What I visualize is a search box where as you type in a few characters, you are shown a few suggested teams below. When you click on the team you want, the corresponding URL is assigned to a variable for use elsewhere.
My current thought process is to try to combine the InputText and WebParser plugins to do this. The InputText would take the characters from the user and assign it to a variable. The WebParser would look for, let's say, 5 instances of the value of this variable in the .txt file and return them as suggestions. When any of these are clicked, the corresponding URL is captured. However, immediately I've identified two limitations with this method:
- In order for the suggestions to show up, the user would have to first submit the characters they have already typed. If they want to add more characters, they would have to submit it once more for new suggestions.
- The suggestions would just be the first 5 instances of the entered characters and not the most relevant 5 instances.