FOP2Admin for FreePBX 2.2.1

  1. 14 years ago

    Hi,

    I have successfully installed fop2admin into freepbx2.2.1, and since then the missing extension buttons issue had already been resolved.

    Now, I have another issue, and this issue concerns the logic of the function fop2_all_freepbx_buttons()
    in functions.inc.php.

    Whenever I want to maintain the buttons in the Fop2 Buttons screen, it will always display all the buttons directly from the two tables devices & users? As a result, this is very difficult for me manage the buttons since I can't delete anything from FOP2 Buttons screen. Why can't we just link the table fop2buttons together with table fop2users instead of linking tables devices & users with fop2buttons and let FOP2 Buttons module to extract users directly from fop2users instead of from tables devices&users? So that whenever I want to hide any buttons from displaying, I can simply go to FOP2 Users module to delete the user from there. If any new extension created in freepbx, the FOP2 Users module should able to detect and insert new record into the table fop2users, so that I can manually manage them at FOP2 Users screen. Don't you find that this should be the way to manage buttons more efficient? The purpose for the FOP2admin is to maintain the buttons, right?

    Best Regards,
    Chu

  2. Hi guy,

    I have realised that the caching in the folder /usr/local/fop2/temp is causing problem!
    I have manually deleted some buttons from table fop2buttons, but when I went to the panel, they are still there?

    I have stop and restart service FOP2, but to no avail.
    Then I stop the FOP2 service again and delete the cache file and restart the FOP2 service.
    I went to the panel and now the buttons are displayed correctly?

    So, I have no choice but to include a statement in /etc/init.d/fop2 script to delete the cache when I restart the FOP2
    service to ensure that the buttons are shown correctly.

    Cheers!
    Regards,
    Chu

  3. admin

    17 May 2010 Administrator

    Hi Chu,

    The FreePBX module is for version 2.5 and up. Your patches/changes might be good to have it running on older versions, have not really tried. But I do not understand what you describe here, there is no cache for fop. Configs are generated, saved on temporary files, read into memory and removed the temp files...

    Best regards,

  4. Hi Nicolas,
    There is cached file in par-root for my case (Remember you told me to create such folder due to noexec fop2 service to start in my server?)

    Here is the cached file:
    # ls
    cache-f0a3f11efb4858d29f477772e1bc9d218df72f95

    Anyway, I have done completely and I have fixed the checkbox issue, and now I can see what are those extensions buttons which I selected previously whenever I click to edit the group on the right in FOP2 Group. I have done that by adding the following codes into page.fop2groups.php.

    Codes:
    $results = fop2_get_group($itemid);
    if (($datarray['group']==$results['name']) && ($results['name']!="")) {
    echo "<td><input type=checkbox CHECKED name='includebot[]' value='".$devname."'";
    } else {
    echo "<td><input type=checkbox name='includebot[]' value='".$devname."'";
    }

    Cheers!
    Chu.

  5. admin

    18 May 2010 Administrator

    Hi Chu,

    The cache does not hold any configuration data. So, buttons are NOT stored there. I belive you have some confusion regarding the admin module, mixing users with buttons. They are separate entities, there is no reason to have them bonded together... Anywyas it seems you got it working to your liking, and that is more than good.

    Best regards,

or Sign Up to reply!