Welcome Guest, Not a member yet? Register   Sign In
Codeigniter + twitter bootstrap + html5boilerplate + MY_Controller
#11

[eluser]vesparny[/eluser]
That is the right way...if you Want you can fork the repo and help me to improve the documentatio. Thanks
#12

[eluser]Exeneva[/eluser]
I've just downloaded this and will be playing around with it. So far it seems you've done a very nice job of integrating the three. The documentation could certainly be improved, but once that is done I believe you will have a very good 'base' set for web apps.

#13

[eluser]vesparny[/eluser]
[quote author="Exeneva" date="1332052101"]I've just downloaded this and will be playing around with it. So far it seems you've done a very nice job of integrating the three. The documentation could certainly be improved, but once that is done I believe you will have a very good 'base' set for web apps.

[/quote]

are you experiencing trouble?
i really apreciate every kind of contribution : if you would improve the docs send me a pull req. Smile
#14

[eluser]Exeneva[/eluser]
I'll play around with it a bit.

I'm not a very experienced CI developer, but once I start to understand your framework more, I'll pitch in some documentation.

For now, I suggest explaining your view setup more.
#15

[eluser]Unknown[/eluser]
Hello @vesparny and all CI coders.

I just got started my journey with this framework and it's great - even for newbies like me.

Although, I have a problem with integrating Tank auth library with your bootstrap pack.

I mean, I know that there's a template view for every website element like header, footer etc.

But I can't figure out how to make login form in the navbar.

I discovered that TankAuth has a following code in home controller:
Code:
if (!$this->tank_auth->is_logged_in()) {
   redirect('/auth/login/');
  } else {
   $this->data['user_id'] = $this->tank_auth->get_user_id();
   $this->data['username'] = $this->tank_auth->get_username();
   $this->data['role']  = $this->tank_auth->get_role();
  
   $this->_render('pages/home');
  }

And I already connected it with your _render method, which is awesome at the point Smile

But, still can't put the login form inside the navbar without making crappy code Smile

Do I have to write a method in nav_helper (like isLoggedIn) ? Or is there a better way to make it work?

Thank you in advance
Cheers
#16

[eluser]Go-Trex[/eluser]
Hi Coob,

I am also a user of this extension of the CI_Controller. I have made some modifications/improvements in the past for own use. One of the modifications was integration with tank_auth in the boilerplates as default.

In nav.php you can alter the code to show a login form when the user is not logged in. You can check this with the function you mentioned above
Code:
$this->tank_auth_>is_logged_in()
. If this returns FALSE then you can show the login form, otherwise you can show the navigation links for example.

nav.php
Code:
<?php

if($this->tank_auth->is_logged_in())
{
    // show navigation links
    echo anchor(base_url(), 'Home');
    echo anchor('admin', 'Admin area');
}
else
{
    // show login form
    echo form_open();
    ....
}


Make sure that the tank_auth library is autoloaded since you will be using the library on every page of your website.
#17

[eluser]bibos[/eluser]
Hi,
Great work man, i'm going to start a new project based on your skeleton, but i have a question what is : $renderData?

And can you give an exemple on how to use it?

Thanks Man.




Theme © iAndrew 2016 - Forum software by © MyBB