Approval

DebbieS

DaDaBIK Guru
Not sure what you mean (or where) by admin control panel. Any specific location? Do you mean the interface configurator?
Sorry for all the questions, but I don't know where a move/approval function would be useful in the admin area.
 

meanster99

Well-known member
Sorry Debbie, no I mean the admin home page. Where you can select to enable functions for each table (delete, edit, insert, details etc). I want to add my new 'Move' function as a extra tickbox there, so that I can have it enabled for one table only. I managed to find the code that creates the tickboxes and I added one for 'move' OK but I obviously didn't find all the code I need to change because when I checked the new 'move' tickbox and I clicked enable it didn't do anything.

I realise there are probably quite a few places the code needs adding to/changing to add an extra (working!) tickbox on the admin home page - was really just looking for help with pinning it all down.

Thanks,

Matt
 

DebbieS

DaDaBIK Guru
Oy ... At first I thought this might be a nice thing to add to my installs, but after looking at what is involved, I'm not interested.

However, if you still wish to proceed, you will need to check the following:
  • admin.php - add checkbox
  • admin.php - locate the case "enable_features": section - you need to add your move variable in there (many spots)
  • business_logic.php - sections for creating new dadabik tables and the dadabik control tables needs to have the new info in it - primarily the code that creates the table_list table
  • database table(s) - *_table_list table needs to have the field "enable_move_table" added so the checkbox and admin page knows where to write the data
  • other files - you may need to alter other files which display the move icon to do checks the same way they do for edit/delete/etc.

There may be more - this is just what I could find so far. Yikes!
I'm happy with leaving it as I've got mine by allowing the move based on the table name name since I only allow it for one or two.

If you just want to limit which table you allow it for, why not just add that code into the function build_results_table? Something like if $table_name == "tableA", then to move icon and function. If $table_name == "tableB", then offer delete function. That is what I've done in my installs. Could doing it this way work for you?
 

meanster99

Well-known member
Hi Debbie,

Thanks so much for taking the time to look into this for me! Yes, it is a lot of work and I gave up when it didn't work anyway - think all I forgot to do was add the field to the dadabik table. Doh!

Anyway, I only want the move function enabled for 2 tables, so your workaround seems perfect for me and would be much easier to deal with if I ever have to re-install or upgrade etc. Would it be possible for you to provide a little more detail as to what code I need to add, as I am a relative newbie to this?

I really appreciate all your help so far and look forward to hearing from you!

Many thanks,

Matt
 

meanster99

Well-known member
OK that was as easy as it looked (having reread your email and deciding to try what you said!).

Many thanks for all your help.

Matt
 
Top