Theme for Registration Page

Permalink 6 users found helpful
I would like to either add a Registration form to an existing page, or style the existing Registration page so that it looks like part of the site.
Has anybody else wanted to do this and succeeded?
Thanks guys
Dan

 
pixelfish replied on at Permalink Reply
pixelfish
I also want to do this. I had a go but couldnt get it right.

anyone got a solution?
synlag replied on at Permalink Reply
synlag
yo:
for specific single_pages, set the theme path at <your website>/config/site_theme_paths.php
<?php  
defined('C5_EXECUTE') or die(_("Access Denied."));
$v = View::getInstance();
$v->setThemeByPath('/login', "your-theme-name");
$v->setThemeByPath('/403', "your-theme-name");
$v->setThemeByPath('/page_not_found', "your-theme-name");
$v->setThemeByPath('/register', "your-theme-name");
// $v->setThemeByPath('/dashboard', "your-theme-name");


regards
msmiller replied on at Permalink Reply
msmiller
I know this is a dumb queston, but I just can't figure out how to reference "your-theme-name." How do I know it's name? Is is it a full address? I've tried a bunch of different things, but I keep getting this error message:

Warning: include() [function.include]: Filename cannot be empty in /home/anewdire/public_html/concrete/libraries/view.php on line 738

Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/anewdire/public_html/libraries/3rdparty:/home/anewdire/public_html/concrete/config/../libraries/3rdparty') in /home/anewdire/public_html/concrete/libraries/view.php on line 738

I'm just learning how to edit php. I hardly know what I'm doing. Any help would be appreciate.

Thanks!
Mnkras replied on at Permalink Reply
Mnkras
if you look in /themes or /packages what the folder for the theme you want for example the folder's name is theme_pie you would put theme_pie in the your-theme-name

Mike
msmiller replied on at Permalink Reply
msmiller
Thanks so much! I was making this harder than it needed to be. : )
msmiller replied on at Permalink Reply
msmiller
Ok, one more question. . .These system pages look terrible with my theme!

I think I understand how to make them editable in my default.PHP file, but I'm not sure how to reference the areas I want to edit.

Any idea of how to do this?
Mnkras replied on at Permalink Reply
Mnkras
for skinning its basically the same as this:

http://www.concrete5.org/marketplace/addons/discussion/skinning-and...

just replace discussion with register :)
CoreyScogin replied on at Permalink Reply
CoreyScogin
Sorry for resurrecting an old thread but I ran into a caveat when applying my theme to the registration page so I thought I'd share.

After modifying the config/site_theme_paths.php file, I found that the form validation errors no longer showed up when attempting to register.

The code that shows these form validation errors is included in the core theme in the concrete.php file.
The code is as follows:
<?php  if (isset($error) && $error != '') { ?>
        <?php if ($error instanceof Exception) {
      $_error[] = $error->getMessage();
   } else if ($error instanceof ValidationErrorHelper) { 
      $_error = $error->getList();
   } else if (is_array($error)) {
      $_error = $error;
   } else if (is_string($error)) {
      $_error[] = $error;
   } ?>
        <ul class="ccm-error">
   <?php  foreach($_error as $e) { ?>
            <li><?php echo $e?></li>
        <?php  } ?></ul>
<?php } ?>


Placing this code near the top of the single_pages/register.php file fixed my issue. This is also the case for login.php.

*note: I copied the register.php and login.php files to the top level single_pages folder so it overrides the default one.
sday replied on at Permalink Reply
sday
resurrection is good. :) This thread got me half way.

What if you have more than one theme on the site? For example, I created a custom mobile theme. Created a custom block. While users are accessing that custom block, it is a essentially a custom web app that takes over the screen, all normal concrete5 website functionality disappears. So if while using that app the users want to log in, I need one custom registration form. If while they are accessing the normal website they register, I need it themed like the site.

So this thread helped me understand how to theme a registration page, but only to a single theme. When I'm on a page using a different theme, the registration page that pulls up is the one set in site_theme_paths.php regardless of what theme they were in when clicking on the registration link.

thanks for any help
-Steve
coleatron replied on at Permalink Reply
coleatron
Well, I'm a little lost. I managed to get the theme to show up, but now I have a problem. I get this error at the top of the page:

Warning: Cannot modify header information - headers already sent by (output started at /home/cambrid8/public_html/config/site_theme_paths.php:2) in /home/cambrid8/public_html/concrete/controllers/page_not_found.php on line 9

