README
Hello my potentially befuddled visitor!
I know it might not be immediately obvious what this site does, but let me assure you that that means it's important.
Essentially, we've built a little tool that runs PHP code on the server at the press of the button (or maybe two presses). Right now there are two different functions, but there's no reason it won't be more in the future.
In a nutshell, this is what you're going to do here:
- Select an option from the drop-down list above.
- Read the description of the function that appears here.
- Press the button to run the code.
- Wait for like a minute.
- Success!
Reloading the page at any time to starts everything over.
Update Clubs in the Involvement Compass
We have all of the club data stored in WesternLink but getting it isn't the lighting-fast process I'd anticipated, so we're going to do it asyncronously.
Clicking the button gets the data from WesternLink, formats it, and updates the database that the Involvement Compass is using. This means that changes within WesternLink will eventually propogate, but not immediately. I think that should be fine.
Right now, this:
- Gets all of the data from westernlink.
- Encodes it to JSON.
- Inserts or updates both the Opportunities and the Categories.
- Makes sure Opportunites are related to the correct Categories.
- Prints a bad success message.
Can be used either to initially fill an empty database or update an existing one.
Note: It takes ~20 seconds to get a response, so just be patient.
Update Club Facebook pages for the calendar
It was just as the utopian dream of a harmonised USC-wide events calendar was slipping from our collective imaginations that visionary leader Patrick Whelan devised a scheme so entrepreneurial and innovative it would explode the head of the average Ivey HBA.
Clicking the button calls from WesternLink the data for ratified USC clubs and their respective Facebook pages, which are then be saved on our the server for easy event retrieval.
Right now, this:
- Gets all of the data from westernlink.
- Encodes it to JSON.
- Writes Facebook urls provided by clubs to a text file.
- Strike fear into the heart of entropy.
Note: It takes ~20 seconds to get a response, so just be patient.
Update a public-facing json file with up-to-date club info.
Same as the one above us except it's more common-sense.
We're storing the WesternLink JSON response exactly as we get it so that we know what do to with it at the other end. Less readable, but more useful for computers.
Pressing the button above currently does the following:
- Gets all of the data from westernlink.
- Encodes it to JSON.
- Updates a local JSON file with our sparkling new information so that we can more quickly populate the clubs list
Note: It takes ~20 seconds to get a response, so just be patient.