Code Monkey home page Code Monkey logo

wordpress-plugin's People

Contributors

cferdinandi avatar lgomez avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wordpress-plugin's Issues

Search Feature

Wordpress includes a solid search feature that covers content and other data managed through wordpress. We are choosing to use shortcodes for most of our content injection which means content would be loaded into the front-end from our api dynamically. We haven't considered caching the content on wordpress but we would likely have to if we want to integrate with their search. Not the only option.

We need to discuss this further and define requirements (if any).

Fallback "Access not allowed" snippet OR page

If a user is not authenticated and should not be shown a particular page or block of content, we need to display an error message. Authentication is yet to be defined but the short codes (and potentially post types) should be able to handle this from the start.

Set up demo server

To run a live demo of the plugin we need to set up wordpress on the server and clone this repo into the appropriate installation directory.

Set up development server

As with the demo server, we need to set up the development server with wordpress and a clone of this repo.

Impossible to enable login to partner developers through portal without Engineering intervention.

As per conversations with engineering, neither oauth2 nor openid have been implemented in the API. Therefore the only way to facilitate auth from an external portal implementation is through SAML.

Furthermore, SAML auth is not turned on out-of-the-box and has to be enabled "manually". Quote:

Eng: https://mashery.jira.com/wiki/display/engineering/Single+Sign+On+(SSO)+at+Mashery
Eng: https://mashery.jira.com/wiki/display/engineering/Client+SAML+Authentication+Integration
Eng: Look at "Mashery as the Identity Provider". You have to modify this file: Integration_Saml_EndpointFactory_HardcodedSp for it to work. Adding your SP information as defined in "SP Properties". You will only be able to connect to an environment with a modified version of that file. For example, you cannot connect to production until changes to that file are pushed to prod.

Wiki support

We should have a conversation around this. Apparently it's a seldom used feature in our current implementation and some of us feel it should be deprecated.

In a WP implementation, customers could add this through a plugin so I feel more comfortable deprecating the functionality from our default portal.

File Management

Covered by Wordpress natively much better than anything we could implement in-house.

Forum Support

Again, something available through plugins. We would not implement this in-house.

Shortcode Discussion

If any of you go through the tickets or even the code, you'll notice we are using shortcodes for much of our integration. The primary reason being that shortcodes allow content editors to decide where exactly to inject the content. This gives them the freedom to decide on their site structure, to move content around and even surround injected content with their own content.

One drawback may be (and I'm not certain it is yet) searchability, indexability and other SEO-related issues. I doubt it.

There are other ways to inject content into wordpress (custom templates, post types, etc) but shortcodes seem to offer the most flexibility for the cases being considered so far.

Notes on on-boarding

@jpollock can you take notes if you get to try this this week? I'd like to make sure anyone can run it for later on when we start socializing it. If we do. Feel free to make notes here directly. Thanks!

Installation issue on npm run build

I already had node installed, so I tried a different installation process with more of a GUI driven mode.

  1. Download and install node from https://nodejs.org/
  2. Download and install Vagrant from https://www.vagrantup.com/
  3. Download and install Boot2Docker from http://boot2docker.io/
    VirtualBox was not required as a separate install, as it is installed with Boot2Docker

Then the installation steps I tried.

  1. Run Boot2Docker
  2. Set the variables from the Boot2Docker process...
To connect the Docker client to the Docker daemon, please set:
    export DOCKER_HOST=tcp://192.168.59.103:2376`
    export DOCKER_CERT_PATH=/Users/ehkim/.boot2docker/certs/boot2docker-vm
    export DOCKER_TLS_VERIFY=1
  1. Clone using HTTPS
    git clone https://github.com/lgomez/mashery-developer-portal
  2. Go to the directory
    cd mashery-developer-portal
  3. Try npm run build

I get the following error

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info prebuild [email protected]
6 info build [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec build script
9 verbose stack Error: [email protected] build: `docker build --rm -t mashery/developer-portal github.com/jbfink/docker-wordpress`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:14:12)
9 verbose stack     at ChildProcess.emit (events.js:110:17)
9 verbose stack     at maybeClose (child_process.js:1008:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
10 verbose pkgid [email protected]
11 verbose cwd /Users/ehkim/Documents/Mashery/_Temp/_DevPortalTest/mashery-developer-portal
12 error Darwin 14.1.0
13 error argv "node" "/usr/local/bin/npm" "run" "build"
14 error node v0.12.0
15 error npm  v2.5.1
16 error code ELIFECYCLE
17 error [email protected] build: `docker build --rm -t mashery/developer-portal github.com/jbfink/docker-wordpress`
17 error Exit status 1
18 error Failed at the [email protected] build script 'docker build --rm -t mashery/developer-portal github.com/jbfink/docker-wordpress'.
18 error This is most likely a problem with the developer-portal package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     docker build --rm -t mashery/developer-portal github.com/jbfink/docker-wordpress
18 error You can get their info via:
18 error     npm owner ls developer-portal
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

Support for a Contact Form

Support for his is required for any portal implementation. It is already available in wordpress through plugins. We can investigate and select one to be included in the default portal deployment or leave it up to customers to pick the plugin they prefer.

@cferdinandi mentioned JetPack as a possible solution.

Automated generation of default pages

As per our discussion, we would like to add a macro-like feature to let customers automatically generate a number of "recommended" pages easily. The pages will include:

  • Register
  • My Profile
  • My Keys
  • My Applications
  • Etc...

Theme admin to look like Control Center

Remove all traces of Wordpress branding and bring the admin theme as close as possible to Control Center's theme. Not in structure but in colors and anything reasonable.

Developer API Key Management

A developer should be able to manage their keys including creating new keys, editing existing keys and deleting keys.

Provide end-users with the ability to customize the markup around shortcode-embeded content

This is achieved by adding a textarea in the settings field where users can write their markup, and providing placeholders that get replaced with key pieces of content when the shortcode renders. Examples:

{{username}}
%field.username%

If custom markup is included, you do a find/replace for the placeholders. Otherwise, you render the default markup. You can see this in action in another plugin I manage: WordPress for Web Apps

To include a Mashery default theme or not?

I originally intended to work on a default Mashery Developer Portal theme and include it in this proof of concept. I've decided not to cover that here because there are plenty of very high-quality themes out there available for under $100. Many of those are already mobile-compatible and much better looking than anything I feel comfortable tackling within a reasonable amount of time.

It is my recommendation that we extend RFPs to a few good Wordpress theme designers and delegate this work. Specially considering we don't have in-house UI designers.

Ticketing functionality

I have no idea if this is used by our customers or not but it's another piece of functionality likely to be available through plugins. If not a simple plugin using the WP db I suspect there are plugins for Zendesk or similar services out there that we could use.

If someone can take some time to look at this, please do and follow up here.

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.