Warning: Cannot modify header information - headers already sent by (output started at /home/cambrid8/public_html/config/site_theme_paths.php:2) in /home/cambrid8/public_html/concrete/libraries/view.php on line 764

And I don't know how to make the page editable.
rockface replied on at Permalink Reply
rockface
The problem with the login and registration pages is bigger than missing the theme, it's missing the header and footer too!

What are the chances someone could make a registration block. This would let you place a registration form anywhere inside your themed site.

Benefits:
1. You could link to your privacy policy on the same page
2. It wouldn't look like you went to a different site to register.
3. The user would not be trapped in a dead-end page with no links back to the rest of the site.
3. You could place the registration block in the page wherever you wanted

The fact that C5 does not have a login and registration process better integrated into the package, really makes the whole solution look unfinished... Its a disappointment to every customer i build a site for.
gogza replied on at Permalink Reply
Ta da!

Have a look at the good work done by mkly over here:

http://www.concrete5.org/community/forums/customizing_c5/having-a-r...

He created a registration block that I have at the foot of every page on a pop-up menu.

Works perfectly!

Cheers,
Gordon
shotrox replied on at Permalink Reply
shotrox
this is easily achieved by changing the register.php and login.php accordingly
SpencerC replied on at Permalink Reply
SpencerC
I know this thread started two years ago, but it looks like it has enough interest that I wanted to update it. C5 now has an easy way to do this for a few pages:

Go to /config/site_theme_paths.php file and read the instructions in the document. It's the simplest way to get these pages to look like your site. Make sure to save an original file just in case you mess it up, which seems impossible.
SpencerC replied on at Permalink Reply
SpencerC
Sorry, I spoke too soon. Validation errors don't display. I am by no means a php programmer, but primarily from this discussion above I was able to make my login and registration pages fit in with the site's theme by doing this:

1) Go to yoursite/config/site_theme_paths.php file and read the instructions in the document. This is where you remove the comment-out code (/*) and add in your theme name, which is the name of the root folder of your theme. Make sure to use underscores (i.e.earthtones_stone).

2) Copy register.php and login.php from yoursite/concrete/single_pages to yoursite/single_pages.

3) Download and open each one of these in a text or code editor. I usually save an original backup on my hard drive too.

4) Just after <div class="ccm-form"> on register.php and after <div style="position: relative"> on login.php add this code for validation errors (thanks CoreyScogin):
<?php  if (isset($error) && $error != '') { ?>
        <?php if ($error instanceof Exception) {
      $_error[] = $error->getMessage();
   } else if ($error instanceof ValidationErrorHelper) { 
      $_error = $error->getList();
   } else if (is_array($error)) {
      $_error = $error;
   } else if (is_string($error)) {
      $_error[] = $error;
   } ?>
        <ul class="ccm-error">
   <?php  foreach($_error as $e) { ?>
            <li><?php echo $e?></li>
        <?php  } ?></ul>
<?php } ?>


5) Upload the two files to your site, replacing the ones you had copied to yoursite/single_pages.

Voila! Your theme should now show when you login or register and include the proper validation errors. If not, let me know what is incorrect and I will edit these instructions.

-Spencer

EXTRA CREDIT >>> Want to add form fields for the registration page? Do this: add user attributes in the dashboard in the users & groups section, and these will automatically be included in the registration form.
AngusHume replied on at Permalink Reply
AngusHume
I have been trying to sort this out for hours. There are a number of threads with solutions that I could not get to work but this worked perfectly (knocking on wood!). Thanks so much.
SpencerC replied on at Permalink Reply
SpencerC
Great! Please post and errors or tips.

-Spencer
dimerz replied on at Permalink Reply
Can anyone help me out, I can't find
<div style="position: relative">
in login.php
dimerz replied on at Permalink Reply
Ok I have worked out validation -

<?php Loader::element('system_errors', array('error' => $error)); ?>


Prior to

<?php  print $innerContent; ?>


In view.php does the trick.

found it in -http://www.concrete5.org/documentation/how-tos/designers/themimg-sy...
citytech2 replied on at Permalink Reply
citytech2
I've had the registration add-on as a block. If anyone want this, just send me a PM.

Citytech
tonidomenech replied on at Permalink Reply
tonidomenech
you play with Loggin or Register single page:

Duplicate page to solved the problem of error msg.

Site
|-home ( Ej: Register not header and footer )
|-themes ( Ej: Register with header and footer)