Module CB content or CB list ?

1 year 8 months ago #330378 by crony
Module CB content or CB list ? was created by crony
Hello,
I'd like to make a very simple list of users registered in the last 30 days.
I'd like also to add the amount of their contribution as donation with CB Sub. But I don't know how to catch this amount.

I've tried the module CB content first, but the tags (just tested with [name] to start) renders the name only while the user is connected...
I also tried with CB lists, witch seems easier, but tried to order by register date "less than" "30" , tried also 30 days, failed.
Tried this query : u.'registerDate' < NOW() - INTERVAL 30 DAY
as a free filter, but failed :(

Other problem with this list are the other filtering fields that I don't want. I could use a CSS to hide some fields, that would be okay, but I also need to put this list into a module (I could use regularlab to load component also)
 
Final issue, I'd like this amount donated to be mutiplied by x (and it will be different for each plan) and then this variable will be stored also on the user profile, it will be some an equivalent of points.
Let's say 1€ = 1000 points.

Lots of questions I know, sorry for that, hope you can help me a bit !
Thanks a lot !

J! 4.x - CB 2.7.3

Please Log in to join the conversation.

1 year 8 months ago #330389 by krileon
Replied by krileon on topic Module CB content or CB list ?

I've tried the module CB content first, but the tags (just tested with [name] to start) renders the name only while the user is connected...
I also tried with CB lists, witch seems easier, but tried to order by register date "less than" "30" , tried also 30 days, failed.
Tried this query : u.'registerDate' < NOW() - INTERVAL 30 DAY
as a free filter, but failed

An advanced filter against the registration date will work fine for that. Advanced filters are just SQL so feel free to test the SQL in phpmyadmin until you have the results you need.

Other problem with this list are the other filtering fields that I don't want. I could use a CSS to hide some fields, that would be okay, but I also need to put this list into a module (I could use regularlab to load component also)

I assume you mean the search criteria? You can completely customize that under Parameters > Search.

Final issue, I'd like this amount donated to be mutiplied by x (and it will be different for each plan) and then this variable will be stored also on the user profile, it will be some an equivalent of points.
Let's say 1€ = 1000 points.

I assume you already have the donation amount stored in profile in which case a Code field provided by CB Code Field would need to be used to perform your math using PHP. If not you can query for their donations from the CBSubs database tables using a Query field provided by CB Query Field and also perform your math in the query.


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.173 seconds

Facebook Twitter LinkedIn