ivantcholakov / starter-public-edition-4

A PHP application starter, based on CodeIgniter 3
MIT License
164 stars 89 forks source link

Template #54

Closed krishnaguragain closed 9 years ago

krishnaguragain commented 9 years ago

Can We have Different Template in Different Module. If So, How can we do it ??

ivantcholakov commented 9 years ago

Within the controller you are to write

$this->template->set_layout('new_layout');
ivantcholakov commented 9 years ago

@krishnaguragain Are you OK there?

krishnaguragain commented 9 years ago

@ivantcholakov I am just ok but it will take some more days to be in previous position.

krishnaguragain commented 9 years ago

@ivantcholakov Hi, How can I check if admin(user) is logged in from one app and check it from another app. e.g In site_examples from admin_example.

ivantcholakov commented 9 years ago

What is the purpose of this, why do you need it? I use independent logging pages in the front-end and in admin applications, the application sessions are different for better security.

krishnaguragain commented 9 years ago

like account.example.com where account is different app and i want to see whether the user is logged in or not from example.com (default app)

ivantcholakov commented 9 years ago

I understand it as something like "Who is online". Here is a sample explanation on how it is could be done, the provided code is old (edit: and insecure), it should be reworked: http://www.plus2net.com/php_tutorial/whois-online.php

krishnaguragain commented 9 years ago

Finally I solved my problem by using flexi auth library in core codeigniter application(i.e inside common folder) and then call from any module or app then it works. After few more days i will put it on github.

ivantcholakov commented 9 years ago

I will be capable to look at it in the beginning of June.

krishnaguragain commented 9 years ago

Hello. @ivantcholakov Why the app cannot set session when the domain is like http://example only.but it works fine when the domain is http://example.com

ivantcholakov commented 9 years ago

For http://localhost session works, I don't see a reason why not.

ivantcholakov commented 9 years ago

With http://ivan session does not work, confirmed. Edit: I can see that on every request the session cookie gets renewed.

ivantcholakov commented 9 years ago

I've just proposed a correction, #57.