GithubHelp home page GithubHelp logo

community-portal's Introduction

Mozilla Community Portal

This repo will contain all the theme files for the new Mozilla community portal.

Setup Wordpress and Install the Theme

  • Keep in mind that when you’re serving the site, your server needs to be running at the root of the Wordpress install. The URL in the address bar when you view the site should not contain any sub-directories.
  • During development it’s recommended that you use a local URL.
    • NOTE: If you have Docker running you may need to quit it, as it may cause port conflicts with Local or your virtual host.
  • In a new directory, set up a fresh Wordpress install (wordpress.org)
  • Go to the Mozilla community portal repo, and clone or download the theme files. They need to go into the wp-content/themes directory of the Wordpress install you just created.
  • Navigate to this theme folder in your terminal, and run npm install to install dependencies.
  • Run npm run compile to compile the .scss files and generate a style.css file for the theme, to live update the styles run npm run watch.
  • Depending on how you are running Wordpress, you may need to create a new database for the site (or you can use the DB dump at the bottom of this readme).
  • Run the site in the browser. Depending on your set up, you may be lead through the typical Wordpress site setup.
  • Login to the site as an administrator, and go to appearance > themes and activate the Mozilla theme. It has no preview screenshot. ## Add the Theme Settings

Theme settings

Go to Mozilla Settings in the left sidebar to add the following settings.

Setting Value
Report Group / Event Email <Your email>
Github Link https://github.com/mozilla/community-portal
Community Portal Discourse
Mailchimp API Key <a test API key>
Company Mozilla
Address
City Toronto
State / Province
Postal / Zip
Country
Phone
Google Analytics ID
Discourse API Key
Discourse API URL
Discourse URL (only on production)
Mapbox Access Token
Default Open Graph Title Community Portal - Mozilla
Default Open Graph Description Community Portal - Mozilla
Max Image Filesize Upload (KB) 250
404 Error Title Page not Found
404 Error Copy Oops, we got lost!

