Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9244057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:56:15+00:00 2026-06-18T08:56:15+00:00

I have CodeIgniter 2.1.3 extended with following HMVC here plugin i followed it to

  • 0

I have CodeIgniter 2.1.3 extended with following HMVC here plugin i followed it to the end and got it to work with no problems with the basic example. However now i would like to extend my application with BitAuth authentication libary and i would like to implement it as a module.

So i have done all the steps according to documentation for the plugin:
I have created a folder auth with controllers and view that comes with BithAuth libary and called the module controller and method yet this gives me a 404 error.

I noticed one diffirence between the test module and my bithauth module for instance when i call

<?php Modules::run('module/controller/method'); ?>

this on the test module and then visit localhost/home/index the page shows home page view and renders the view of module. However when i call this on my bitauth module and i visit localhost i get redirected to localhost/bithauth_controller/bitauth_method and that throws a 404 error.

My folder structure:

->application  
-->controllers  
-->views  
-->models  
--->modules/auth/controllers  
--->modules/auth/vews/examples  
--->modules/auth/models    

My home controller that maps to home url: localhost

class Home extends MX_Controller {
    public function index()
    {
        $this->load->view('home');
    }
}

and its view file:

<html>
    <head>
        <title>Shop: index</title>
    </head>
    <body>
        <?php Modules::run('auth/Example/index'); ?>
    </body>
</html>

Now in the auth folder i have bithauth controller:

class Example extends MX_Controller
{

    /**
     * Example::__construct()
     *
     */
    public function __construct()
    {
        parent::__construct();

        $this->load->library('bitauth');

        $this->load->helper('form');
        $this->load->helper('url');

        $this->load->library('form_validation');
        $this->form_validation->set_error_delimiters('<div class="error">', '</div>');
    }

    public function index()
    {
        if( ! $this->bitauth->logged_in())
        {
            $this->session->set_userdata('redir', current_url());
            redirect('example/login');
        }

        $this->load->view('example/users', array('bitauth' => $this->bitauth, 'users' => $this->bitauth->get_users()));
    }


}

And the view in auth/views: a simple form

<body>
    <?php

        echo '<table border="0" cellspacing="0" cellpadding="0" id="table">';
        echo '<caption>BitAuth Example: Users</caption>';
        echo '<tr><th width="1">ID</th><th>Username</th><th>Full Name</th><th>Actions</th></tr>';
        if( ! empty($users))
        {
            foreach($users as $_user)
            {
                $actions = '';
                if($bitauth->has_role('admin'))
                {
                    $actions = anchor('example/edit_user/'.$_user->user_id, 'Edit User');
                    if( ! $_user->active)
                    {
                        $actions .= '<br/>'.anchor('example/activate/'.$_user->activation_code, 'Activate User');
                    }

                }

                echo '<tr>'.
                    '<td>'.$_user->user_id.'</td>'.
                    '<td>'.$_user->username.'</td>'.
                    '<td>'.$_user->fullname.'</td>'.
                    '<td>'.$actions.'</td>'.
                '</tr>';
            }
        }
        echo '</table>';

        echo '<div id="bottom">';
        echo anchor('example/logout', 'Logout', 'style="float: right;"');
        echo anchor('example/groups', 'View Groups');
        if($bitauth->is_admin())
        {
            echo '<br/>'.anchor('example/add_user', 'Add User');
        }
        echo '</div>';

    ?>
</body>

I noticed that redirect was happening due to if() statement in index() method i solved that now however i dont get the view of my module displayed and i dont get any errors.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:56:16+00:00Added an answer on June 18, 2026 at 8:56 am

    i dont get the view of my module displayed and i dont get any errors.

    try this:

    <?php echo Modules::run('module/controller/method'); ?>
    

    but better to use this way (Codeigniter Output class) :

    <?php $this->output->append_output( Modules::run('module/controller/method') ); ?>
    

    i hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I cannot work this out to save my life! So, I have a Codeigniter
I have the following Codeigniter (MySQL related) error in my application Error Number: 1100
Possible Duplicate: Codeigniter extending extended MY_Controller I have been fiddling with this problem for
I have a CodeIgniter site and the problem is I have: RewriteCond %{HTTP_HOST} ^example\.com
I have a codeigniter controller with the following check() function to check username and
I am using CodeIgniter and have extended CI_Model . so all my models now
My intention here is to have a codeigniter app with a blog under the
I have codeigniter installed in root/igniter folder. under root/igniter, I have the following .htaccess
I have a codeigniter app working fine locally with WAMP. However, I am having
I have uploaded codeigniter site here. It runs fine at local server but after

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.