Welcome Guest, Not a member yet? Register   Sign In
BackendPro 0.6.1

[eluser]IamPrototype[/eluser]
Can I ask how you did make that "PHP template". I mean, in applications you got views and in views you got header.php, menu.php, footer.php etc. where do you load all that "layout" stuff, because it seems to be a good way on how to do it. Smile

[eluser]adamp1[/eluser]
@IamPrototype: Have a look in the application/views/admin/container.php

@wong_deso: It is impossible to remove the index.php from the url without using mod_rewrite, if you enter it has blank in the config, how will it know what page it needs to load to do all the work? Even though you enter controllers after the index.php, all the work is really done by index.php, not the sub classes.

What Is you mod_write statement to remove the index.php?

@NiconPhantom: Could I suggest you turn of the language thing and just try a default install of BeP on its own. Then if that works try adding the language thing back in. I have a feeling its maybe something doing something to the form maybe (I can't think of any other reason for this happening). Did you check if the ajax requests where being fired using firebug??

[eluser]wong_deso[/eluser]
Hi adamp1 , thanks 4 the quick reply.

sorry what i meant was i have trouble after installing BeP for the URL, and it concern about the index.php, cuz im using mod_rewrite on my apps and got an error 404 message after i type "localhost/appsnew/admin"

it turns out that i forgot to change/edit my .htaccess file

from :

RewriteBase /apps/

to

RewriteBase /appsnew/

anyway it all works now ^_^ , kewl !

thnx

[eluser]IamPrototype[/eluser]
So it works like this:

container.php
Code:
<?php
$this->load->view($this->config->item('backendpro_template_public') . 'header');
$this->load->view($this->config->item('backendpro_template_public') . 'content');
$this->load->view($this->config->item('backendpro_template_public') . 'footer');
?>

-- Loads up three other files with the layout header, content (important file) and footer.

content.php
Code:
<div id="content">
    <a name="top"></a>
    &lt;?php print displayStatus();?&gt;
    &lt;?php print (isset($content)) ? $content : NULL; ?&gt;
    &lt;?php
    if( isset($page)){
    if( isset($module)){
            $this->load->module_view($module,$page);
        } else {
            $this->load->view($page);
        }}
    ?&gt;
</div>

--One thing I don't understand here is your if(). Why do you check for $page to be set and $module to be set? Why not just load the module like you do in the second if() with the $module.

Anyways, when you've to load a view, it goes like this.

welcome.php (controller)
Code:
// Display Page
        $data['header'] = "Welcome";
        $data['page'] = $this->config->item('backendpro_template_public') . 'welcome';
        $data['module'] = 'welcome';
        $this->load->view($this->_container,$data);

--Header is the page title, I got that
--Page is the view inside the module, right?
--Module is welcome. It loads the module 'welcome'.

Or am I completely wrong here? What if I skipped page and just loaded the module. Then it wouldn't work, right?

[eluser]NiconPhantom[/eluser]
[quote author="adamp1" date="1242214030"]@IamPrototype: Have a look in the application/views/admin/container.php

@wong_deso: It is impossible to remove the index.php from the url without using mod_rewrite, if you enter it has blank in the config, how will it know what page it needs to load to do all the work? Even though you enter controllers after the index.php, all the work is really done by index.php, not the sub classes.

What Is you mod_write statement to remove the index.php?

@NiconPhantom: Could I suggest you turn of the language thing and just try a default install of BeP on its own. Then if that works try adding the language thing back in. I have a feeling its maybe something doing something to the form maybe (I can't think of any other reason for this happening). Did you check if the ajax requests where being fired using firebug??[/quote]

Fresh installation works fine! When I use language selector 2, I must move some libraryes and models from /modules/... to aplication/model, library... folder. Maybe error in this operation...

[eluser]Unknown[/eluser]
is this a bug?

\modules\auth\libraries\Userlib.php

/**
* Check a user is logged in
*
* @access public
* @return bool
*/
function is_user()
{
$CI = &get;_instance();

if($CI->session)
{
row 96 ===> $logedin = FALSE;

// If the system is setup to store details in the database
// only do a quick check since the user can't tamper with the values
if(config_item('sess_use_database') === TRUE)
{
$email = $CI->session->userdata('email');
$username = $CI->session->userdata('username');

row 105 ===> $loggedin = ($email !== FALSE && $username !== FALSE);

}
else
{
// Query the database to verify the details are correct
switch($CI->preference->item('login_field'))
{
case 'email':
$check = $CI->session->userdata('email');
break;

default:
$check = $CI->session->userdata('username');
}
$result = $CI->user_model->validateLogin($check,$CI->session->userdata('password'));
row 121 ===> $loggedin = $result['valid'];
}

row 124 ===> if ($loggedin)
{
// Logged in
log_message('debug','BackendPro->Userlib->is_user : User is logged in');
return TRUE;
}
}

// Not logged in
log_message('debug','BackendPro->Userlib->is_user : User is not logged in');
return FALSE;
}

[eluser]adamp1[/eluser]
Yes that does seem to be one. Not a bad one since the value is FALSE I believe by default. Thanks anyway.

[eluser]adamp1[/eluser]
A new version of BackendPro is out. It includes a fix for a major bug fix. It isn't a large fix so if you don't want to overwrite all your changes please see change set [231] in the SVN for the lines you need to update.

[eluser]IamPrototype[/eluser]
Other changes besides that?

[eluser]adamp1[/eluser]
No real big ones maybe 2 other small bug fixes. Its mainly the security issue. You can see the work completed in the Milestone details.




Theme © iAndrew 2016 - Forum software by © MyBB