Set up Theme Menus

  • Next set up the menus Appearance > Menus:
    • Create 4 new Menus with the followign items:
      • Main
        • Sign Up / Log Out (#)
        • Search (#)
      • Mozilla
        • About (#)
        • Mission (#)
        • Contact (#)
        • Donate (#)
      • Mozilla Main Menu
        • Campaigns (/campaigns)
        • Activities (/activities)
        • Events (/events)
        • Groups (/groups)
        • People (/people)
          • Assign this menu to the Display locations of ‘Mozilla Custom Theme Menu’
      • Resources
        • Code of Conduct (#)
        • Privacy Policy (#)
        • Creative License (#)
        • Legal Notices (#)

Sample data

This is MySQL dump with credentials as admin/password with admin rights and plugins configured (as this readme) with some example events as host community.test.

Install Plugins

Plugin patched

Events Manager require a patch as doesn't allow with a filter to change the Booking Cut off date, as we need that the last day to attend is the last event day (+1 months as we have people that forgot to mark their participation) this requires a patch to classes/em-events.php.

Changes to do with 6.3 release diff:

585a586
>               $this->event_rsvp_date = gmdate( 'Y-m-d', strtotime( '+1 months', strtotime( $this->event_end_date ) ) );
773a775
>               $this->event_rsvp_date = gmdate( 'Y-m-d', strtotime( '+1 months', strtotime( $this->event_end_date ) ) );
907a910
>                       $this->event_rsvp_date = gmdate( 'Y-m-d', strtotime( '+1 months', strtotime( $this->event_end_date ) ) );
1568a1572
>                               $this->event_rsvp_date = gmdate( 'Y-m-d', strtotime( '+1 months', strtotime( $this->event_end_date ) ) );
3104a3109
>                                               $event['event_rsvp_date'] = gmdate( 'Y-m-d', strtotime( '+1 months', strtotime( $event['event_end_date'] ) ) );

Support request: https://wordpress.org/support/topic/force-a-specific-event_rsvp_date-with-an-hook/, https://wordpress.org/support/topic/force-a-specific-event_rsvp_date-with-an-hook-again/

Create the required Pages

  • Before creating pages, activate BuddyPress. This will automatically create some pages, and reduce those you need to manually create
Page Name URL Slug Page Parent
Activate /activate n/a
Community Portal set to front page in Settings > Reading n/a
Events /events n/a
Categories /categories Events
Edit /edit Events
Locations /locations Events
My Bookings /my-bookings Events
Tags /tags Events
Groups /groups n/a
Members /people n/a
Register /register n/a

Settings

Auth0 Setup (only production)

  • Go to the Plugins page and activate the Auth0 plugin
  • In 1password there is a domain, client ID and client Secret in the secure note - configure the plugin with this information.

Setup BuddyPress

  • Activate BuddyPress if you have not already
  • Go to Plugins > BuddyPress > Settings
  • Components Tab
    • everything except ‘Site Tracking’ should be enabled
  • Options Tab
    • Set the template to ‘BuddyPress Legacy’
    • everything else here should be checked except for ‘Post Comments’
  • Pages Tab
    • Set Members -> Members
    • Set Activity Streams -> Activity
    • Set User Groups -> Groups

Setup ACF Pro (free version works)

  • Activate the plugin
  • Import the ACF fields
    • Go to Custom Fields > Tools
    • We’re going to import the field settings via a JSON import
    • In the theme files, there is a top-level directory called ACF, this contains JSON files with the info ACF needs to set up our fields
    • Under Import Field Groups choose the oldest file in this directory and import it.
    • Repeat this step for the remaining files, in chronological order.

Require various plugin settings and also to check the code about what is doing. The first step is required that you user accept the T&C or you cannot create events.

Dev instructions

Style rules enforcement

composer update # To download PHPCS
./vendor/bin/phpcs --standard=WordPress .
./vendor/bin/phpcbf --standard=WordPress .

Create a Dev Environment locally

Using VVV copy the file default-config.yml as config.yml in the same folder.
Next in the sites section in the YAML file add:

    community:
        repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template
        custom:
            delete_default_plugins: true
            install_plugins:
                - query-monitor
		- classic-editor
		- buddypress
		- events-manager
		- advanced-custom-fields
            wpconfig_constants:
                WP_DEBUG: true
                WP_DEBUG_LOG: wp-content/debug.log
                WP_DISABLE_FATAL_ERROR_HANDLER: true
        nginx_upstream: php73
        hosts:
            - community.test

Download the sample data above in this readme, put in the VVV/database/sql/backups/ folder as community.sql.gz.
Now you can launch in the terminal vagrant up (check the documentation to install VVV).
After running you will have a working dev environment with database and plugins configured.

community-portal's People

Contributors

couci avatar craigcook avatar dependabot[bot] avatar dnaluz avatar fiji-flo avatar jamieslome avatar jveens avatar kycapstick avatar michaelkohler avatar mte90 avatar slightlyoffbeat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

community-portal's Issues

Optional City field has no charcter limit

In the City (optional) field it is possible to enter a hefty amount of text, perhaps we should cap this.

Wikipedia tells me the longest place name is:

Krungthepmahanakhon Amonrattanakosin Mahintharayutthaya Mahadilokphop Noppharatratchathaniburirom Udomratchaniwetmahasathan Amonphimanawatansathit Sakkathattiyawitsanukamprasit (176 letters)
In Thailand.

So maybe 180 is a good maximum? What I have below is 798.

Screenshot 2019-11-27 at 11 14 05

Screenshot 2019-11-27 at 11 13 33

Wording around RSVP

@Lucyeoh I think regular people don't what "RSVP" mean and it's difficult or impossible to localize.

Can we suggest different wording?

I suggest "I will attend" or similar, that makes clear you sign-up for the event and plan to attend.

Shares not implemented

The following "Share" targets are not implemented yet and point to an internal URL:

  • Facebook
  • Discourse
  • Telegram

Screenshot 2019-11-25 at 22 01 42

Question about "Meetings" section of groups

I'm not sure I understand the purpose of the "Meetings" section on a groups' profile. Is this meant as a general description of the group? What if a group has different meeting venues?

Cookie consent confusion

Two things.
Can we underline the Privacy Policy and Cookie Policy links in the consent banner, currently they render exactly as the body copy:

Screenshot 2019-11-27 at 10 39 08

Lastly, are we expecting personalised advertising on here?
Regardless of whether I accept or close the banner, the same "gdrp" (should it be gdpr?) cookie appears, I'm going to assume this is to remember that the banner has been cancelled but no other cookie appears?

Screenshot 2019-11-27 at 10 36 37

email pre-filled as first name

When signing up the email gets pre-filled in the "First name" input field as well as the "contact" field. I think the first name input field should be left empty, as we most probably won't get a name back from auth0?

Login redirects to non-secure connection (http)

Today I tried to login and after the Auth0 screen I got redirected to http://mdmozdev.wpengine.com/ which I obviously didn't fill the information because it would travel through a non-secure connection.

Can we make sure that we never serve content and always redirect to https to avoid someone to use a non-secure channel?

Thanks!

Make tags on profile searchable/linkable

The tags on the profile are not linked. I think it would be nice if they were linked to the search so I can search for other members having a certain interest.

Not all cards receive hover/focus effect

On the homepage, when I mouse over the cards in "Events", each card receives a thicker grey border.

When I scroll down to "Featured Groups", there is no hover effect present when I mouse over the cards:

Untitled5

Renaming username leads to 404

I renamed my username and after clicking the save button, I got a 404. This is probably because this just does a refresh, and doesn't redirect to the URL including the new username.

Screenshot 2019-11-25 at 19 52 07

Going to the profile again by clicking my avatar on the top right led me to the right profile page again.

Groups: Why mandatory city/country for online groups?

Group location is asking for mandatory country and city:

What about country wide groups that don't need city?
What about groups based on language and multi country?
What about online works that don't need a specific location?

Skills and Interest: Adding more items in that Section

We can let the users add their own skills and interests as we are currently providing limited items.
Also, is it possible to segregate the skills and interests section? Both of there are different on reps portal, and they might expect the same here

Screenshot from reps portal profile:
Screen Shot 2019-11-28 at 6 25 56 PM

Skills and Interest Section:
Screen Shot 2019-11-28 at 6 22 36 PM

Tags, locations and languages should be linked to search

Each time we display a tag, location or a language, these should be linked to the corresponding search to see all occurrences.

  • All members speaking a language
  • All groups using the same tag
  • All groups in the same country
  • All groups in the same city
  • All events using the same tag
  • All events on the same initiative
  • All events in the same city
  • All events in the same country

Add custom pronoun to pronoun list

Currently there are only three choices for the pronoun list. I'm not sure what the best practice here is, but I'm sure that these 3 does not cover everyone. Should we add a custom field in case none of those fit?

Groups: Optional informations is marked with wildcard (*)

I was confused because in general fields with a wildcard (*) are mandatory in most site, and we are using that for optional fields.

Since most fields are optional we have a lot of * around. Is there a better way to signal required vs optional where there is not that noise and we are super clear on what's optional?

Link Member count to member tag content

The member count on the front page could be linked to the "Our members" tab content. At first I wasn't sure how to get to the members until I saw the tab.

Screenshot 2019-11-25 at 22 05 51

Events: Wording about "bookings"

Annonymous users are getting this wording from the events page:

"Please Log In to view your bookings."

I suspect we want something more like "Please Log In to create or join events"

Help

Getting started

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.