GetSimple Support Forum

Full Version: Centralized Users (CUsers)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Wikipedia Wrote:...Being restricting to the niche of small-business-sites, GetSimple is not considered to be suitable for sites demanding a lot of user interaction and ongoing content updates...

My aim is to make a change to this with a batch of plugins that focus specifically on integrating a user base with one's existing GetSimple site.

Centralised Users (or CUsers) was designed using n00dles001's excellent DM Matrix XML Database plugin. When installed and set up, users can:

  • Register accounts
  • Edit their profile details
  • Reset their passwords if they've forgotten their login details
As the admin of a GetSimple site, you will be able to define members-only and guests only content for areas of your site, be they the sidebar or the main content. The primary benefit of CUsers however (and the reason for the 'C') is that users will only need that one signin to use any of the CU services that you install. You get to have a 'centralised' user base: one that doesn't rely on externally hosted services to supply certain needs (e.g. forum software, an externally hosted shoutbox or comments system). One login does it all, and it starts with CUsers.


----------


NOTE: THE BELOW INFORMATION IS FOR THE OLD VERSION OF CUSERS. Go to this post to see the new version.


----------

Setup
  1. Download DM Matrix and unzip its files to the /plugins folder
  2. Download Centralised Users and unzip its files to the /plugins folder
  3. While logged in to GS, go to Plugins -> Centralised Users
  4. Click on SETUP and it will go through the setup process:
    -> Creating the tables (CU_users, CU_settings)
    -> Populating those tables (with the data of users already registered on that GS installation)
  5. After set up you will be told which files have been created.
    -> All users created in this process will have randomly generated passwords that will be sent to their email addresses.
Configuration and use
  1. To change a user's display name/email address/password, you can edit the profile from the CU Panel in Plugins.
  2. To display a sign up/registration form, use the following code:
    Code:
    <?php get_CU_form('signup', $captcha=true); ?>
  3. To display a signin/signout form, call:
    Code:
    <?php get_CU_form('signin', $captcha=true); ?>
  4. To show members-only content in the sidebar, use a PHP conditional (e.g. in a component):
    Code:
    <?php if(CU_signin()) { ?>
        members only content
      <?php } else {  ?>
        guests only content
      <?php } ?>
        content for all
  5. To show members-only content on a page, use I18N Special Pages or Custom Fields to create a field that stores the respective content. Then to output it,
    use a similar conditional to the one shown above in the template file (or in the case of Special Pages, the VIEW tab):
    Code:
    <?php
      if(CU_signin()) get_special_field('members-content');
      else            get_special_field('guests-content');
                      get_special_field('content');
    ?>
  6. To give a form for users to reset their passwords (their details will be sent to their email address), call
    Code:
    <?php get_CU_form('forgotpass', $captcha=true); ?>
Notes
  • To disabled the captcha, change the $captcha variable from true to false.
  • This plugin creates separate set of users managed from the ones that can access the back-end. So do not worry - users who register using this plugin will not be able to access your admin panel. The plugins that extend this one will focus on front-end integration, communication and management, so the security of the back-end will not be compromised.

Users can also be searched using i18n Search (if it is installed) - add the tag 'cuser' to the search query to only show your users.

The other plugins are almost finished. The message board -- previously MSGBoard -- underwent about 6 different rewrites over the last month and is now nearing completion. Shoutbox and threaded comments system were virtually completed almost 3 weeks ago, but I kept them to the side until I had the core CUsers plugin sorted and functional. Private messages plugin is also finished and configured to fit neatly into the message board, so it will be released once the board is done.

Snapshots of all of these plugins will be coming soon. I'm also hoping to write up some tutorials on the use of DM Matrix for plugin development.

---
Changelog

---
To-Do List

----

Special Thanks
  • n00dles001 for creating the fantastic DM Matrix plugin
  • mvlcek for help with search integration and plethora of utterly extendable i18n plugins
  • Jay Salvat for the markItUp! jQuery textarea editor which will be integrated with most of CUser's textarea content (for BBCode and HTML editing)
  • Famfam for their beautiful web icons
  • claviska for the Captcha script
Looks great, note that future versions of gs will have dynamically modifiable ckeditor instances. So they can be customized per user and plugins added dynamically via external plugin.

I would also love some feedback on permission systems, my initial idea is to wrap all ui output in a filter hook for plugins to inhibit. This would immediately give us individual menu control for user rights.

