Extension Chat - Condition

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
DGarza
User
Posts: 134

Extension Chat - Condition

Post by DGarza »

Hi everyone, I have 2 questions:

1.- Is there any way to activate the chat not to the whole table of users, that is activated depending on the user level, the chat appears?

2.- Also I would like to know, if there is a way that instead of showing the whole list of users, it only shows the users with admin level or the user level that I want?

Thank you.


arbei
User
Posts: 9719

Post by arbei »

  1. You may use LoginStatusEvent to set the $event["canChat"] value, see Event Listeners -> Example 6,
  2. You may use another table/view of users for the chat extension, see Chat -> Set up Extension -> Note.

DGarza
User
Posts: 134

Post by DGarza »

arbei wrote:

  1. You may use LoginStatusEvent to set the $event["canChat"] value, see Event Listeners -> Example 6,

This work perfectly.

  1. You may use another table/view of users for the chat extension, see Chat -> Set up Extension -> Note.

But here, it works weird, I don't know if it has something to do with it being a view or whatever, but for example I created a view of the main Users table, and I am only getting if the UserLevel = x, the view brings me the info well, for example in this case there are only 2 records, well for some strange reason in the chat contact list, when I search both records separately, I only get 1 record and the other when I search it doesn't bring it to me.

Then I am not sure if it does not like the views with little info, because for the tests that I am doing, if it brings a lot of info, I dont know, more than 20 records, if it brings me everything, or if I use the main users table


arbei
User
Posts: 9719

Post by arbei »

If you use a view, make sure you select the user table only, or you cannot update/insert.


DGarza
User
Posts: 134

Post by DGarza »

arbei wrote:

If you use a view, make sure you select the user table only, or you cannot update/insert.

Thanks, for response, and yes I did, only de User main table


Post Reply