Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Database tables pertaining to private groups and group admin username displ

10 years 2 months ago
  • Bruce's Avatar
    Topic Author
  • Bruce
  • Offline
  • Fresh Boarder
  • Posts: 22
  • Thank you received: 1
Licenses:
JomSocial Expired

Can you please tell me what database table(s) are related to making a group private? And also what table(s) are related to displaying a group's admin/owner username on the group profile page next to the Group Admin heading?

I have JPayPlans setup to create a new group upon registration, but I need to figure out how to make that group private, and get the group owner's username to display on the group profile page. Knowing what tables are involved might help me to find a solution.

Thanks for your help,
Bruce

10 years 2 months ago
Licenses:

Hi Bruce,

database table for making a group private:

table: #_community_groups 
field: approvals = 1
for public approvals = 0

table for displaying a group's admin/owner username on the group profile page next to the Group Admin heading:
table: #_users 
field: name

FYI: (#) is table prefix

Cheers,
Albert

The following user(s) said Thank You: Bruce
10 years 1 month ago
  • Bruce's Avatar
    Topic Author
  • Bruce
  • Offline
  • Fresh Boarder
  • Posts: 22
  • Thank you received: 1
Licenses:
JomSocial Expired

Thanks Albertus,

I got the private group working.
But I still can't figure out why the username isn't working correctly. For a couple of registrations the username displays on the private group's profile below the Group Admin heading, on others it doesn't.

I am also having a problem with the confirmation link in the email sent to the new registrant. When I click it, I'm sent to a page with the message, "There is no such task provided." in the mainbody area of the page. Do you think this could be a part of the problem? Is there something extra that happens when the user confirms, besides being activated?

Anyway, I manually activated the Joomla User, but that didn't fix the Group Admin display. I've confirmed that the user is in the JS Member list. And I've confirmed that the user's Subscription is Active in JPayPlans. And I've also confirmed that the user is the assigned Group Admin in JS Groups.

Here are the mySQL INSERT statements I'm using in JPayPlans for the registration (including the JPayPlans tokens):

INSERT INTO `#__community_groups`( `ownerid`, `categoryid`, `name`,`description`,`website`,`approvals`,`published`,`membercount`,`created`) VALUES ([[USER_USER_ID]],6,"[[USERDETAIL_CFAFFILIATENAME]]","Challenge group for athletes of [[USERDETAIL_CFAFFILIATENAME]]\.","[[USERDETAIL_WEBSITE]]",1,1,1,CURDATE());

INSERT INTO `#__community_groups_members`(`groupid`,`memberid`,`approved`,`permissions`) SELECT count( * ),[[USER_USER_ID]] ,1,1 
FROM `#__community_groups`;

INSERT INTO `#__community_fields_values`(`id`,`user_id`,`field_id`,`value`) VALUES ([[USER_USER_ID]],16,"[[USERDETAIL_CFAFFILIATENAME]]");

I'm not clear if the third statement for #community_fields_values is actually doing anything, or if it is necessary. I just added it last night and haven't fully checked it.

Am I missing something which would enable the consistent display of the Group Admin username? I've submitted site credentials for you. Site is a development site.

Thanks,
Bruce

10 years 1 month ago
Licenses:

Hi Bruce,

I want to check your site but i can't find any credentials at Site Info. I need that.

#__community_fields_values is related with #__community_fields, that for user profile.

Cheers,
Albert

10 years 1 month ago
  • Bruce's Avatar
    Topic Author
  • Bruce
  • Offline
  • Fresh Boarder
  • Posts: 22
  • Thank you received: 1
Licenses:
JomSocial Expired

Hi Albert,

That's troublesome, because I definitely submitted them, though the site name wasn't available in the pulldown menu so I had to choose what was available in order to submit the form.

I'll see if it gives me the form again upon submitting this reply. [It did, and I've re-added the admin credentials.]

Bruce

10 years 1 month ago
  • Bruce's Avatar
    Topic Author
  • Bruce
  • Offline
  • Fresh Boarder
  • Posts: 22
  • Thank you received: 1
Licenses:
JomSocial Expired

Bruce wrote: Thanks Albertus,
I am also having a problem with the confirmation link in the email sent to the new registrant. When I click it, I'm sent to a page with the message, "There is no such task provided."

This is solved. In JPayPlans there is an app called One Click Checkout which I had enabled. Doing so was interfering with the JPayPlans JomSocial registration app function. Vivek from JPayPlans disabled it and the confirmation now works properly — though it is the long 3 or 4 page JomSocial registration process.

10 years 1 month ago
  • Bruce's Avatar
    Topic Author
  • Bruce
  • Offline
  • Fresh Boarder
  • Posts: 22
  • Thank you received: 1
Licenses:
JomSocial Expired

Albertus wrote: table for displaying a group's admin/owner username on the group profile page next to the Group Admin heading:

table: #_users 
field: name

Albert,

