Skip to Content Skip to Menu

alpha user point CB friend rule

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 9 months ago #239309 by krileon
Replied by krileon on topic alpha user point CB friend rule
onAfterAcceptConnection is fired after you accept their connection request. You would need to use onAfterAddConnection for when they add a connection request to you. You'll need to condition it to ensure they're trying to connect with you though otherwise it'll fire your action no matter who they're trying to connect with. See the trigger tutorial below for trigger variables and renew input descriptions carefully for usage information.

www.joomlapolis.com/support/tutorials/120-api-usage/18358-using-cb-triggers

Again, I don't have a clue if the above AUP code will even work. I do not work for AUP. I did not develop AUP. I do not know how to use AUP API. The example is just based off their documentation. Consult with AUP for AUP API usage.


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 or Create an account to join the conversation.

10 years 9 months ago - 10 years 9 months ago #239356 by thewebsurfer
Replied by thewebsurfer on topic alpha user point CB friend rule
thanks a lot anyway.

but i'm tryng to learn autoaction for friendship events.
i set an action in this way:
type: code
triggers: onAfterAcceptConnection,onAfterAddConnection
access: all
method: html
code: <script>alert("friend alert");</script>
return: echo

i dont get any alert. What i'm doing wrong?


edit: the method is the issue, html works for me, but how can i execute a php script like a the AUP? i tried php eval and php create function with the code:
echo "<script>alert("friend alert");</script>";
for verify php execution..but it didnt work
Last edit: 10 years 9 months ago by thewebsurfer.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 9 months ago #239402 by krileon
Replied by krileon on topic alpha user point CB friend rule
Those two triggers don't have any HTML output. You're not going to see anything output when you do an alert. All code is also contained inside of ob_clean to prevent stopping errors when using custom coding.

Your echo is not going to output due to it being contained in ob_clean. You need to adjust the return handling for the usage (parameter below the Code parameter) if you want it to output whatever your code returns.

For PHP code you set the method to one of the PHP methods. Create function PHP method is often the best as a lot of hosts disable eval. Again, you need to write working functional PHP for it to do anything of course, which I can not help you with.


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 or Create an account to join the conversation.

10 years 9 months ago - 10 years 9 months ago #239430 by thewebsurfer
Replied by thewebsurfer on topic alpha user point CB friend rule
i almost made it, just a little more patience :D

the events are still onAfterAcceptConnection,onAfterAddConnection,
in autoaction type=code how can i retrieve the userid of the user who get the friend request?
this is a CB request, not aup ;)
Last edit: 10 years 9 months ago by thewebsurfer.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 9 months ago #239487 by krileon
Replied by krileon on topic alpha user point CB friend rule

in autoaction type=code how can i retrieve the userid of the user who get the friend request?

You can use substitutions in your code. So for user id you'd use [user_id]. Please see the below tutorial regarding substitution usage.

www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb


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 or Create an account to join the conversation.

10 years 9 months ago - 10 years 9 months ago #239518 by thewebsurfer
Replied by thewebsurfer on topic alpha user point CB friend rule
[user_id] is the id of the user who make the request, i need the id of the user who get the request..
how can i get this?
Last edit: 10 years 9 months ago by thewebsurfer.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum