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

[eluser]adamp1[/eluser]
@got 2 doodle: First off the typo in auth/libraries/Userlib.php has been added to my fix list. Secondly can I make sure your using the latest version since previous to 0.3.1 there was a issue updating records?

@Amzad Hossain: Please can you try updating to 0.3.1 there was an error I found which meant all recording updating broke. I don't know if it is related to your issue but I know an issue of a similar nature did exist.

Sorry for taking a while to reply, have been at my University graduation cermoney for the last 3 days. Can you let me know about the status of these issues you are having and if 0.3.1 fixes any of them.

[eluser]Amzad Hossain[/eluser]
@adamp1 : Yes i have checked with 0.3.1 for Members' Profile. Still the problem is there. After i changed the function in memebers.php it worked fine.

Thanks for your reply.

I forgot to mention that in 0.2a i had to make change in user_model.php ( funtion getUsers() ) too. But my solution was primitive. I took the code from 0.3.1 and solved it right away.

[eluser]adamp1[/eluser]
OK I will look into this one, thanks.

[eluser]got 2 doodle[/eluser]
Hi Adam version indicated on the admin panel is 0.3.1, this is the first version I have used so no chance of old files.

Congratulations on your graduation! I hope you had fun!

doodle

[eluser]adamp1[/eluser]
OK got 2 doodle I will add it to my to look at list for the next version.

[eluser]got 2 doodle[/eluser]
Hi Adam
Yesterday I got the user profiles function working, this functionality is critical to my application.

I made the modifcation suggested by Amzad Hossain in ~/auth/controllers/admin/members.php

Code:
function _get_profile_details() {
  $data = array();
  if($this->preference->item('allow_user_profiles')) {
      $field_array = $this->config->item('userlib_profile_fields');
      foreach( $field_array as $key => $val )
    $data[ $key ] = $this->input->post( $key );
  }
        
  return $data;
}

Thanks Amzad

I also created the file MY_Userlib.php from Userlib.php and modified the _register function using Amzad's code (slightly modified).
Code:
// Build
            $data['users']['username'] = $this->CI->input->post('username');  
            $data['users']['email'] = $this->CI->input->post('email');
            $data['users']['password'] = $this->encode_password($this->CI->input->post('password'));  
            $data['users']['group'] = $this->CI->preference->item('default_user_group');
            $data['users']['created'] = date("Y-m-d H:i:s",time());  
            // modification to insert data into fields
            $field_array = $this->CI->config->item('userlib_profile_fields');
                      foreach( $field_array as $key => $val ) {
                    $data['user_profiles'][ $key ] = $this->CI->input->post( $key );
                          }
            // end modification //

now we just have to add fields to the database and add those fields to the 'userlib_profile_fields' array

After some tweaking of MY_Userlib.php I have a system that allows a user to register for one of four different groups, each group has different profile fields (same table, just blank fields if not necessary), I can share this if anyone is interested.

I really like the access control functionality, it's very logical, however I don't think that modify permissions is working properly, it seems to have no effect.

Also I previously reported that changing the group of a user gave an error, I would like to add that it does actually change the group even though you get the error.

I also very much like the page class, this is not unlike the way I have previously worked, so for me it is somewhat intuitive, but I don't think I have completely grokked this class or tapped it's power.

All in all this is an excellent piece of work, thanks for all of your hard work and documentation. Thanks also for the numerous comments throughout the code.


doodle

[eluser]PvOostrom[/eluser]
Hi adam,

I have been developing some modules for my site using backendpro, but ran in one rather annoying bug.

When I visit a page which is part of a module (sub-nav item), both menugroups will open.

Screenshot: http://runic-design.nl/media/menu_bug.jpg

Any idea what the cause could be?

[eluser]adamp1[/eluser]
@got 2 doodle: I have added Amzad Hossain change to my list, but I will look further into the profile issues.

@PvOostrom: Thanks for this, it must be an issue with my jQuery plugin confusing the submenus. Did you give a unique ID to the sub-menu? Also could you post your menu code so I can check it?

Don't know when I will get another version out since I am so busy with work at the moment, BeP has taken a bit of a back-seat.

[eluser]PvOostrom[/eluser]
I gave every <li> element an unique id, which made the main nav <li> close. When I tried to give the subnav <li> elements the same id as the main nav <li> it worked like a charm!

Here is the menu for reference.
Code:
<ul id="menu">
    <li id="mnu_dashboard">&lt;?=anchor('admin',$this->lang->line('backendpro_dashboard'),array('class'=>'icon_house'))?&gt;</li>
    &lt;?php if(check('Logboek',NULL,FALSE)):?&gt;
    <li id="mnu_uren">&lt;?=anchor('logboek/admin/logboek','Urenregistratie',array('class'=>'icon_log'))?&gt;</li>
    &lt;?php endif;?&gt;
    &lt;?php if(check('Contents',NULL,FALSE)):?&gt;
    <li id="mnu_contents"><span class="icon_contents">Contents</span>
        <ul>
            &lt;?php if(check('Nieuws',NULL,FALSE)):?&gt;<li id="mnu_contents">&lt;?=anchor('contents/admin/nieuws',"Nieuws",array('class'=>'icon_nieuws'))?&gt;</li>&lt;?php endif;?&gt;  
            &lt;?php if(check('Portfolio',NULL,FALSE)):?&gt;<li id="mnu_contents">&lt;?=anchor('contents/admin/portfolio',"Portfolio",array('class'=>'icon_shield'))?&gt;</li>&lt;?php endif;?&gt;  
        </ul>
    </li>
    &lt;?php endif;?&gt;

    &lt;?php if(check('System',NULL,FALSE)):?&gt;
    
    <li id="mnu_system"><span class="icon_computer">&lt;?=$this->lang->line('backendpro_system')?&gt;</span>
        <ul>
            &lt;?php if(check('Members',NULL,FALSE)):?&gt;<li id="mnu_system">&lt;?=anchor('auth/admin/members',$this->lang->line('backendpro_members'),array('class'=>'icon_group'))?&gt;</li>&lt;?php endif;?&gt;  
            &lt;?php if(check('Access Control',NULL,FALSE)):?&gt;<li id="mnu_system">&lt;?=anchor('auth/admin/access_control',$this->lang->line('backendpro_access_control'),array('class'=>'icon_shield'))?&gt;</li>&lt;?php endif;?&gt;  
            &lt;?php if(check('Settings',NULL,FALSE)):?&gt;<li id="mnu_system">&lt;?=anchor('admin/settings',$this->lang->line('backendpro_settings'),array('class'=>'icon_cog'))?&gt;</li>&lt;?php endif;?&gt;  
        </ul>
    </li>
    &lt;?php endif;?&gt;
</ul>

Thanks again Adam!

[eluser]adamp1[/eluser]
I see what you mean, I think I have missed the id's from the menu itmes. Only issue I can see is an ID is meant to be unqiue, having multiple things with the same ID causes invalid HTML.




Theme © iAndrew 2016 - Forum software by © MyBB