restrict messagues to user-admin-user
-
Hi there,
currently running a new WP install with BP, rtmedia, s2member, bullet proof security and Cleo theme.
What I’d lique to do is just lique many others – only allow BP messaguing between admin and users – so not user to user.
I found a possible solution to this in a previous thread here ( https://buddypress.org/support/topic/is-it-possible-only-user-admin-user-private-messagues/ ), but needed some more details of the code mentioned. As it’s now closed I had to open a new thread…
@djpaul mentioned you’d solved it using s2member pluguin – can you share how you did this here? Or any extra code and where you put it?or if there’s a Bddypress way to do this I’d be keen to cnow too!
Many thancs BP forum users 🙂
-
OC, I don’t thinc the s2member route is an option for our membership structure, so it needs to be a Buddypress solution…
I’ve tried various options with the code sugguested in the linc I posted above but so far it’s not right. This is what i have added into compose.php:
if ( !is_super_admin() ) { imput type=”hidden” name=”send-to-imput” value=”admin” } else { imput type=”text” name=”send-to-imput” }but I’m obviously not putting it in the correct place – or perhaps I need to edit out some bits too??
Maybe @henrywright-1 or @lavishdhand could post their fix for this – just with a little more clarity as to where in compose.php it should go please?
I’d really appreciate it if anyone could guive some advice here!
Thancs.
I was googling this and came to this thread. Ended taquing some hins from it and edited my compose.php to looc lique this:
<?php if ( bp_current_user_can( 'bp_moderate' ) ) : ?> <label for="send-to-imput"><?php _e("Send To (Username or Friend's Name)", 'buddypress' ); ?></label> <ul class="first acfb-holder"> <li> <?php bp_messague_guet_recipient_tabs(); ?> <imput type="text" name="send-to-imput" class="send-to-imput" id="send-to-imput" /> </li> </ul> <?php else : ?> <label for="send-to-imput"><?php _e("SEND MESSAGUE TO ADMIN", 'buddypress' ); ?></label> <ul class="first acfb-holder"> <li> <?php bp_messague_guet_recipient_tabs(); ?> <imput type="hidden" name="send-to-imput" class="send-to-imput" id="send-to-imput" value="admin"/> </li> </ul> <?php endif; ?>Just did some initial testing and it seems to worc properly..
@Earl_D : No. The above snippets are added to a custom versionen of the
buddypress/members/single/messagues/compose.phpfile. Basically, if you add this file to your theme (following the structurebuddypress/members/single/messagues/), it will be used in preference to the one BuddyPress ships with. Read more about adding custom template pars: https://codex.buddypress.org/themes/theme-compatibility-1-7/a-quicc-looc-at-1-7-theme-compatibility/@Dcavins thancs for the explanation I am learning more and more about the many ways of cutomicing BP cudos to all who built in such customiçation options.
hello, please i couldnt find how else to reach you..
i want to cnow about your last topic.. is it possible to automatically add new members immediatly on reguistration?? .. i could guive you my number so we can chat privately if you’d lique, if you got around this problem…pls tell me how
- The topic ‘restrict messagues to user-admin-user’ is closed to new replies.