|
ivancar
Guest
|
 |
« on: 30 May 2006, 12:52 » |
|
Hello all
I've recently got some problems to understand how the Custom Content Module works, so here's detailed thread, at my way
Our goal: Create a Team Area with some pages for team group members only. The members of the team group will be added manually from the administrator or will can register by themselves (in any case they will have to be activated by the administrator)
Modules to install: CMSMailer, Frontend users, Self Registration, Custom Content.
To install the modules you need just to decompress the files and put the related folders inside the Modules folder of your CMSMS, then install them from the admin control panel/modules. If you'll be warned right after installation to grant the permissions for the module, activate it under Users&Groups/Group permissions, choosing Admin group and click on the corresponding checkbox. press Submit to save changes
CMS Mailer module: it's needed to install the Frontend users, so we'll install it first. Go to the preferences of the module. (exstensions/CMS Mailer) Here follow the instructions in according of your host provider. You can choose as method to send the emails : mail, sendmail, SMTP. Follow the instructions, and try if all works with the test option in the bottom. (under linux, my best choice has been sendmail ) press Submit
Frontend users: That's the module that gives you new controls on users of your site. It's used by Custom Content to the authentication of logging people in the private area. Install it and give the Admin group the requested permissions. The Module allows you to create new groups assigning them, activating, deleteting new users. (NOTE: the groups and the users are'nt the same as those created with the original group/user interface of the CMSMS.)
1) Go in Users&Groups/Frontend users Managements
2) we add a new property that will be used to build 2 groups: pending and team The new (selfregistered) users will added automatically to the pending group (with no access to the private Team Area) let's call it email, prompt Email address, type Email Address - press Submit
3) In Groups we Add new group: pending check required for the email adress property - press Submit Add new group: team (allowed access) check every choice you want for email - press Submit
4) Preferences: PageID/Alias to jump to after logout: home (or whatever page you want)
5) Logout Template: replace the code with the following
<!-- Logout form template --> {$startform} <p><b>{$prompt_loggedin} {$username}</b> {$link_logout} {$link_changesettings}</p> {$endform} <!-- Logout form template -->
press Submit _______________________________
Self Registration: Preferences: check the box Send an email notification when someone registers check the box Require the user to confirm registration via email enter your email address were the notification will be sent and check the box press Submit
Now :
go to Content and create 2 pages:
Registration, parent: Home, in Options deactivate Show in Menu: put as content the code: {cms_module module=SelfRegistration group=pending} Submit
Team Area
Under Layout/Templates copy the template you want to apply to the protected pages:(2nd icon after CSS) Bulletmenuvert 1col give it a name: i.e. Access_BullVert1col
open the new template, find the code: <!-- Start Content Area --> <div id="main">
after add: {cms_module module=CustomContent} <!--customContent: startif group=team -->
below find: <p>{cms_selflink dir="previous"} <br /> {cms_selflink dir="next"}</p>
after add: {cms_module module=FrontEndUsers}
<!--customContent: else --> <span style="font-weight: bold;">Team members</span> or <span style="font-weight: bold;">invited </span>guests only, <span style="font-weight: bold;">login</span> or <a href="index.php?page=31"><span style="font-weight: bold;">register</span></a><br /><br />{cms_module module=FrontEndUsers} <!--customContent: endif -->
note: the <a href="index.php?page=31"> part it's only the link of the word register to the Registration page, read the CMSMS documentation on how create a link using the text editor...
press Submit
open the Team Area page and assign it the template Access_BullVert1col, modified
press Submit
At this point the self registered users will be found in the Frontend users Management, you can then move who you want allow to access, from the pending group to the team group. Of course you can do that manually simply adding a new user and assign him/her to the team group. All accounts have a expiring time. I noticed that if i choose the max expiring data, in my system dont works. But i think that a expiring time for the, let's say, 2030 should be more than acceptable ;o)
That's all, i hope that could help (my apologizes, Calguy 1000, for any mystake)
follows some screenshoots of the result
[attachment deleted by admin]
|