Auto profile search

8 years 3 weeks ago #280778 by pranaydhruv
Replied by pranaydhruv on topic Auto profile search
Hello Kyle,

the table you mentioned i only see one id reflecting till the end of the table andi can't see any rules in there.i see you mention i need to use API , but how do i do that if i want to check the privacy preference of users for their Profile pic?



Thanks
Pranay
Attachments:

Please Log in to join the conversation.

8 years 3 weeks ago #280780 by krileon
Replied by krileon on topic Auto profile search

the table you mentioned i only see one id reflecting till the end of the table andi can't see any rules in there

The rule is under the rule column. For example the first row says "User 849 has the Profile Tab 7 set to Public (0)".

i see you mention i need to use API , but how do i do that if i want to check the privacy preference of users for their Profile pic?

You'd use getFields API or substitute in the HTML value of the avatar field. If privacy is blocking the field it'll return/output nothing.

getFields API:
www.joomlapolis.com/support/tutorials/120-api-usage/18361-obtaining-field-values-through-getfields-api

Substitution:
[cb:userfield field="avatar" /]

Both usages will work in a code action or code field.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

8 years 3 weeks ago #280782 by pranaydhruv
Replied by pranaydhruv on topic Auto profile search
The rule is under the rule column. For example the first row says "User 849 has the Profile Tab 7 set to Public (0)".

in my privacy table there is only one user showing , not sure why ?


You'd use getFields API or substitute in the HTML value of the avatar field. If privacy is blocking the field it'll return/output nothing.

I have a .php file saved in a folder in www directlry from where this code is running,

1) which folder should I put this file in to get access to CB API ?
2)i will point this file to cron once this completes, doing this through a fieldd how would i run this query and email users ?

Please Log in to join the conversation.

8 years 3 weeks ago - 8 years 3 weeks ago #280784 by krileon
Replied by krileon on topic Auto profile search

in my privacy table there is only one user showing , not sure why ?

There's 1 row per privacy protection. So if you've 20 tabs protected that's 20 rows per user. You likely have multiple pages in phpmyadmin and it'll only show so many entries per page.

I have a .php file saved in a folder in www directlry from where this code is running,

1) which folder should I put this file in to get access to CB API ?
2)i will point this file to cron once this completes, doing this through a fieldd how would i run this query and email users ?

Then you can't use the API. Your code needs to be executed from within Joomla/CB to have access to APIs. Use a Code action in CB Auto Actions or a Code field depending on your needs. Since you need emails and other processing then using a Code action in CB Auto Actions would be best. Set triggers to None then you can manually execute the action via it's URL under the Global tab of the action.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

8 years 3 weeks ago #280789 by pranaydhruv
Replied by pranaydhruv on topic Auto profile search
hello Kyle,

If i establish the $user on that PHP file is it not possible even then ? is there no folder within which i can put this file and it gets included in cb automatically ?

Thanks
Pranay

Please Log in to join the conversation.

8 years 3 weeks ago #280792 by krileon
Replied by krileon on topic Auto profile search
You can't establish a user object because you've zero access to Joomla or CB APIs. You're executing a file entirely outside of Joomla and CB scope. Why do you need it to be a file when you can put your code directly in the Code action. You could also do an include in a Code action and should then be able to use APIs.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.167 seconds

Facebook Twitter LinkedIn