Git Product home page Git Product logo

shawnclake / userextended Goto Github PK

View Code? Open in Web Editor NEW
23.0 9.0 12.0 712 KB

An extension to the existing RainLab.User plugin for OctoberCMS

Home Page: http://octobercms.com/plugin/clake-userextended

License: GNU General Public License v3.0

PHP 70.23% HTML 26.39% CSS 0.53% JavaScript 2.85%
friends demotion group-hierarchy users-timezone rainlab octobercms octobercms-plugin profiles friend-requests promotion

userextended's Issues

Add better feedback when errors occur

Many errors can occur and currently do not return any feedback.

Add feedback to situations which can occur in:

  • Registration
  • Logging in
  • Logging out
  • Roles/Groups updating, creating
  • Profile visibility
  • Commenting
  • Setting changing

Add Documentation

Add documentation for:

  • User Settings
  • Timezonable
  • Searchable
  • The plugin in general
  • Components: Account, Friends, Users

Add templated profile pages

Add templated profile pages which can be chosen via an added dropdown in the User component inspector.

Template examples:

  • Business
  • Portfolio
  • User
  • About (Staff Member)

Switch friend states to use a bin 2^n pattern

Switch friend states to use a 2^n state. This can then be converted to a binary string. For example if following = 2, friended = 4, and subscribed = 8, then we can store the number 14 which translates to binary as: 1110. Thus we can see the 3 1's correlate to our friend states. Now we can store multiple user relations rather than just 1.

Create email templates and utilize them

Create & use email templates during the following events:

  • Register
  • Received friend request
  • Received profile comment
  • On group or role changed/added/removed

Move core functions into the core module

Move core functions into the core module to reduce the 'built-in' feel of the current features.

Move:

  • More or less transfer all of the User Util functions into the core module.
  • Component and navigation registrations

Add:

  • Ability to create,delete user
  • Ability to programatically change a users role/group
  • Ability to render user settings

More to come soon

Create an extension class with overidable functions for registering and accessing other modules

The extension class (Called 'UserExtended') should be capable of:

  • Defining a name, description, author, and other meta data for a module
  • Defining an accessible flag for whether or not other modules should be able to interact with this module
  • Defining a way of injecting more components, navigation, and lang into UserExtended rather than creating separate sections for all. This will require a DB table.
  • Calling contracted functions from other modules via syntax: 'UserExtended::{moduleName}()->{functionName}(array params);
    * This can be used to programatically utilize a blog,thread,commenting system from another module without digging into their code. Just check their contracted functions.
    * This requires other module developers to create useful contracted functions such as a Forum module with the contracted function 'getUsersActivity()' which would return all of a users activity. Utilized like this: UserExtended::Forum()->getUsersActivity()
  • Implemented as a service provider
  • Functions to determine whether modules are installed and their versions.

Best usage practices:

  • Module name is formatted as {author}{ModuleName}. For example if my author name was dingle and I had a module named dongle, the extensible module name would be dingleDongle.

Add soft deletes and timestamps to UsersGroups

Add soft deletes, created_at, updated_at, and deleted_at to UsersGroups.

Utilize this when removing a user from a group. Also utilize this information in Role Manager to display when a user was added to a role via 'updated_at' as well as a users group history by utilizing soft delete time stamps.

Create a status widget

Display stats such as:

  • Users registered
  • Currently active users
  • Inactive users
  • Newest user sign up
  • Tips/tricks

Add UserExtended settings

Add a backend settings tab including:

  • Validation rules for username/password
  • Profiles feature (on/off)
  • Friends feature (on/off)
  • Groups/Roles feature (on/off)

Add exceptions to User Extended

Throw exceptions at key points in the operation of UserExtended.

Key points which can't fail (but not limited to):

  • Module registration
  • User registration
  • User login

Add Generic User Settings

Add features:

  • Config based settings template
  • A JSON column on the user table for settings
  • Hook into register, update for Accounts

Add a backend sub page (A child [submenu] of the users tab) for managing modules.

The backend page will be called 'Module Manager' and contains the following features:

  • Enable/Disable a module
  • Display version and other module meta data.
  • Locking a modules version. This will disable the module if it updates.
  • Viewing module documentation [how-to] [overview] etc.
  • Enable/Disable specific injects for each module. On/off switch for each injection type. Defaults: true.

This will also require the creation of a module_manager table for storing the settings above.

Database Migration Fails during installation

I get the following error while installing the plugin

"SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key (SQL: alter table `users_groups` drop primary key)" 

Add Lang support

Add lang support across the plugin.

In order of priority:

  • Components
  • Controllers
  • Classes
  • Models
  • Everything else

