Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Alpha User Point Rule "Submit an Article" does not work with CB Blogs

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
8 years 11 months ago #272933 by krileon
You'd use a Code action with Method set to PHP. You'd then use AUPs API to store points.


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.
The topic has been locked.
  • haidinh
  • haidinh
  • OFFLINE
  • Posts: 94
  • Thanks: 8
  • Karma: 0
8 years 11 months ago #272941 by haidinh
Hi Krileon,

Thank you for your assistance. I will try to do it.

By the way the Alpha User Point developer told me that he want to have a look on "the trigger function "onContentAfterSave" placed in CB code when creating CBblogs.

Can you help me to show him which file it locates so that that he can improve his rule for CBblog?

Thank you very much and regards,

Hai
The topic has been locked.
  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
8 years 11 months ago - 8 years 11 months ago #272965 by krileon
CB Blogs doesn't fire that trigger directly. It does a ->store on a Joomla content object, which is what fires the trigger. CB Blogs uses the following.

Code:
$article = JTable::getInstance( 'content' );

Once the data is bound it it calls ->store, which its behavior can be found in the below.

libraries/legacy/table/content.php

This then calls ::store of its parent found below.

libraries/joomla/table/table.php

Which is responsible for the trigger as follows.

Code:
$this->_observers->update('onAfterStore', array(&$result));


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.
Last edit: 8 years 11 months ago by krileon.
The topic has been locked.
  • haidinh
  • haidinh
  • OFFLINE
  • Posts: 94
  • Thanks: 8
  • Karma: 0
8 years 11 months ago #272997 by haidinh
Thank you very much, Krileon
The topic has been locked.
  • haidinh
  • haidinh
  • OFFLINE
  • Posts: 94
  • Thanks: 8
  • Karma: 0
8 years 11 months ago #273424 by haidinh
Hi Krileon,

I forwarded the information to AUP developer but it seems he cannot improve his rule for CBblog.

I myself tried to use CB AutoAction to create a trigger but it is really difficult for me. So can you help me to do that? What I really need is creating a trigger that assign points to a user who post a CBblog. And the points will be stored in alpha user point system.

And I am willing to pay for that trigger and codes.

Thank you and regards,

Hai
The topic has been locked.
  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
8 years 11 months ago #273455 by krileon
You need to use the cbblogs_onAfterCreateBlog trigger with a Code action and Method set to PHP so you can utilize AUP API to assign points. Beyond that I can't suggest anything further as I am not familiar with AUP API.


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.
The topic has been locked.
Moderators: beatnantkrileon
Powered by Kunena Forum