Skip Navigation

[Resolved] Toolset and Buddypress groups integration

This support ticket is created 7 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by Minesh 7 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#444900

I saw your response here https://toolset.com/forums/topic/building-a-membership-site-with-toolset-2/ and though I'd contact you directly with a few similar enquiries of my own.

Ultimately Im trying to build a site which revolves around a custom content type - Memorials which in effect acts like a buddypress group - ie an Administrator can apply create a memorial and apply whether it is public, private or hidden and allow moderators editing rights. All from the front end.

My logic is to amend the groups templates and display the Memorial content type on the group home page buddypress/groups/single/home.php.

1)
My test memorial can be seen here hidden link (id=51)

Thinking this through my first objective is to display a view on the buddypress template, once done then I would further filter the view to only show the Memorial specific to the Group. However I fail at the first stage

I have a view "memorial-in-group" which is filtered as a shortcode to show post id (id=post_id). In principle I should be able to view my test memorial with the shortcode [wpv-view name="memorial-in-group" id="51"]

I have tried adding the following php to my home template and neither displays anything

<?php
$args = array(
'name' => 'memorial-in-group',
'id' => '51'
);
echo render_view( $args );
?>

<?php
do_shortcode("[wpv-view name='memorial-in-group' id='51']");
?>

2)
Once I have this right, the next stage would be to display only the memorial that relates to the group - there would be a 1-2-1 relationship.
Again my assumption, would be to either have a cred form which automatically created a memorial and triggered the creation of a group with the same name and capturing the group_id field (which I saw when I made my first filter) or the other way round.

Then I would have a post id of a memorial which had the group id as a field and thus could filter to show a specific memorial and thus have a corresponding edit cred form.

I'm not sure how to approach point 2.

Any help or advice would be deeply appreciated

#445239

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - we will handle one issue per ticket. So I will help you with point number one and for any other additional queries, please open a new ticket for your each new question. This will help other users searching on forum.

I need to debug why it's not working on your install on the page you suggested.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#445753

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I'm able to login to FTP but unfortunately, I do not see any files, may be the FTP user do not have any permissions to access any files.

Could you please check once and resend me the FTP access details with user having permissions to access your source files.

I have set the next reply to private which means only you and I have access to it.

#445762

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - thank you very much. Now I can access the files using FTP.

Could you please tell me the file name and path where you've added the following code:

<?php
$args = array(
'name' => 'memorial-in-group',
'id' => '51'
);
echo render_view( $args );
?>

<?php
do_shortcode("[wpv-view name='memorial-in-group' id='51']");
?>
#445764

theme > kleo-biotrib> buddypress/groups/single/home.php

i dont actually have to use this theme though

#445802

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please check now:

<?php
		
		$args = array(
		'id' => 54,
		'pid'=> 51
		);
		echo render_view( $args );
		?>
		<br>Do Shortcode<br>
		<?php
			echo do_shortcode("[wpv-view name='memorial-in-group' pid='51']");
		?>

I've modifiled your code as above and both way using View's PHP API function render_view() and using [wpv-view] shortcode using both its working now.

The issue was you passed wrong ID and 'id' is reserved attribute for views PHP API. Here "54" is your view id and "51" is your post ID.

So I changed "id" to "pid", as with "id" attribute you need to pass the view ID and I've added another argument "pid" which holds your post id.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.