Redirect URL autofills as the root site URL of the wordpress
install. Then I just put the oauth_redirect.php part on the end. In the
PS side, things will still have to be stored as the full, correct
redirect URL (not sure if there’s any better way to do this).
I made a bit of JS that pulls user down to the comment box, but I
left this out (commented it out, lines 26-29 of placespeak.js), since
it will run even if user may not want to comment
Made redirect with tag instead of PHP header - so that we can
put loading text or any kind of design we want onto the
oauth_redirect.php page (right now it’s just text that says “LOADING .
. .”
geo_labels. Turns out this was the “in the consultation or not” thing.
It’s tough to know how to store these, since it’s an array that
corresponds to a particular app key. I really don’t know if it’s best,
but I entered these in as arrays like “Canada, USA|Bellingham” - that
is, individual apps are separated by vertical bar |, array of labels
within an app are separated by commas , Not fully tested. On comments, the hidden input box returned by the JS includes only
the specific labels associated with that app. These same labels are
then saved into the comments (they can be parsed, checked for
false/true, listed, etc)
Also attached user_id to info put into comment meta - in case we
need to check this kind of thing later, it seems useful to do
On returning to map, I added text underneath it saying “Your
location is not inside the consultation area(s)”, or “Your location is
inside the consultation area(s) (here I list the geo_labels). This is just for user experience and to show off, but can be removed
I added a small checkbox that appears in a column called “PlaceSpeak
Verified” on the comments page, so Admins know if a comment has been
verified or not before they approve it
Sorry about ugly comments here.