Recent Posts

Pages: [1] 2 3 ... 10
1
Announcements / Mibew Messenger 3.2.5 has been released!
« Last post by faf on December 03, 2019, 05:18:56 PM »
Hi!

A new version of Mibew Messenger has been released and is available here: https://mibew.org/download2

The release is related to security issue in the third party component used in the project, so update is recommended.
2
Support / Re: Custom Question in PreChat Survey & Not saving user data
« Last post by polifroeg on October 20, 2019, 01:26:13 AM »
Thank you for your reply, I'll try the plugins, Thank you so much!
3
Support / Re: Custom Question in PreChat Survey & Not saving user data
« Last post by faf on October 09, 2019, 08:03:44 PM »
Have you took a look at the plugins?

If I've got you right seems like your second problem could be solved using Mibew:PurgeHistory plugin.

As of your first problem, there are at least three ways to do something alike:

1. Use 'Initial question' field in the pre-chat survey form to ask a question in arbitrary form. Just alter the title of the field using translation interface.

2. Use 'Privacy policy' link in the pre-chat survey form to provide a link to an external survey. Just alter the appropriate inscription using translation interface.

3. Use Mibew:AutoReply plugin to ask initial question directly in a chat.
4
Support / Custom Question in PreChat Survey & Not saving user data
« Last post by polifroeg on October 08, 2019, 01:25:13 AM »
Hi There,

It is very important to my service that we be able to ask callers a question at the beginning of the call, if there could be a way to ask a custom question, we'd really appreciate it. If not, perhaps a way to have a default opening message that links an external survey would be really appreciated.

Another issue we have is the automatic saving of user data, if possible we'd love for no data to be saved.

Thank you so much in advance, any info or tips at all would be greatly appreciated.
5
Support / Re: Modify Mibew to use SAML
« Last post by faf on September 27, 2019, 09:48:43 PM »
To begin with, I'd implement third-party authentication that way:

In run():

Code: [Select]
$dispatcher = EventDispatcher::getInstance();
$dispatcher->attachListener(Events::OPERATOR_AUTHENTICATE, $this, 'checkAuth');

And your checkAuth method should looks somehow like that:

Code: [Select]
public function checkAuth(&$args)
    {
        $request = $args['request'];

        $login = $request->request->get('login');
        $password = $request->request->get('password');
        $operator = operator_by_login($login);

        if ((!$operator || ($operator['vcpassword'] === 'auth_by_remote_service')) && $login && $password) {

               // dummy part
               // do something and get auth result
               // ...
               $result = true;
               // ...
               // end of dummy part

               if (!$result) {
                       return;
               }
           
                if (!$operator) {
                       $operator = create_operator($login, '', '', '', '', '', '');
                       $operator = operator_by_login($login);
                       $operator['vcpassword'] = 'auth_by_remote_service';
                       update_operator($operator);
                }
                else {
                       update_operator($operator);
                }
           
                $args['operator'] = $operator;
        }

Of course it's just a quick'n'dirty concept to illustrate the basic idea.

And if you need an URI related to Mibew, why won't you make use of the very same request object? $request->getUri() will do the job. You'll be able to redirect an operator to the very same page he originally requested.
6
Support / Re: Modify Mibew to use SAML
« Last post by mscherst on September 26, 2019, 12:57:30 PM »
I'm hitting a block here, and it's the same basic issue for two things I need to accomplish.

First, as I stated above, I need to generate a url inside of the plugin, using something like:

Code: [Select]
$this->getRouter()->generateUrl('home');
Second, after my third-party authentication service has returned a successful response, I need to do something similar to what's happening in Mibew\Controller\LoginController:

Code: [Select]
$this->getAuthenticationManager()->loginOperator($operator, $remember);
While I have some experience with scripting in php, I'm new to app development, and Symfony in particular.  That last line of code responds with an error:

Quote
PHP Fatal error:  Uncaught Error: Call to a member function loginOperator() on null

I see in index.php, an application object is created after first creating a router:

Code: [Select]
$application = new Application($router, new AuthenticationManager());
Is there a way, from inside a plugin (either Plugin.php or inside a controller) to access this Application object?  A brief example would be very helpful.
7
Support / Re: Modify Mibew to use SAML
« Last post by faf on September 24, 2019, 07:37:37 PM »
Well, usually 'hosturl' setting holds a value of URL of a site, not the basic URL of Mibew itself. So your second option is simple, but if you need some specific URL for some page in the administrative interface you'd better use router object. But in that case don't forget that the plugin should also implements \Mibew\Plugin\PluginInterface anyway.
8
Support / Re: Modify Mibew to use SAML
« Last post by mscherst on September 23, 2019, 08:52:07 PM »
Actually, since I really just need the hosturl and not the specific route, I think I can do this:

use Mibew\Controller\AbstractController;

Code: [Select]
use Mibew\Settings;

class Plugin extends \Mibew\Plugin\AbstractPlugin implements \Mibew\Plugin\PluginInterface
{
    protected $hosturl = Settings::get('hosturl');
    ...
}
9
Support / Re: Modify Mibew to use SAML
« Last post by mscherst on September 23, 2019, 05:17:31 PM »
Thanks for the response.  I know this was a while ago, but I appreciate the help.

I've already completed one of my plugins, so I have some familiarity with how it works.  That one just used a Plugin.php file to attach an event listener to some of the group events.

For this, I've set up a Plugin.php file with an event listener on the OPERATOR_AUTHENTICATE event.  In that function, one of the parameters I need to pass into the authentication service is a redirect URL, which I think will just be /home (but the particular route doesn't matter).

I know that if I was using a Controller/Controller.php file that extends AbstractController, I could use $this->generateUrl().  Since I have no other need for routing, and I don't require a routing.yml file, I'm not exactly sure how to move forward.

I wonder if maybe I should do something like (still in Plugin.php):

Code: [Select]
use Mibew\Controller\AbstractController;

class Plugin extends \Mibew\Plugin\AbstractPlugin implements \Mibew\Plugin\PluginInterface
{
    $router = AbstractController::getRouter();
   
    ....
    public function myAuthListener()
    {
        $url = $router->generateUrl('home');
    }
}

Thanks
10
Support / Re: Upgrade Failure: Query failed: Unknown column 'initialized' in 'field list'
« Last post by faf on September 20, 2019, 03:05:31 PM »
You could try to upgrade from 2.1.0 to 2.2.0 first. And then proceed with further steps.

p.s. There are no Mibew Messenger 2.10 and 3.24. It's 2.1.0 and 3.2.4 accordingly.
Pages: [1] 2 3 ... 10