Shopping / Modules
Tuesday, 5 July 2011 by pijulius
Modules are self powered classes that will extend your site to be more powerful and add further features to it like a Photo Gallery and so on.
Member Forms
This module extends your site with user registration/my account dynamic forms allowing you to have guests register on your site. You can customize both forms with any custom fields you want.
Content Codes / Details
Requires jCore ver. 0.8 or above. Extends content codes with:
-
{modules}members{/modules}
- display Login/My Account forms -
{modules}members/login{/modules}
- only display Login Form -
{modules}members/account{/modules}
- only display Login/My Account forms -
{modules}members/registration{/modules}
- only display Registration Form
?logout=1
in any link you wish
Comments (2)
IF you pick the modules in the content options then it only displays that one. So, if you choose "Registration" you expect it to show the register stuff only if you're not logged in. This is not the case, it shows it all the time, regardless.
For instance {module}members{/module} shows the registration stuff 100% of the time and never login or anything, which it should.
It's really hard to use this for a single link to a members page that lets you register or login.
Really loving this CMS, but that, and the inability to have some code that detects if you're logged in or not is killing me.
You're right, registering will be shown even to logged in users as in my opinion registering and updating your account should never be the same page, why would you link users to the registration page to update their accounts? how would they login on the registration page???
But anyway, if you want to show account instead of registration if user is logged in just edit modules/members.class.php and search for function displayRegistration() and right above the line reading $form = new memberRegistrationForm();
add the following code:
if ($GLOBALS['USER']->loginok) {
$this->displayAccount();
return;
}
and that's it.