With regard to displaying the username under the Group Admin heading, I would think that in JS, instead of the "name" field value, it would be related to the ownerid number in #_community_groups and then based on that, pulling the value for username from the #_users table?

But inspite of the JS group and new owner user being created, it isn't displaying the username. What am I missing?

Also, in my insert statement for #_community_groups, do I need to include some kind of a default params value to also be inserted into the #_community_groups table? The new groups created during the JPayPlan registration currently have the following as the value for params:
{"stream":1}
Here is the params value which is in the only group record which actually displays its owner's username (which was created manually in JS, not with my JPayPlans app):
{"discussordering":"0","photopermission":"2","videopermission":"-1","eventpermission":"1","grouprecentphotos":"6","grouprecentvideos":"6","grouprecentevents":"6","newmembernotification":"1","joinrequestnotification":"1","wallnotification":"1","groupdiscussionfilesharing":0,"groupannouncementfilesharing":0,"stream":1}
Do I need to include that in my INSERT statement for #_community_groups (with escapes)?

10 years 1 month ago
Licenses:

Hi Bruce,

about owner group username. after I deep dive with your site. I found the problem at your MySQL insert statement for 'community_groups_members' table.

your insert statement:

INSERT INTO `#__community_groups`( `ownerid`, `categoryid`, `name`,`description`,`website`,`approvals`,`published`,`membercount`,`created`) VALUES ([[USER_USER_ID]],6,"[[USERDETAIL_CFAFFILIATENAME]]","Challenge group for athletes of [[USERDETAIL_CFAFFILIATENAME]]\.","[[USERDETAIL_WEBSITE]]",1,1,1,CURDATE());

INSERT INTO `#__community_groups_members`(`groupid`,`memberid`,`approved`,`permissions`) SELECT count( * ),[[USER_USER_ID]] ,1,1 
FROM `#__community_groups`;

INSERT INTO `#__community_fields_values`(`id`,`user_id`,`field_id`,`value`) VALUES ([[USER_USER_ID]],16,"[[USERDETAIL_CFAFFILIATENAME]]");

Please changing your insert statement for 'community_groups_members' table to:
INSERT INTO `#__community_groups_members`(`groupid`,`memberid`,`approved`,`permissions`) SELECT MAX(`id`),[[USER_USER_ID]] ,1,1 
FROM `#__community_groups`;

if using COUNT() will be gave wrong groupid value, groupid at community_groups table using autoicrement. because that must using MAX().
and table community_fields_values at your insert statement. that table not related with groups.

and 'params' that needed for groups display also. you can using same 'params' for every private groups. you can copy paste that 'params' from private group where created by Jomsocial it self at your DB.


Cheers,
Albert

10 years 1 month ago
  • Bruce's Avatar
    Topic Author
  • Bruce
  • Offline
  • Fresh Boarder
  • Posts: 22
  • Thank you received: 1
Licenses:
JomSocial Expired

Thanks Albert, that worked. The Group Admin's fullname is now displaying next to the heading.

As for the community_fields_values INSERT statement, wouldn't it be better to fill in some of the values beforehand with known values?

Albertus wrote: and table community_fields_values at your insert statement. that table not related with groups.

and 'params' that needed for groups display also. you can using same 'params' for every private groups. you can copy paste that 'params' from private group where created by Jomsocial it self at your DB.


And for the params for each private group, if you could please help me with escaping/formatting the text properly, I might be able to move past these issues. I've tried escaping all of the double quote marks and commas, but it doesn't load.

Here are the params which need formatting:
{"discussordering":"0","photopermission":"2","videopermission":"-1","eventpermission":"1","grouprecentphotos":"6","grouprecentvideos":"6","grouprecentevents":"6","newmembernotification":"1","joinrequestnotification":"1","wallnotification":"1","groupdiscussionfilesharing":0,"groupannouncementfilesharing":0,"stream":1}

Thanks for your help.
Bruce

10 years 1 month ago
Licenses:

Hi Bruce,

If you want put that params value at PHP insert statement. can be done like this (e.g):

$sql = 'INSERT INTO `#__community_groups`( `ownerid`, `categoryid`, `name`,`description`,`website`,`approvals`,`published`,`membercount`,`created`, `params`) VALUES (88,6,"nama tets","Challenge group for athletes of ewqe\.","web",1,1,1,CURDATE(),\'{\"discussordering\":0,\"photopermission\":1,\"videopermission\":1,\"eventpermission\":1,\"grouprecentphotos\":6,\"grouprecentvideos\":6,\"grouprecentevents\":6,\"newmembernotification\":1,\"joinrequestnotification\":1,\"wallnotification\":1,\"groupdiscussionfilesharing\":0,\"groupannouncementfilesharing\":0,\"stream\":1}\')';

let me the result :-)

Cheers,
Albert

10 years 4 weeks ago
Licenses:

Hi Bruce,

Because this thread no respond for a long time. I assume has been resolved if not, you can respond this thread any times.

Regards,
Albert

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW