...
 
Commits (2)
### 0.11.0
* added shortcode and dashboard widget to show last users
### 0.10.2
* fixed https://github.com/GuduleLapointe/w4os/issues/1 undefined constant. Thx djphil
* merged latest translations from https://git.magiiic.com/opensimulator/w4os-translations
......
......@@ -5,36 +5,42 @@ WordPress interface for OpenSimulator
## Description
The first ready to use WordPress interface for OpenSimulator. Provides user
registration and basic grid info. See enabled features below and ROADMAP file
for upcoming functionalties.
registration and basic grid info. See current Features below, and Roadmap
section in readme.txt for upcoming functionalties.
This README.md contains a brief introduction and information specific to the git
development version. Complimentary details in WordPress standard readme.txt
file.
## Features
* **Grid info**: `[gridinfo]` shortcode and admin dashboard widgets
* **Grid status**: `[gridstatus]` shortcode and admin dashboard widgets
* **Avatar creation**:
- **Grid info**: `[gridinfo]` shortcode and admin dashboard widgets
- **Grid status**: `[gridstatus]` shortcode and admin dashboard widgets
- **Avatar creation**:
- `[w4os_profile]` shortcode can be inserted in any page
- Avatar tab in account dashboard on WooCommerce websites
- Choose avatar look from default models
* Avatar and website passwords are synchronized
* **Reserved names**: avatar whose first name or last name is "Default",
- Avatar and website passwords are synchronized
- **Reserved names**: avatar whose first name or last name is "Default",
"Test", "Admin" or the pattern used for appearance models are disallowed for
public (such avatars must be created by admins from Robust console)
* **OpenSimulator settings page**:
- **OpenSimulator settings page**:
- grid name, login uri and database connection settings
- naming scheme of default models
- exclude models from grid stats
## Install from git repository
* Download the latest pagkage https://git.magiiic.com/opensimulator/w4os/-/archive/master/w4os-master.zip
* Unzip it, rename `w4os-master` as `w4os` and move it inside `wp-content/plugins/`
* Download the latest pagkage
https://git.magiiic.com/opensimulator/w4os/-/archive/master/w4os-master.zip
* Unzip it, rename `w4os-master` to `w4os`, move it inside `wp-content/plugins/`
* Activate from your plugins page
* Go to admin menu OpenSimulator > Settings to enter your grid details
To receive updates, install [GitHub Updater](https://github.com/afragen/github-updater)
(temporarily, if you get a PCLZIP_ERR_BAD_FORMAT error message, install their
develop branch instead of the stable release).
To receive updates, install
[GitHub Updater](https://github.com/afragen/github-updater)
(temporarily, if you get a PCLZIP_ERR_BAD_FORMAT error message, be sure to use
their develop branch instead of the master release).
## Contributing
......
......@@ -16,6 +16,11 @@ function w4os_dashboard_add_widgets() {
"OpenSimulator: " . __( 'Grid status', 'w4os' ),
'w4os_dashboard_widget_gridstatus_handler'
);
wp_add_dashboard_widget(
'w4os_dashboard_widget_newusers',
"OpenSimulator: " . __( 'New users', 'w4os' ),
'w4os_dashboard_widget_newusers_handler'
);
}
function w4os_dashboard_widget_gridstatus_handler() {
......@@ -25,3 +30,6 @@ function w4os_dashboard_widget_gridstatus_handler() {
function w4os_dashboard_widget_gridinfo_handler() {
print(w4os_gridinfo_shortcode(array("title"=>"")));
}
function w4os_dashboard_widget_newusers_handler() {
print(w4os_newusers());
}
......@@ -118,5 +118,33 @@ function w4os_shortcodes_init()
return $content . $result;
}
add_shortcode('gridstatus', 'w4os_gridstatus_shortcode');
function w4os_newusers_shortcode($atts = [], $content = null)
{
return w4os_newusers();
}
add_shortcode('w4os_newusers_shortcode', 'w4os_newusers');
}
add_action('init', 'w4os_shortcodes_init');
function w4os_newusers() {
if(! W4OS_DB_CONNECTED) {
return;
}
global $wpdb;
$recentusers = '<ul class="recently-user">';
$usernames = $wpdb->get_results("SELECT user_nicename, user_url, user_email FROM $wpdb->users ORDER BY ID DESC LIMIT 5");
foreach ($usernames as $username) {
$user = $wpdb->get_row($wpdb->prepare("select * from ".$wpdb->prefix."users where user_email = %s", $username->user_email));
$uuid = get_the_author_meta( 'w4os_uuid', $user->ID );
if($uuid) {
$recentusers .= '<li>' .get_avatar($username->user_email, 32) . "&nbsp;" . get_the_author_meta( 'w4os_firstname', $user->ID ) . " " . get_the_author_meta( 'w4os_lastname', $user->ID ) ."</a></li>";
} else if (!$username->user_url) {
$recentusers .= '<li>' .get_avatar($username->user_email, 32) . "&nbsp;" . $username->user_nicename." ($uuid)</a></li>";
} else {
$recentusers .= '<li>' .get_avatar($username->user_email, 32) . "&nbsp;" . '<a href="'.$username->user_url.'">'.$username->user_nicename."</a></li>";
}
}
$recentusers .= '</ul>';
return $recentusers;
}
......@@ -36,30 +36,32 @@ section for upcoming functionalties.
### Roadmap
#### short term (for 1.0 release)
#### Short term (version 1.0, WordPress repository release)
- Auth with avatar credential (as fallback to wp auth).
Create new WordPress user if auth by avatar
- option to use WordPress name as avatar name (in this case, lock WordPress
name changes once an avatar is set)
- Create avatar from standard wp-admin/profile.php page
- Check if avatar password is properly updated after a password reset request
- Auth with avatar credential (as fallback to wp auth)
* Create new WordPress user if auth by avatar
- integrate web asset server
- sidebar grid info and grid status widgets
#### middle term
#### Middle term
- User profile
- Start / Stop regions
- Create region from admin
- Admin Start / Stop regions
- Admin Create region
- Admin Use sim/grid configuration file to fetch settings if on the same host
- Helpers (assets, search, currency, map...)
- Use sim/grid configuration file to fetch settings if on the same host
- *Use cache for grid info*
- Use cache for grid info
#### long term
#### Long term
- Admin create users
- Admin create models (from current appearance)
- Choice between Robust console or database connection
- User own regions control (Create / Start / Stop / Backup)
- User's own regions control (create, start, stop, backup)
- WooCommerce Subscriptions integration for user-owned Regions or other pay-for services
## Frequently Asked Questions
......
......@@ -6,7 +6,7 @@
*
* Plugin Name: W4OS OpenSimulator Interface
* Description: WordPress interface for OpenSimulator.
* Version: 0.10.2
* Version: 0.11.0
* Author: Speculoos World
* Author URI: https://speculoos.world
* Plugin URI: https://git.magiiic.com/opensimulator/w4os
......