Coder Social home page Coder Social logo

whyjustrun / clubsite Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 4.0 8.41 MB

Platform for orienteering club communities

Home Page: http://www.whyjustrun.ca

PHP 96.07% Shell 0.04% CSS 0.52% JavaScript 1.52% HTML 1.82% Batchfile 0.03% Dockerfile 0.01%
orienteering

clubsite's Introduction

WhyJustRun Clubsite

Check out whyjustrun.ca for more information about this project.

Usage

The Clubsite depends on WhyJustRun Core, so first run it.

After Core is running, to start the Clubsite:

  1. Use the default configuration: cp .env.clubsite{.sample,}
  2. Start the containers: docker-compose up --build

You should be up and running. Head to localhost:3001.

Console

To start the CakePHP console, run docker-compose exec clubsite /application/app/Console/cake -app /application/app

Production

For production use, set WJR_CLUBSITE_ENV=production

In production mode, the app uses minified assets. In order to build them, run docker-compose exec clubsite /application/app/Console/minify.sh

Closed Source Components

We use Redactor as a rich text editor. However the source code can't be bundled with the project due to licensing restrictions. To test rich text editing related functionality, place redactor.min.js and redactor.css inside src/app/webroot/js/redactor.

clubsite's People

Contributors

russellporter avatar sgnewson avatar spidermelon avatar tnipen avatar xc-racer99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

clubsite's Issues

Password field on Login/Register page disappears upon focus in IE

When anyone using Internet Explorer attempts to login using a previously-created account, the password field disappears as soon as it is clicked on or brought into focus with the Tab key. The only way to log back in (without using a better browser or doing something technical) is to invoke forgotten password recovery.

This is a pretty serious problem as it discourages online event registration by a large percentage of web users.

I investigated the problem myself and found that it involves the jquery.placeholder and cakebootstrap scripts:

jquery.placeholder is used to make placeholder text automatically appear and disappear within IE. (Other browsers have built-in support for placeholder text so jquery.placeholder doesn't do anything in these browsers.) Implementing placeholder text is particularly complicated for password fields because placeholder text such as "Password" shouldn't appear as a bunch of black circles. To implement placeholder text for password fields, the jquery.placeholder script creates a second textbox and automatically hides/shows the textboxes as appropriate. This works as long as the two textboxes stay within the same div.

The cakebootstrap script (used to make things prettier) automatically wraps all non-label controls contained in input-class divs within controls-class divs with the code $('div.input').children(':not(label)').wrap('

');. When this script runs after the jquery.placeholder script, it separates the real password textbox (the one with the black circles, initially hidden by jquery.placeholder) from the placeholder password textbox. Thus, when the placeholder password textbox receives focus, it is automatically hidden (as it is supposed to be), but the real textbox can't be found and doesn't appear in its place.

I think you can fix the problem by making sure the cakebootstrap script runs before the wjr script (which contains the code $('input, textarea').placeholder();, which initializes placeholders in IE). However, I don't know if this will mess up anything else as I have very little experience with web development.

Please fix this problem.

Thank you,

Thomas Graupner
Manitoba Orienteering Association

Problems adding courses in event editor

I'm trying to add a few of our older events to the website so people can have a completer history of their runs. For some reason it is not accepting the courses: 5K - W Open and 5K - M Open. They are there when I add the course but go blank when I save the event. When I try to add a competitor, I need to select a course and nothing shows on the drop down list but there are two blank spots. I select one of those and I'm able to add a competitor but when I save the event, showing results, no results show up.

It is Safari5.17 for the Mc. I just tried it with Chrome and it seems to be working ok, although I sometime still end up with duplicate entries in my results list so I have to delete the duplicate.

Various edit requests get "black-holed"

I've got a couple of problems with editing events and maps:

=== Problem 1 ===

If a user running Internet Explorer tries to edit an event or a map, they get an error page with a message like the following when they click the Save button:

The request has been black-holed
Error: The requested address '/events/edit/819' was not found on this server.

The error happens regardless of whether any fields were changed.

This is a problem to me because I'm trying to get club members to be responsible for editing their own event pages. I don't want my instructions to begin with "First of all, don't use Internet Explorer..."

=== Problem 2 ===

If a user running Internet Explorer, Firefox, or Chrome (or probably any other browser) tries to change the location of a map, their request gets black-holed.

This is a problem because I can't seem to change map locations - at all.

With Firefox and Chrome, the error occurs only if the map location marker is dragged. Using Wireshark, I can see that the edit requests for saving a map with and without dragging the marker are the same, except for the latitude and longitude fields sent back. If the coordinates are unchanged, I get an HTTP 302 (Found) response redirecting to the view page. If they are different, I get an HTTP 400 (Bad Request) response containing the "black-holed" error page.

I think problem 2 is pretty basic, because it looks like the following test in MapsController.php is failing:

136: if ($this->Map->save($this->data)) {
137: $this->Session->setFlash('The map has been updated.', "flash_success");

I haven't investigated problem 1 to any length yet.

If I remember correctly, both of these problems started a number of weeks/months ago, but not necessarily at the same time.

Remove allowance for multiple accounts with same email

This will allow us to:

  • Make it easier for people to log in (no need to remember another username)
  • Remove hacks that are making authentication code a bit difficult to replace with a library

Here's the plan:

  1. Add ability to register other people (working on that now)
  2. SELECT * FROM users INNER JOIN (SELECT email FROM users GROUP BY email HAVING count(email) > 1) dup ON users.email = dup.email. Yields 172 accounts with duplicate emails.
  3. Do some fancy JOINs to figure out how many events each person has registered in, and maintain the most active account for each email. If the other people have participated in more than 1 event, send them an email explaining the change, that they will now have to log in as "whoever" and register the other person for the event or create a "new" account on WhyJustRun with a different email.
  4. Once all duplicates removed, make email column unique, let people log in with email address instead of username, remove username from registration field.
  5. Move authentication to Rails.
  6. Log in with Google/Facebook/OpenID!!!

Showing all nation-wide events for Dave G.

A panel showing all events by each club should be available from the admin panel (only to administrators). This will use parse the IOF XML from our API.

Nevermind, the CSV on the oc.whyjustrun.ca should do this.

Facebook integration

I think it would be great for engagement/promotion to offer deeper Facebook integration.

Primarily thinking about how OpenGraph can be incorporated. Also would be cool if people could post their race results to their timeline, post that they are participating in an event, etc. I think OG will make it easy to do this.

Also, would like to offer the ability to auth with FB. Makes for one (zero?) click login to WJR, no password required.

Rich text editor

Markdown is nice but not so noob friendly.. I see lots of nice Bootstrap based rich text editors around, we could probably use one of them.

Remove allowance for multiple accounts with same email

This will allow us to:

  • Make it easier for people to log in (no need to remember another username)
  • Remove hacks that are making authentication code a bit difficult to replace with a library

Here's the plan:

Add ability to register other people (working on that now)
1.

SELECT *, (SELECT COUNT(*) FROM results WHERE user_id = users.id) AS count FROM users
INNER JOIN (SELECT email FROM users
GROUP BY email HAVING count(email) > 1) dup ON users.email = dup.email ORDER BY users.email

Yields 149 accounts with duplicate emails.

Do some fancy JOINs to figure out how many events each person has registered in, and maintain the most active account for each email. If the other people have participated in more than 1 event, send them an email explaining the change, that they will now have to log in as "whoever" and register the other person for the event or create a "new" account on WhyJustRun with a different email.
1.

Once all duplicates removed, make email column unique, let people log in with email address instead of username, remove username from registration field.
1.

Move authentication to Rails.
1.

Log in with Google/Facebook/OpenID!!!

Duplicate results after saving

Scott Sheldrake reported this issue. It occurs quite frequently for some people, probably a browser specific issue. If anyone has repro steps, post here! Otherwise I'll ask Scott when I get around to it.

Event list

Simple event listing. Scott Sheldrake said he might work on a Javascript implementation that uses the XML API.

OCAD map upload without version control

For clubs not using the OABC SVN repository, we should allow the club exec/webmaster to just provide a link to their map file. This should be a config flag on the club, whether or not they are part of the SVN repo.

Event list view

There should be a list view of all events in the calendar (similar to the view showing the list of maps). But maybe Adrian's calendar interface will provide this.

Events with custom_url not accessible from calendar

Events with a custom_url cannot be edited, since they are automatically linked to their external URL in the calendar.

Clubs not using the WJR website probably want their events in the calendar to link to their external URL. However, clubs using the WJR website probably want the event to first link to the page on WJR, with the external URL appearing on this page.

More info on the profile page

Also, when we look at a person's historical results it shows their time but it doesn't show the actual course they were on. so, for example, Danielle Burki, may have a time but it doesn't show if she was on the 5K men or women's course, which were options.

Events without series_id

Events without a series_id do not show up well in the calendar. Their background colour and text colours are both white.

Allow registering other people for events

Families frequently must register several people for events at the same time. It is inconvenient for them to have to login with different accounts. A solution is to use the same code in the "post results" page to add people to the event registration page.

Customizable club default tag

Currently the default tag for flickr photos is the lowercase club acronym. However, for KOC, some unrelevant photos are showing up. Should be able to use kootenay orienteering club instead there.

Remove transitional log in code

Because the old database had those crazy truncated passwords, we had some hacks to make it all work on the new site. We should get rid of those now.

Lists need some sorting love

We have a lot of lists (registration lists, organizer lists, results list on profile page) that aren't sorted right now but should be.

Merging user accounts

Create an admin page for merging (manually and automatically) duplicate user accounts, by reassigning the user_id for results and organizers.

Retina Display Support

This is obviously the future, so I'm going to start working on it, esp since I just got the Retina Macbook Pro :)

Some stuff todo:

Generate @2x res graphics for everything
Switch to using an icon font with Bootstrap so it scales nicely for any screen resolution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.