Skip to Content Skip to Menu

Community Builder Plugin: CustomUserlist Usage

12 years 8 months ago - 12 years 8 months ago #189181 by scfusanorth
I have a community style website ussrichardebyrd.com crew roster that has former crew of the ship as members. These members enter what year they arrived, and departed the ship as part of the registration process. I would like to create a custom user list that will display, to the current logged in member, the members that were on-board the ship during the same years the current logged in member was on the ship. I also eventually have dreams of possibly having a (Ajax?) form field, with radio buttons, so that that visitors could see who was on board during the years selected using the radio buttons.

The two jos_comprofiler fields are named cb_yeararrived, and cb_yeardeparted. The date ranges are from 1963 to 1990, but the year 1990 is represented by the word Decom, for Decommissioned.


Here is the math.

SELECT * FROM 'jos_comprofiler' WHERE logged in user cb_yeararrived <= @member cb_yeardeparted AND logged in user cb_yeardeparted >= @member cb_yeararrived


I did get this working in phpMyAdmin and tried to insert it in the customuserlist plugin, but it appears that the plugin is tied at the hip with the regular user list, so that will not work, since I still need the original user list too.

SELECT * FROM `jos_comprofiler` WHERE '1980' <= `cb_yeardeparted` and '1982' >= `cb_yeararrived`


I sure could use some bones on how to do this. I have a basic understand of sql statements, and phpMyAdmin.

One big question I have is how do I represent the current logged in user in an sql statement?

Where I find good examples of stuff like this.

Thanks Jason
Last edit: 12 years 8 months ago by scfusanorth.

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

Moderators: beatnantkrileon
Powered by Kunena Forum