Pehaps even plugin hooks to prevent the loading of a plugin.
That would certainly make back-end user management more potent. I can easily see developers with clients who shouldn't have access to very specific back-end features being grateful for such changes, so that receives two thumbs up from me.

For plugin development, would it also be possible to make CKEditor portable? Or at least have the script able to be called by other plugins from the same directory as the Pages editor? I know it has been asked for before, and it would definitely make plugin development more attractive if existing features from the installation could be used on the fly.
Front end or backend?
I working on backend portability now,
Back-end. For most front-end input, regular input fields and markup editors like markItUp are sufficient.

I'm definitely looking forward to that, Shawn. :-)
I quite agree that this plugin will definitely change the way in which people is used to look at Get Simple.
I think it is already outdated the idea that it is a CMS suited for managing 10-20 pages websites (also this is stated onto the Wikipedia definition) and with this latest addition I believe there will be no more doubts about powefulness and flexibility of GS.
Congratulations, Angryboy, two thumbs up!
Thank you very much, GPB61 :-)

Just posting a few screenshots of the update to come (hopefully early next week):

Custom user fields
[Image: bij5er.png]

Editing the user profile display
[Image: drdzkx.png]

Editing the user panel
[Image: 314xuo6.png]

Editing a user profile (Basic, Custom and Change Password are tabs, they just haven't been styled yet)
[Image: qwzsqc.png]

Viewing a user profile
[Image: intpv7.png]

Main changes:

- Re-writing and re-organising the code
- Moving CUsers to it's own tab
- Integration of custom user fields (used similarly to Special Fields and with its own set of functions to call)
- User profiles are be displayed on their own (pseudo) page (with the username being the slug) using shawn's fake page method
- The structure of the content of the user profile can be edited from the admin panel)
- User profile editing has been moved from a function to its own pseudo page ('on the slug 'edit-profile')
- Using more of GS's built-in language hooks to save time on future back-end translations
GreaT JoB Angryboy, many Thanks!
(2013-05-16, 03:32:17)Angryboy Wrote: [ -> ]
Wikipedia Wrote:...Being restricting to the niche of small-business-sites, GetSimple is not considered to be suitable for sites demanding a lot of user interaction and ongoing content updates...

Until there won't be a decent "catalog" plugin for GetSimple, the quote will be right.
I've made quite a few site with GS ... love it .. BUT ... whenever I need a catalog site, I go back to wordpress (sadely).
I can't let the site owner of the site deal with current plugins ...
The Matrix looks great, hope someone will base a catalog plugin on it ...
What sort of things are you looking for in catalog plugin that differs from an items manager? I ask this because I thought that Items Manager and I18N Special Pages are both flexible enough for those ends. If not, I had been aching to write a tutorial on how to use DM Matrix to develop a bespoke blog plugin and items manager (once the CUsers plugins were published), so if you specify any particular features that are needed, they can be included in the writeup.

Also as an update: I've been working on the CUsers core this week and it's basically finished now, with CodeMirror support for the back-end HTML/PHP editing. The progress made it less compatible with the message board, PM system and comments plugin, so I'm currently trying to bring those all up to speed so that they can be released simultaneously.
(2013-05-31, 01:43:35)Angryboy Wrote: [ -> ]What sort of things are you looking for in catalog plugin that differs from an items manager? I ask this because I thought that Items Manager and I18N Special Pages are both flexible enough for those ends. If not, I had been aching to write a tutorial on how to use DM Matrix to develop a bespoke blog plugin and items manager (once the CUsers plugins were published), so if you specify any particular features that are needed, they can be included in the writeup.

Items Manager is not an option since it's a bit buggy, it's lake of hierarchical categories support , not working with the site search and so much more ....

I18N Special Pages is great and I made some great staff with it, but it's not for users to deal with, it's for me to develop the site with.

I mean, when site owner enter site admin, all he need to see is a catalog tab with these options:
  • categories
  • products
  • options ( templates , custom-fields etc')
I18N Special Pages don't have hierarchical categories ability (with title, description, photo etc'), ability to connect the page (product) to multiple categories ... etc .... ..... yes - you can do it, but it looks bad for an end user, very unfriendly for end users ...

A decent catalog needs to be streight forward (simple ... bullet-proof for dummies), for them to use it ...
and by the way - no there is no plugin with ' hierarchical categories support ' ...
As for your suggestions: that all seems quite doable. Developing the message board has shown how to get other plugins working with i18n search and a definite hierarchical structure between categories->forums->topics->posts.

I've got a hefty to-do list that's piled up now with promises made to a bunch of people (including things from another different forum which I need to get back to just on principle xD), so this will go on the pile (likely with Oleg's StarRating plugin request - both are certainly within my scope to achieve and just require the time/patience).

Can you also specify exactly what features you would expect in the categories/products/options pages? (to get the planning stage bulletproof at least)
(2013-05-31, 03:27:18)Angryboy Wrote: [ -> ]Can you also specify exactly what features you would expect in the categories/products/options pages? (to get the planning stage bulletproof at least)

Yep, good to hear, of course ....
Here is a thread I opened for that : http://get-simple.info/forums/showthread...5#pid36965
Hello Angryboy,

I like your plugin, and the direction it is going (having looked at the teaser pictures further up this thread).

Is there any chance of a time frame before sharing your code with the rest of the community?

I really need to have some extra information taken during the registration process, and I am between (a) botching the existing version of the plugin, or (b) wait for the next release.

Regards,
GeorgiosG
Hello Angryboy,

I have small suggestion/feature request (if you haven't done that already), that came up when a client requested their site to allow users to register, but do not automatically allow them access to the site. They want to grant access to the clients only once they see fit (i.e. after they have received their fee).

I've patched the existing code base so it defaults to value 4 (inactive) instead of 0 (member).

Since you're doing major work on the plugin (by the looks of it) I would make the user_level default value admin customisable, if it's not too much effort.

Regards,
GeorgiosG
why!!![Image: iOIwcazwYC47L.jpg]
(2013-06-17, 20:10:31)GeorgiosG Wrote: [ -> ]Hello Angryboy,

I have small suggestion/feature request (if you haven't done that already), that came up when a client requested their site to allow users to register, but do not automatically allow them access to the site. They want to grant access to the clients only once they see fit (i.e. after they have received their fee).

I've patched the existing code base so it defaults to value 4 (inactive) instead of 0 (member).

Since you're doing major work on the plugin (by the looks of it) I would make the user_level default value admin customisable, if it's not too much effort.

Regards,
GeorgiosG
Hello GeorgiosG,

The recent changes I've made to TheMatrix (once fully stable) will make this easily possible. Hopefully this will be part of the next release of CUsers.

@Oleg: I do not know, but will attempt to fix this for the next iteration.
there os someting going wrong but cant understand what is is
if o look @ the matrix there are tables created but nothing in it...

{CUsers/ERROR}:
CU_users table {cusers/not_successfully_created}.
CU_settings table {cusers/not_successfully_created}.
Success:
****** user successfully created


can someone help me with this?
Are you using the latest matrix iteration? I still need to fix Cusers substantially to be compatible with it (which requires almost as big an overhaul to it as I did for the matrix), so for now you may want to use a previous version of it (when the folder was titled 'DM_Matrix'.

I will indeed get to this problem, but I'm working through the documentation on the use of the plugin and examples. In doing that I'm still learning new coding techniques that will improve the end result, so CUsers will be better off for it ultimately.
oke thanks for the quick support Smile
do you know where i can find the older working version i see the new version on github and the above link in your post but cant find the older version.

Greetz SirBarkAlot
thanks Alot got it working Big Grin
hi,
I'm trying the plugin and I take this error when try to signin:

Strict Standards: Non-static method CUForms:ConfusedignIn() should not be called statically in /srv/vhosts/xxxx.xxx.xxx/CUsers/include/common.php on line 117

Some fields are not filled in correctly.

Password
These passwords do not match.

can you help?
thanks
when i press - Setup

SETTINGSUSERSSETUPHOME
{CUsers/ERROR}:
CU_users table {cusers/not_successfully_created}.
CU_settings table {cusers/not_successfully_created}.

Success:
admin user successfully created


I am using The Matrix
Version 1.0.1
I have same error as jimster.
Setup created cu-users and cu-settings tables instead of CU_users and CU_settings. I tried to change these names in matrix data folder and schema.xml file but with "wild" result.
When I was trying create a CU_users manually in Matrix I finished on the msg: "You must use this format: ". Thats all.
I created table "test" with msg:
Warning: Invalid argument supplied for foreach() in <full path to>\plugins\matrix\include\schema.php on line 10
If I adding field in existing table for example "user_name", my matrix save "user-name".

Something is wrong between computer and chair. Shy

GS 3.2.1
Matrix 1.0.1
CU 1.1
Pages: 1 2