Have a problem with clake userextended and last october release 3.9.6

Hi,

i've installed this usefull plugin on my local machine with vagrant environment.
But when i click on Role Manager have this error:

syntax error, unexpected 'for' (T_FOR) ../plugins/clake/userextended/controllers/roles.php line 57
The line:
$groupRoles = RoleManager::for($this->vars['selectedGroup']->code);

Bye
gab

Add better lang support

Add lang support for role/group names/descriptions etc. Utilize a lang importer by creating a separate backend page for creating and using lang.

More to come soon.

Add logging of events

Log actions of events thrown by UserExtended.

These include, but aren't limited to:

  • Account changes
  • Registration
  • Login
  • Logout
  • Backend group/role/user management. (Promotions, demotions, added to role/group etc.)
  • When a user blocks or deletes another

Feature Push Back List

Pushed back features:

  • User list pagination in the backend->RoleManager
  • General plugin documentation #12
  • Component usage examples documentation #25
  • Finishing off the plugin settings implementation. Its really only half baked so far. #13
  • Split long unwieldy code into proper functions without changing any functionality.
  • Many of the classes are too loose. Improve encapsulation by utilizing private/protected where possible. #16
  • Prepare the plugin for unit testing #17
  • Add event hooks #18
  • Add a method of setting a default role for each group for when users are added to a group. #71
  • Add a method of adding users to a group other than going to the user backend and checking off their check boxes. #71
  • Use Lang #71
  • Also, on user create, add a tab to create user settings which are marked as createable. #31
  • Make injected bond states effect the application. #37
  • Add permission nodes for accessing and managing backend model interfaces. #81
  • Use Soft deletes when removing a user from a group. #34

The code has already been taken

Looks like this plugin has some issues as after installing it, it does not let you do anything with OCMS.
Can not install plugin, could not login or anything just throws error
"The code has already been taken"

Complete Roles

Add additional features:

  • Create groups
  • Edit group
  • Add users to role
  • Add users to group
  • Add user promotion/demotion
  • User list pagination

Cleanup the controller code.

Drop UsersGroups table on uninstall and recreate it

Attempt to fix that primary key issue by removing the UsersGroups table and recreating it as default on uninstall.

Remember, we can't just create our own table because then Rainlab.Users won't know what to do.

Create a user analytics backend page

This would also link from the role manager.

This would display stats such as:

  • Users registered
  • Currently active users
  • Inactive users
  • Newest user sign up
  • Tips/tricks.
  • User timezone and location stats.
  • Most and least used roles/groups

Provide suggestions for cleaning up old users, inactive users, inactive groups/roles.

Consolidate Friends

Combine components

  • ListFriendRequests
  • ListFriends

into the component:

  • Friends

Add additional features:

  • Add friend
  • Delete friend
  • View friend (profile?)
  • Block user

Allow other modules to inject user_settings.yaml

Add an injectUserSettings function which will import and merge another module's user_settings.yaml if it returns true. Get an array of all config options and then throw them into a merge rather than trying to merge the files.

** This must be able to be turned off on a per-module basis inside of the Module Manager page in the backend **

Add support for Clake.Pusher

Add support for Clake.Pusher by adding a module to the pusher plugin.

From user extended we can detect whether or not pusher is loaded as a module and if it is, utilize it to send real time notifications.

Add event hooks in classes, models and components.

Add event hooks to:

Components

Account
  • Pre Registration
  • Logging in
  • Logging out
  • Settings load
  • Settings update
  • Post registration
Friends
  • Add friend
  • Block friend
  • Remove friend
  • Send friend request
  • Accept friend request
  • Decline friend request
  • Remove friend
User
  • Profile viewed
  • Comment posted
  • Comment deleted
  • Post search
  • Pre search
  • Pre profile view

Models

Roles
  • On role removed
  • On role added

Classes

Role Manager
  • On promote
  • On demote
  • On set role

More complete list coming soon.

Consolidate User

Combine components:

  • UserGroups
  • UserList
  • UserSearch
  • UserUI

into component:

  • User

Add additional features:

  • List a single user by ID

Create a Scaffolding command for modules

Create a scaffolding command in artisan in order to create UserExtended module classes.

Syntax:

  • php artisan create:uemodule clake.userextended

This creates a UeModule.php class in the plugins home directory. It will also set the module $name property to clakeUserextended.

It will auto generate the following:

  • Class definition
  • Properties: name, author, description, version
  • Injections: injectComponents, injectNavigation, injectLang
  • Trait: use StaticFactoryTrait;
  • Use and Namespace if possible.

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.