Skip to Content Skip to Menu

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

Automaticly add registration information to a database

  • crashtest
  • crashtest
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
11 years 2 months ago #231846 by crashtest
Hi,

I would like to have a system that automaticly add user informations (username, password,...) to a database.
The database could be from a joomla component not integrated in CB or from a voice chat software (mysql databases).

I was thinking that auto action plugin could do this but I don't undestand how it works.

thanks.

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
11 years 2 months ago #231847 by nant

crashtest wrote: Hi,

I would like to have a system that automaticly add user informations (username, password,...) to a database.
The database could be from a joomla component not integrated in CB or from a voice chat software (mysql databases).

I was thinking that auto action plugin could do this but I don't undestand how it works.

thanks.


Yes, a Query action can do this.

Please see the references in latest announcement for assistance:

www.joomlapolis.com/news/18380-cb-auto-513-released-with-cron-job-urls-and-more-actions

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

  • crashtest
  • crashtest
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
11 years 2 months ago - 11 years 2 months ago #232019 by crashtest
Thanks for this links, now I understand how auto actions work.

So I'm doing a query type auto action with the tigger gj_onAfterCreateGroup and internal mode :
Code:
INSERT INTO ma_comjoomla (d_name, d_logo) SELECT name, logo FROM ma_groupjive_groups ORDER BY id DESC LIMIT 1

And I have a problem the value of the logo is not insert in d_logo it only work with name and d_name.

If I unpublish my auto action, create a new group, make the same query directly by using phpmyadmin it works.

Any idea for that?

Thanks.
Last edit: 11 years 2 months ago by crashtest.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 2 months ago #232020 by krileon
Your query isn't specific enough. You're just grabbing the first row that's returned from querying the entire groups database table. If you want to insert a row with the current groups information you'd use the below.
Code:
INSERT INTO `#__comjoomla` ( `d_name`, `d_logo` ) VALUES ( '[var1_name]', '[var1_logo]' )

var1 of gj_onAfterCreateGroup contains the GJ Group object. var2 contains the GJ Category object. var3 contains the current users CB user object. var4 contains the GJ plugin object.


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.

  • crashtest
  • crashtest
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
11 years 2 months ago - 11 years 2 months ago #232044 by crashtest

krileon wrote: var1 of gj_onAfterCreateGroup contains the GJ Group object. var2 contains the GJ Category object. var3 contains the current users CB user object. var4 contains the GJ plugin object.

Where can I find this kind of informations? Should I have to be a developer member?

Even whith this code I always have the second value not inserted.
Last edit: 11 years 2 months ago by crashtest.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 2 months ago #232067 by krileon

Where can I find this kind of informations?

In the source code where the trigger is fired. Most of GJs triggers are in cbgroupjive.class.php.

Should I have to be a developer member?

No, you just have to review source code. It helps to have an IDE or a GREP program so you can search the contents of an entire plugin for the trigger so you can find where it's located and review what variables it has.

Even whith this code I always have the second value not inserted.

The logo is always null with that trigger, because the logo has to be uploaded after the group is actually created as it needs its group id for creating the folder path. You'll need to use gj_onAfterUpdateGroup if you want the logo (has the same variables as gj_onAfterCreateGroup).


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.

Moderators: beatnantkrileon
Powered by Kunena Forum