Skip to Content Skip to Menu

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

[SOLVED] GroupJive Event expiration

  • mjplowcha
  • mjplowcha
  • OFFLINE
  • Posts: 30
  • Thanks: 1
  • Karma: 0
11 years 8 months ago - 11 years 8 months ago #221515 by mjplowcha
Replied by mjplowcha on topic GroupJive Event expiration
I think I see where the trouble I am having is...

from the table gj_plugin_events, the column 'user_id' represents the event creator only.
from the table gj_users, the column 'user_id' represents all group users.

I'm wondering when the data is being called if it is only retrieving the group event creator from the gj_plugin_events table and not the group members from the gj_users table?? Since the column name is the same, but isn't the same info, it might be causing some of the data not to be called... or maybe I am just confused at this process.

On that note, you mentioned "You don't query, ever, in GJ", I don't see any other way around it unless you rename the column and change all of the variables associated with it. If I create a database function to only call the data from gj_users, is it going to kill my site with 100's of users hitting it at once?

*also worth mentioning that 'user_id' in the gj_groups table represents the group creator only and 'user_id' in gj_categories represents the category creator. Lots of tables with the same name representing different values. If I only need the gj_users table data from column 'user_id', how do I achieve that?
Last edit: 11 years 8 months ago by mjplowcha.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #221525 by krileon
Replied by krileon on topic GroupJive Event expiration

from the table gj_plugin_events, the column 'user_id' represents the event creator only.

User ID in the events table is the owner of the event.

from the table gj_users, the column 'user_id' represents all group users.

GJ != CB User. The User ID column links the GJ user to the CB user (it's their CB user id).

On that note, you mentioned "You don't query, ever, in GJ", I don't see any other way around it unless you rename the column and change all of the variables associated with it. If I create a database function to only call the data from gj_users, is it going to kill my site with 100's of users hitting it at once?

I don't see why columns need to change or why you need to query the database directly. The data API lets you supply a $where variable to alter the query as needed. No it's not going to hurt your sites performance. Query count really isn't an issue as long as the queries are fast and cached (data API does this for you). You can do all this with 1 call though, please see my previous reply.

*also worth mentioning that 'user_id' in the gj_groups table represents the group creator only and 'user_id' in gj_categories represents the category creator. Lots of tables with the same name representing different values. If I only need the gj_users table data from column 'user_id', how do I achieve that?

User ID is always their CB user id. It's in relation to what the table represents. Groups table is group rows so user id represents the owner of that group. Again, stay out of GJ database as you're just going complicate and confuse the matter; use the API. I don't know what you're asking in regards to _gj_users; see my previous replies as I've already supplied how to pull a CB users group user row. Again, review the rest of GJ for various other usages of this 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.

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

  • mjplowcha
  • mjplowcha
  • OFFLINE
  • Posts: 30
  • Thanks: 1
  • Karma: 0
11 years 8 months ago #221536 by mjplowcha
Replied by mjplowcha on topic GroupJive Event expiration
B)
Okay.. now I see. I couldn't figure out where you were getting the array functions from. It's all starting to come together now. I could understand what you were suggesting, but I couldn't see anywhere on the module that defined any of the arrays that were being called, so most of it was guess work. Once I figured out where all of this was defined, your suggestion made Way more sense!

Your last bit of code was exactly what I was trying to accomplish. Thanks!!!
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum