Customizing login page
Permalink 12 users found helpful
I have tried every instruction found in the documentation & in the forum on how to customize single pages but none of them work. I would like to have the login page take the style from the template I am using but C5 only sees the core login style. I believe it is because the theme was installed & resides in the /packages folder & not the /themes folder. I even tried copying the login.php into my themes directory but no luck.
Can anyone guide me with an instruction that actually works when the templates are in the /packages directory?
Thanks
Can anyone guide me with an instruction that actually works when the templates are in the /packages directory?
Thanks
Your site is beautiful! I appreciate your help. I am creating a intranet site for members only. Your login page is exactly what I am shooting for.
Thank you
Lisa
Thank you
Lisa
Hey.
If your wanting to do this make sure the theme has a view.php file as well in the view.php
No if your wanting to display errors i.e. when a user enters in wrong login credentials add:
No edit your site_theme_paths.php file. This is located in the /config folder.
Remove the code and replace it with this:
Replace the "c5bundle" with your custom theme name used on the actual folder. (found in the package under themes).
Hope that helps.
-Thomas
--
c5bundle - Launches Jan. 1/2011
http://c5bundle.net
If your wanting to do this make sure the theme has a view.php file as well in the view.php
<?php print $innerContent; ?>
No if your wanting to display errors i.e. when a user enters in wrong login credentials add:
<?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>
Viewing 15 lines of 17 lines. View entire code block.
No edit your site_theme_paths.php file. This is located in the /config folder.
Remove the code and replace it with this:
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); $v = View::getInstance(); $v->setThemeByPath('/login', "c5bundle"); $v->setThemeByPath('/403', "c5bundle"); $v->setThemeByPath('/register', "c5bundle"); $v->setThemeByPath('/download_file', "c5bundle"); $v->setThemeByPath('/install', "c5bundle"); $v->setThemeByPath('/maintenance_mode', "c5bundle"); $v->setThemeByPath('/members', "c5bundle"); $v->setThemeByPath('/page_forbidden', "c5bundle"); $v->setThemeByPath('/upgrade', "c5bundle"); $v->setThemeByPath('/maintenance_mode', "c5bundle"); $v->setThemeByPath('/page_not_found', "c5bundle"); $v->setThemeByPath('/user_error', "c5bundle");
Viewing 15 lines of 16 lines. View entire code block.
Replace the "c5bundle" with your custom theme name used on the actual folder. (found in the package under themes).
Hope that helps.
-Thomas
--
c5bundle - Launches Jan. 1/2011
http://c5bundle.net
Excellent! Finally!
Thank you so much.
Now all I need to do is add additional css to style further?
Thank you so much.
Now all I need to do is add additional css to style further?
If you wouldn't mind it would be great to be marked as the answer. That way newcomers know what worked.
This worked perfectly. Thank you.
Thanks ThemeGuru, just what I was looking for.
Perfect - Thanks so much - This worked perfectly with the destyle theme I'm using!
Great I've bee looking exactly for this info, thanks!
Worked splendidly. Thanks, ThemeGuru!
Hey Steve,
Do you think you can send me that instructional video also? I would appreciate it so much.
Thanks!,
T.J.
Do you think you can send me that instructional video also? I would appreciate it so much.
Thanks!,
T.J.
thanks!
Hey if it makes you feel any better it was your video that got me there :). His tip about the error area was nice though. Now if I can just get a members page to appear!
Thank you!
Thank you!
Thanks for the tut tallacman!
However, when I do this, it keeps looking in the concrete/themes folder for my theme.
It spits out the error:
How can I get it to look at my themes folder rather than the core themes folder?
Thanks in advance!
However, when I do this, it keeps looking in the concrete/themes folder for my theme.
It spits out the error:
How can I get it to look at my themes folder rather than the core themes folder?
Thanks in advance!
Link no-longer works :(
Hi
DO you still have the instruction video?
Link is dead
DO you still have the instruction video?
Link is dead
And this is why the concrete5 forums are awesome. Because people help one another. Honestly, I wish all forums worked this well. I love the c5 community.
> Try this:
>http://vimeo.com/tallacman
> Scroll down,
Yes, it's better to scroll down and get past the first videos ;)
>http://vimeo.com/tallacman
> Scroll down,
Yes, it's better to scroll down and get past the first videos ;)
I found the first videos very interesting too, I suggest to anyone to have a look.
@tallacman -
wtf? why do you say you know how and then not share it?
wtf? why do you say you know how and then not share it?
You're seriously commenting on a post by tallacman that is over half a year old. Also, if you'd read further down from his post, it was answered by ThemeGuru. Calm yourself.
wtf is your problem? I don't give a rat's ass what you think.
You're dangerously close to getting the Troll badge.
ass
just checkin.
just checkin.
It looks like we modified our search word filter to allow ass.
wtf.
;)
wtf.
;)
haha nice
lol, you're seriously threatening me with a badge? sit yo ass down.
mm. maybe we should modify it back. I found it easier to not accidentally misinterpret people as needlessly negative when they didn't show up swearing... and I'm a heathen! I can't imagine what the moms must be thinking!! ;)
regardless, thanks for following up with the details p1000. Hopefully someone else finds it helpful one day.
regardless, thanks for following up with the details p1000. Hopefully someone else finds it helpful one day.
Hey I'm not usually an ass (maybe.)
I just f'in hate it when people say they have the answer but don't share it. For some reason JackassAnderson wanted to start something, so I happily obliged.
I just f'in hate it when people say they have the answer but don't share it. For some reason JackassAnderson wanted to start something, so I happily obliged.
Okay that's enuf kids.
Lucas is a long time member and moderator here. His response "calm down" seemed pretty..well.. calm to me.
I imagine you might not enter a room full of people you never met and say "What The F*ck, where is the answer I want?"... ya know... tone counts - even online.. I'm confident Lucas doesn't want to start anything with you, he simply wants to move the project forward in a generally friendly fashion.
That being said, I totally get how frustrating it can be when you are close to finding an answer and it's just not quite there. I really respect the fact that you took the time to go ahead and post it back to this thread once you did find it. Nice work - clearly you know what you're doing and I hope you become an active member of the community. We could really use every smart cookie we can get.
Now lets go back to using our own names and avatars and move on to some actual challenges. ;)
-frz
Lucas is a long time member and moderator here. His response "calm down" seemed pretty..well.. calm to me.
I imagine you might not enter a room full of people you never met and say "What The F*ck, where is the answer I want?"... ya know... tone counts - even online.. I'm confident Lucas doesn't want to start anything with you, he simply wants to move the project forward in a generally friendly fashion.
That being said, I totally get how frustrating it can be when you are close to finding an answer and it's just not quite there. I really respect the fact that you took the time to go ahead and post it back to this thread once you did find it. Nice work - clearly you know what you're doing and I hope you become an active member of the community. We could really use every smart cookie we can get.
Now lets go back to using our own names and avatars and move on to some actual challenges. ;)
-frz
EDIT: whoops, this post was directed at "LickmeAnderson," not Lucas Anderson (whom I respect and have received help from several times).
While the name-change and avatar struck me as comedy gold, this is by far the worst behavior I've ever seen on the Concrete5 forums, including my own frustrated posts (and that's saying a lot!)
"Lickme," I hope you will stick around and not be an ass anymore because I appreciate your willingness to help! (And your post did seem to incite tallacman to post his tutorial a year later, so that's good!)
BTW, Tallacman, I just bookmarked your website. Consider me an admiring fan! :)
While the name-change and avatar struck me as comedy gold, this is by far the worst behavior I've ever seen on the Concrete5 forums, including my own frustrated posts (and that's saying a lot!)
"Lickme," I hope you will stick around and not be an ass anymore because I appreciate your willingness to help! (And your post did seem to incite tallacman to post his tutorial a year later, so that's good!)
BTW, Tallacman, I just bookmarked your website. Consider me an admiring fan! :)
What does my ring say? ELE! what does ELE stand for? Yes Everybody Love Everybody!!
NOW EVERYBODY LOVE EVERYBODY!
NOW EVERYBODY LOVE EVERYBODY!
So here's what I've done to customize the login page.
The majority of the site uses a /themes/my-template001. It has a view.php, but for me it keeps single-pages, page_forbidden, and registration in the consistent theme.
I really wanted the login to have a completely different look and feel (no header and footer, no menu, not a popup, or dialog, etc...). So I created a new theme called /themes/my-template002. I then updated its view.php and style.css look how I wanted the login to display. Don't forget to "install" it in the dashboard. (don't activate it)
Then I went to the /config/site_theme_paths.php and updated the /login to point to my new my-template002 theme:
It appears after setting those config values listed above, it doesn't really matter in the dashboard's sitemap what "design/theme" you select for the /login. It will use the one set in that config/site_theme_paths.php.
Hope that helps provide an alternative approach. Good luck...
Mike
The majority of the site uses a /themes/my-template001. It has a view.php, but for me it keeps single-pages, page_forbidden, and registration in the consistent theme.
I really wanted the login to have a completely different look and feel (no header and footer, no menu, not a popup, or dialog, etc...). So I created a new theme called /themes/my-template002. I then updated its view.php and style.css look how I wanted the login to display. Don't forget to "install" it in the dashboard. (don't activate it)
Then I went to the /config/site_theme_paths.php and updated the /login to point to my new my-template002 theme:
$v->setThemeByPath('/login', "my-template002"); $v->setThemeByPath('/page_forbidden', "my-template001"); $v->setThemeByPath('/register', "my-template001");
It appears after setting those config values listed above, it doesn't really matter in the dashboard's sitemap what "design/theme" you select for the /login. It will use the one set in that config/site_theme_paths.php.
Hope that helps provide an alternative approach. Good luck...
Mike
I think I might try your method. It just seems more flexible to customize. Thanks.
I'll tell you exactly how to do it.
If you just want to change the "look" of page:
1. Open up /concrete5/themes/yourtheme
2. Open up view.php
3. Make sure you have
4. Open up /concrete5/config/site_theme_paths.php
5. Copy and paste this code:
If you want to change everything:
1. Open up /concrete5/concrete/single_pages/login.php
2. Select all and copy.
3. Open up /concrete5/themes/yourtheme
4. Create a new .php file and name it "login.php"
5. Paste code from step 1, save.
6. Open up /concrete5/config/site_theme_paths.php
7. Copy and paste this code:
8. Open up /concrete5/themes/yourtheme/login.php and change code, add CSS to your custom theme.
If you just want to change the "look" of page:
1. Open up /concrete5/themes/yourtheme
2. Open up view.php
3. Make sure you have
<?php print $innerContent; ?>
4. Open up /concrete5/config/site_theme_paths.php
5. Copy and paste this code:
If you want to change everything:
1. Open up /concrete5/concrete/single_pages/login.php
2. Select all and copy.
3. Open up /concrete5/themes/yourtheme
4. Create a new .php file and name it "login.php"
5. Paste code from step 1, save.
6. Open up /concrete5/config/site_theme_paths.php
7. Copy and paste this code:
8. Open up /concrete5/themes/yourtheme/login.php and change code, add CSS to your custom theme.
Hi,
I success to customize login page but i want more ! :)
First, i add jquery ui to my login.php page, by adding a login.php in the root/controllers directory. This "login.php" is a copy of the "login.php" from the root/concrete/controllers directory.
I just change the view function, adding jquery ui.
Now, I want to put the register page in the login page. So how does it work. Cause it's the same. For the theming, i understand how to copy the content of the register page (register.php) in my login.php page theme.
But, what about the controllers ? cause it's in a register.php page. Can I unclude it in the login.php controllers ?
What is the good way to do it ?
thanks by advance
I success to customize login page but i want more ! :)
First, i add jquery ui to my login.php page, by adding a login.php in the root/controllers directory. This "login.php" is a copy of the "login.php" from the root/concrete/controllers directory.
I just change the view function, adding jquery ui.
Now, I want to put the register page in the login page. So how does it work. Cause it's the same. For the theming, i understand how to copy the content of the register page (register.php) in my login.php page theme.
But, what about the controllers ? cause it's in a register.php page. Can I unclude it in the login.php controllers ?
What is the good way to do it ?
thanks by advance
I just reply to myself.
I put the template php fil register.php in my login file and i put the content of the register.php controller file in my login controller. It works.
The problem is that I wanted to have all in the same page, using an accordion. As the page is reloaded (i put the jquery loading in the view and the __construct functions, cos the view function was not called a second time), all the parameters are reinitialized, the accordion too.
So, to have a perfect behaviour, it seems I have to recode all the login and register with ajax... lot of work it seems.
Anybody worked on it ?
I put the template php fil register.php in my login file and i put the content of the register.php controller file in my login controller. It works.
The problem is that I wanted to have all in the same page, using an accordion. As the page is reloaded (i put the jquery loading in the view and the __construct functions, cos the view function was not called a second time), all the parameters are reinitialized, the accordion too.
So, to have a perfect behaviour, it seems I have to recode all the login and register with ajax... lot of work it seems.
Anybody worked on it ?
I have done it, and it is a lot of work. I used ajax, but I think it will degrade gracefully if Javascript is disabled (although it will bring users to the normal C5 login or register page when they submit the form, not keep them on this custom page). Here is the code (note that this is completely unstyled -- you will have to apply your own styles via CSS):
Enjoy!
<?php global $u; $is_logged_in = empty($u) ? false : $u->isLoggedIn(); if (!$is_logged_in) { echo Loader::helper('html')->javascript('jquery.form.js'); //Only include this if user isn't logged in because C5 includes it already for logged-in users. } ?> <script type="text/javascript"> $(document).ready(function() { $('#login-form').ajaxForm({ 'dataType': 'json', 'beforeSubmit': function() { $('#login-error').hide(); $('#login-form .submit').val('Logging In...'); },
Viewing 15 lines of 70 lines. View entire code block.
Enjoy!
wow! :) Thanks a lot for your reply. I will try it and come back to tell you.
Hope it works out. Note that I just went back and edited the code a little because I realized the thing I said to put in your theme <head> actually makes more sense combined with the rest of the code, so it's above all that other stuff now (this way it won't load on every page -- just on the combined login/reg page).
it works perfectly ! just cut/paste and that's it.
I didn't test if the register form follow the features of confirmation or not by email that you put in the dashboard. I will see. Anyway, i will have to modify it for my needs.
My principal goal for this afternoon is to understand your code ! In a few lines, it does a lot. I don't understand for the moment how you plug with concrete5 core, with the DB, ... I will ;)
thanks !
I didn't test if the register form follow the features of confirmation or not by email that you put in the dashboard. I will see. Anyway, i will have to modify it for my needs.
My principal goal for this afternoon is to understand your code ! In a few lines, it does a lot. I don't understand for the moment how you plug with concrete5 core, with the DB, ... I will ;)
thanks !
Cool. Let me know if you have any questions about how it works.
Thanks for this, great help!
In the second option, on step #3, there is a mistake (at least as far as I could tell). "login.php" needs to go in single_pages. So the step should say:
3. Open up /concrete5/single_pages/
and then create "login.php" inside that folder. After doing that it worked for me! :)
Thanks for the help though, because you got me going in the right direction!
3. Open up /concrete5/single_pages/
and then create "login.php" inside that folder. After doing that it worked for me! :)
Thanks for the help though, because you got me going in the right direction!
LickmeAnderson is so great!!!!! Thank you very much!!!
seems concrete5 has been updated since this post.
I am using V5.4.2.1
if you look at config/site_theme_paths.php
you will see they have made it easier
you just change the "yourtheme" to the name of the theme folder in
concrete5/packages/theme_gravity_well/themes/gravity_well
and your theme displays just fine.
Edit: it displays fine, but i have yet to find out how to add header images etc.
I am using V5.4.2.1
if you look at config/site_theme_paths.php
you will see they have made it easier
/* you can override system layouts here - but we're not going to by default For example: if you would like to theme your login page with the Green Salad theme, you would uncomment the lines below and change the second argument of setThemeByPath to be the handle of the the Green Salad theme "greensalad" */ $v = View::getInstance(); $v->setThemeByPath('/login', "gravity_well"); $v->setThemeByPath('/page_forbidden', "yourtheme"); $v->setThemeByPath('/register', "yourtheme");
you just change the "yourtheme" to the name of the theme folder in
concrete5/packages/theme_gravity_well/themes/gravity_well
and your theme displays just fine.
Edit: it displays fine, but i have yet to find out how to add header images etc.
This is not new -- it's been like this for as long as I can remember (5.3 at least)?
As for "adding header images", I'm not sure what you mean, but basically if you modify the site_theme_paths.php file to put in your own theme handle, then it will use your theme's view.php file to render that page. So put header images, editable areas, whatever you want in that view.php file and you're good to go.
As for "adding header images", I'm not sure what you mean, but basically if you modify the site_theme_paths.php file to put in your own theme handle, then it will use your theme's view.php file to render that page. So put header images, editable areas, whatever you want in that view.php file and you're good to go.
thnaks for the tip about modifying the view.php.
before i do this, does the view.php page affect any other page, such as the theme pages i have with my current theme (righsidebar, leftsidebar etc)
I dont want the lgo etc to appear twice
Also, can i just link to the header/footer pages of my theme?
before i do this, does the view.php page affect any other page, such as the theme pages i have with my current theme (righsidebar, leftsidebar etc)
I dont want the lgo etc to appear twice
Also, can i just link to the header/footer pages of my theme?
view.php is the template for "single_pages", which are basically system pages (such as login and register) and other special pages installed by some packages/addons -- so no, it shouldn't affect your other theme templates (right_sidebar, left_sidebar, etc.).
See the "View.php" section of this page for more details:
http://www.concrete5.org/documentation/developers/pages/themes...
See the "View.php" section of this page for more details:
http://www.concrete5.org/documentation/developers/pages/themes...
Thank you themeguru . It worked perfectly as i want.. can you please update more information. <a href="http://gamespiders.weebly.com/">click... here</a> .
Hi all.
First post from a newby... Greetings!!
Been following the thread, little disappointed with the bickering, but that apart there are people here who know exactly what they're talking about. Respect to all of you. Been trying to change the look of my Login and Register pages, and although all the advice here is great, it doesn't help a learner! I sort of understand the basics, and believe me if I could afford to have this done for me I would! So here is the question. I get what is said, but there are lots of view.php files, lots of login.php and register.php files. It would be greatly appreciated if someone could offer guidance as to which files in which folders need to be modified. Please be gentle with me!!
Thanks in advance if someone can share his/her knowledge
First post from a newby... Greetings!!
Been following the thread, little disappointed with the bickering, but that apart there are people here who know exactly what they're talking about. Respect to all of you. Been trying to change the look of my Login and Register pages, and although all the advice here is great, it doesn't help a learner! I sort of understand the basics, and believe me if I could afford to have this done for me I would! So here is the question. I get what is said, but there are lots of view.php files, lots of login.php and register.php files. It would be greatly appreciated if someone could offer guidance as to which files in which folders need to be modified. Please be gentle with me!!
Thanks in advance if someone can share his/her knowledge
Welcome MagsAtWcg,
Glad to have you aboard. No worries. You've came to the right place. The c5 community is a very forgiving and helpful place who's members seem to always remember that kindness and help go much further than heckling.
That being said, you need to have access to your c5 files, either locally or SFTP, whatever you use to directly access them.
If you have not updated c5 with this install, go to:
Copy that file to:
This creates your core over-ride that will allow your edits to stick, even after upgrading the c5 core. Very innovative approach and makes it all easy to maintain.
Edit away on that copied file and you'll see your edits occur on the login page.
Dido for the Register page. Exact same process b/c both login and register are single_pages in the system, so they're all stored in the same place.
IF you've upgraded c5, instead locate the files to duplicate at:
[code]siteroot/updates/concrete5.6.whatever_ur_on/concrete/single_pages/login.php
Hope this helps.
Welcome once again.
And look forward to seeing you around, and maybe returning the favor someday to another noobie :)
Cheers,
Pat.
Glad to have you aboard. No worries. You've came to the right place. The c5 community is a very forgiving and helpful place who's members seem to always remember that kindness and help go much further than heckling.
That being said, you need to have access to your c5 files, either locally or SFTP, whatever you use to directly access them.
If you have not updated c5 with this install, go to:
siteroot/concrete/single_pages/login.php
Copy that file to:
siteroot/single_pages/login.php
This creates your core over-ride that will allow your edits to stick, even after upgrading the c5 core. Very innovative approach and makes it all easy to maintain.
Edit away on that copied file and you'll see your edits occur on the login page.
Dido for the Register page. Exact same process b/c both login and register are single_pages in the system, so they're all stored in the same place.
IF you've upgraded c5, instead locate the files to duplicate at:
[code]siteroot/updates/concrete5.6.whatever_ur_on/concrete/single_pages/login.php
Hope this helps.
Welcome once again.
And look forward to seeing you around, and maybe returning the favor someday to another noobie :)
Cheers,
Pat.
Would be nice if someone would outline the code for 5.7 ;)
Would be nice if someone would outline the code for 5.7 ;)
@micrdy
Here is some information on overriding the login and form.
https://www.concrete5.org/community/forums/customizing_c5/i-have-tur...
"Applying Your Theme to Single Pages with "Theme Paths""
https://www.concrete5.org/documentation/developers/5.7/designing-for...
Here is some information on overriding the login and form.
https://www.concrete5.org/community/forums/customizing_c5/i-have-tur...
"Applying Your Theme to Single Pages with "Theme Paths""
https://www.concrete5.org/documentation/developers/5.7/designing-for...
Thanks for your answer. But the code mentioned above to display error messages on login failure doesn´t work for 5.7
It looks to work for me, can you show what you changed?
I'll make an instructional video and show you how and send you the link. It'll take a few minutes.
Steve