How to set login/registration module on website?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
l2c
Forum Members
Forum Members
Posts: 11
Joined: Tue Jul 29, 2014 9:38 pm

How to set login/registration module on website?

Post by l2c »

Hello ;)
Im trying to set up a login and registration page. I have installed a FrontEndUser and Selfregistration module(im not sure if this one is necessary)
Im entering in to templates and choosing template login/register but there i have redirection to different website where customer makening registration and i want him to make this on my website. Question to specialists:
How should i change my template code for login/registration for new customers to let them do this only on my website?

Code: Select all

{capture}
{content block="META Description" wysiwyg="false" size="150" assign="md"}
{content block="META Keywords" wysiwyg="false" assign="mk"}
{content block="META Title" label="Title - tytuł strony w przeglądarce" wysiwyg="false" oneline="true" size="150" assign="mt"}
{content assign="get_content" label="Treść"}
{content block="login" wysiwyg="false" assign="login"}
{content block="register" wysiwyg="false" assign="register"}
{content block="news" wysiwyg="false" oneline="true" size="10" assign="news" label="Wyświetlać 3 pozycje bloga? tak/nie"}
{content block="partners" wysiwyg="partners" oneline="true" size="10" assign="partners" label="Wyświetlać loga partnerów? tak/nie"}
{/capture}
{global_content name='header'}
</__body id="{$page_alias}_{$lang_parent}" class="page {$lang_parent}">
{strip}
<div class="cookieWarningBox"></div>
<!--[if lt IE 8]>
            <p class="chromeframe">{if $lang_parent == en}You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.{else}Używasz <strong>przestarzałej</strong> przeglądarki. <a href="http://browsehappy.com/">Zaktualizuj</a> przeglądarkę lub <a href="http://www.google.com/chromeframe/?redirect=true">zainstaluj Google Chrome Frame</a> żeby w pełni korzystać z tej strony www.{/if}</p>
<![endif]-->
<div id="wrap">
{global_content name='top'}
<div id="content" class="clearfix">
  <section id="lead">
    <div class="container">
      <h1>{title}</h1>
      <img src="{root_url}/img/banner.png" alt="banner" /></div>
  </section>
  <section id="main">
    <div class="container">
      <div class="log-reg"><a href="{root_url}/{$lang_parent}/{translate text='logowanie-rejestracja'}" title="{translate text='logowanie'}"><span>{translate text="logowanie"}</span><span class="sep">{translate text="lub"}</span><span>{translate text="rejestracja"}</span></a></div>
      <div class="row">
        <div class="span12 breadcrumbs"> {breadcrumbs delimiter="-" starttext="{sitename}"} </div>
      </div>
      <div class="row">
        <div class="span12 cms">{$get_content}</div>
      </div>
      <div class="row cms">
        <div class="span5 offset1">
          <div class="lr-box login">
            <h3>{translate text="Logowanie"}</h3>
            <div class="inner">{$login}</div>
          </div>
        </div>
        <div class="span5">
          <div class="lr-box register">
            <h3>{translate text="Rejestracja"}</h3>
            <div class="inner">
              <p>{$register}</p>
              <p><!-- XXXXXX register page -->
                <a href="http://profil.XXXXX.pl/signup" class="button dark">{translate text="Zarejestruj się"}</a>
                <!-- XXXXXX register page --></p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
  {if $news == tak}{global_content name='news'}{/if}
  {if $partners == tak}{global_content name='partners'}{/if}</div>
{global_content name='footer'} 
Best Regards
Claudio
pete290
Forum Members
Forum Members
Posts: 54
Joined: Sat Aug 22, 2009 5:55 pm

Re: How to set login/registration module on website?

Post by pete290 »

Self registration module is needed if you want users to register before logging in. You can use smarty to place the registration form and login pages on one template. Not sure what you mean by you are being redirected to another site? So on your template or a GCB, for login it would be something like this.

{if $ccuser->loggedin()}{redirect_page page='home'}{else}
{FrontEndUsers}{/if}

You will also need custom content module to make sure logged in content is hidden.
see also:
calguy1000.com/.../Hiding_Private_Content_in_CMS_Made_Simple-pdf
l2c
Forum Members
Forum Members
Posts: 11
Joined: Tue Jul 29, 2014 9:38 pm

Re: How to set login/registration module on website?

Post by l2c »

pete290 wrote:Self registration module is needed if you want users to register before logging in. You can use smarty to place the registration form and login pages on one template. Not sure what you mean by you are being redirected to another site? So on your template or a GCB, for login it would be something like this.

{if $ccuser->loggedin()}{redirect_page page='home'}{else}
{FrontEndUsers}{/if}

You will also need custom content module to make sure logged in content is hidden.
see also:
calguy1000.com/.../Hiding_Private_Content_in_CMS_Made_Simple-pdf
Hi pete290, when i tried to create content with login page i got this error on preview.
https://www.dropbox.com/s/2r1b8ub94mqjw39/error.jpg
I think that i need first login template in xml, but where i can get a basic form if there is needed one? I used this information from pdf : "You should go to “Content >> Pages” in the CMS Made Simple admin console, and click
on the “Add New Content” link. For a page title specify “Login”. For the menu text
specify “Login”, and for menu text specify “Login”, and in the content field, type
{FrontEndUsers}. Then click “Submit”."
pete290
Forum Members
Forum Members
Posts: 54
Joined: Sat Aug 22, 2009 5:55 pm

Re: How to set login/registration module on website?

Post by pete290 »

Have you changed the standard metadata tag?

http://docs.cmsmadesimple.org/customizi ... timization

PM me the details if you want me to take a look
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: How to set login/registration module on website?

Post by Jo Morg »

Please post System Info.
One of the things I don't understand is why you are using {capture} the way you are... can you explain?
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
l2c
Forum Members
Forum Members
Posts: 11
Joined: Tue Jul 29, 2014 9:38 pm

Re: How to set login/registration module on website?

Post by l2c »

Jo Morg wrote:Please post System Info.
One of the things I don't understand is why you are using {capture} the way you are... can you explain?
There is it, i dont know what do You mean about "capture" :|

Code: Select all

----------------------------------------------
Cms Version: [b]1.11.9[/b]
Installed Modules:
CMSMailer: [b]5.2.2[/b]
CMSPrinting: [b]1.0.5[/b]
FileManager: [b]1.4.3[/b]
MenuManager: [b]1.8.6[/b]
MicroTiny: [b]1.2.5[/b]
ModuleManager: [b]1.5.5[/b]
Search: [b]1.7.11[/b]
ThemeManager: [b]1.1.8[/b]
CGSimpleSmarty: [b]1.7[/b]
CGExtensions: [b]1.41.2[/b]
CGBlog: [b]1.10.3[/b]
FormBuilder: [b]0.7.4[/b]
MleCMS: [b]1.11.4[/b]
Gallery: [b]1.6.1[/b]
CGSmartImage: [b]1.13[/b]
btAdminer: [b]1.6.0[/b]
FileBackup: [b]0.5[/b]
ShopMadeSimple: [b]0.3.9[/b]
FrontEndUsers: [b]1.24[/b]
CartMadeSimple: [b]0.4.4[/b]
SelfRegistration: [b]1.8.2[/b]

Config Information:
php_memory_limit: [b][/b]
process_whole_template: [b][/b]
max_upload_size: [b]64000000[/b]
url_rewriting: [b]mod_rewrite[/b]
page_extension: [b][/b]
query_var: [b]page[/b]
image_manipulation_prog: [b]GD[/b]
auto_alias_content: [b]true[/b]
locale: [b][/b]
default_encoding: [b]utf-8[/b]
admin_encoding: [b]utf-8[/b]
set_names: [b]true[/b]

Php Information:
phpversion: [b]5.3.28[/b]
md5_function: [b]Off[/b] (Prawda)
gd_version: [b]2[/b]
tempnam_function: [b]Off[/b] (Prawda)
magic_quotes_runtime: [b]Off[/b] (Fałsz)
E_STRICT: [b]0[/b]
E_DEPRECATED: [b]0[/b]
memory_limit: [b]128M[/b]
max_execution_time: [b]30[/b]
output_buffering: [b]Off[/b]
safe_mode: [b]Off[/b] (Fałsz)
file_uploads: [b]Off[/b] (Prawda)
post_max_size: [b]64M[/b]
upload_max_filesize: [b]64M[/b]
session_save_path: [b]/tmp[/b] (0777)
session_use_cookies: [b]Off[/b] (Prawda)
xml_function: [b]Off[/b] (Prawda)
xmlreader_class: [b]Off[/b] (Prawda)

Server Information:
Server Api: [b]apache2handler[/b]
Server Db Type: [b]MySQL (mysqli)[/b]
Server Db Version: [b]5.5.25a[/b]
Server Db Grants: [b]Found a "GRANT ALL" statement that appears to be suitable[/b]
Server Time Diff: [b]No filesystem time difference found[/b]
pete290
Forum Members
Forum Members
Posts: 54
Joined: Sat Aug 22, 2009 5:55 pm

Re: How to set login/registration module on website?

Post by pete290 »

There are a number of ways to handle meta data on cmsms - it seems that there is some conflict or something not correct in your template:

You could remove the current meta for now if you want to concentrate of FEU first. Below are a couple of articles - the 1st one seems similar to your setup

http://blog.visionsoftware.pl/pozycjono ... imple.html

http://www.i-do-this.com/blog/Put-your- ... topilot/57
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: How to set login/registration module on website?

Post by Jo Morg »

l2c wrote:There is it, i dont know what do You mean about "capture" :|
Just a note:

Code: Select all

{capture}{content block="META Title" oneline="true" assign="meta_title"}
{/capture}
anything along the lines of the previous code is plain wrong on more than one account:
  1. {content block="META Title" oneline="true" assign="meta_title"} doesn't output anything so, why capturing?
  2. {capture assign="meta_title"}{content block="META Title" oneline="true" }{/capture} could eventually work if the captured smarty tag syntax was correct which it seems it isn't:
    • {content block="second_content_block" label="Second Content Block"} is correct but
    • {content block="second content block" label="Second Content Block"} is not, and it might have worked on previous versions of CMSMS, but currently it will fail;
  3. capturing is not the most efficient way to assign anything and should be avoided whenever possible;
  4. The correct calls need the underscore: {content block="meta_title" label="META Title" oneline="true" assign="meta_title"};
  5. Using {global_content name='header'} to put ALL header contents doesn't seems too efficient to me, and you lose the advantages of the way CMSMS parses the templates, I would rather use the HTML and HEAD tags outside of the {global_content name='header'};
pete290 wrote:There are a number of ways to handle meta data on cmsms - it seems that there is some conflict or something not correct in your template:

You could remove the current meta for now if you want to concentrate of FEU first.
Indeed there are a number of ways to do it, I just think it should be fixed 1st before getting FEU working, but that is just me ;) ...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Post Reply

Return to “Modules/Add-Ons”