Tutorials
How Your users get redirected to home instead of profile page after login

Hi Community smile

If You want that Your users will get redirected to the forum home and not to profile page then follow my simple tutorial, please.

  • To edit the following file use a code Editor like Notepad++ or Sublimem both are free):

  • Open: codoforum\sites\default\themes\default\templates\user*login.tpl
    Go to
    line number 161 and replace the default code - this one*
    :

window.location.href = codo_defs.url + 'user/profile';
  • with that one:
window.location.href = codo_defs.url;
  • Now save, upload the file, recache browser and it should do the trick.

Kind regards,

Andy


P.S.: If You are using a other Codoforum theme, make sure to check if there is a login.tpl included (if not then all is fine). If yes then do the same with that template, please.

Hi **Community** :) If You want that Your users will get redirected to the **forum home** and not to profile page then follow my simple tutorial, please. - To edit the following file use a code Editor like **Notepad++** or **Sublime**m both are free): - Open: codoforum\sites\default\themes\default\templates\user\**login.tpl** Go to **line number 161** and **replace** the default code - **this one**: ```` window.location.href = codo_defs.url + 'user/profile'; ```` - **with that one**: ```` window.location.href = codo_defs.url; ```` - Now save, upload the file, **recache** browser and it should do the trick. Kind regards, Andy _________________________________ **P.S.:** If You are using a other Codoforum theme, make sure to check if there is a **login.tpl** included (if not then all is fine). If yes then do the same with that template, please.

Thanks for the hack, was looking to mess with the code to change this for a while smile

Thanks for the hack, was looking to mess with the code to change this for a while :D

BlackBerry enthusiast, entrepreneur, web developer, geek with glasses and enlightened agent!

Hi @WebCrew

Thank you for sharing this. We were also thinking of adding this as an option in the backend as we did get some emails on this too.

Hi @WebCrew Thank you for sharing this. We were also thinking of adding this as an option in the backend as we did get some emails on this too.
Necessity is the mother of all inventions!

Thank You @quenquen and @admin smile You`re very welcome!

It would be nice to have such a simple settings at the backend.

Right at the moment I started working on a Codoforum "One Pager" Theme and try to combine the normal "home view" with the "user profile view".

None registered will see the default Login/Registration form and the standard "home". But already registered users will see at the top of the page their Profile with avatar and a header image and a advanced profile tabs menu. Right under it is then the standard forums main view.

I also thought about wether to create it with the normal html/php way of writing a template, or better about to make a lot of use of "Ajax". Because with Ajax its super easy to compine a lot of features on one page.

What do You think about it?

Kind regards, Andy

Thank You @quenquen and @admin :) You`re very welcome! It would be nice to have such a simple settings at the backend. Right at the moment I started working on a Codoforum **"One Pager" Theme** and try to combine the normal "home view" with the "user profile view". None registered will see the default Login/Registration form and the standard "home". But already registered users will see at the top of the page their Profile with avatar and a header image and a advanced profile tabs menu. Right under it is then the standard forums main view. I also thought about wether to create it with the normal html/php way of writing a template, or better about to make a lot of use of "Ajax". Because with Ajax its super easy to compine a lot of features on one page. What do You think about it? Kind regards, Andy

I also thought about wether to create it with the normal html/php way of writing a template, or better about to make a lot of use of "Ajax". Because with Ajax its super easy to compine a lot of features on one page.

I feel you should try as much as possible to not create your own templates (.tpl/.html files).
Make all changes with css and javascript instead and even for css, codoforum first loads the default css and then overrides with yours.

This will ensure that any changes to the default theme (bugfixes/features) are propagated to your theme as well.
The only case where its recommended to make a separate theme is when you want to completely change the layout which was the case when we made the 'vintage' theme. Even then we made sure only a few files(templates) were copied and rest everything was inherited from default theme

>I also thought about wether to create it with the normal html/php way of writing a template, or better about to make a lot of use of "Ajax". Because with Ajax its super easy to compine a lot of features on one page. I feel you should try as much as possible to not create your own templates (.tpl/.html files). Make all changes with css and javascript instead and even for css, codoforum first loads the default css and then overrides with yours. This will ensure that any changes to the default theme (bugfixes/features) are propagated to your theme as well. The only case where its recommended to make a separate theme is when you want to completely change the layout which was the case when we made the 'vintage' theme. Even then we made sure only a few files(templates) were copied and rest everything was inherited from default theme
Necessity is the mother of all inventions!
edited May 6 at 10:22 am
61
4
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft