AJ
Forum Replies Created
-
Forum: Plugins
In reply to: [Registration Options for BuddyPress] Set bbPress forum role on user approvalok will do.
OK thanks, Ill see if I can get it to work.
Forum: Plugins
In reply to: [Registration Options for BuddyPress] bbPress support estimated release dateIs there an alpha version for bbPress support? I’d be happy to test it.
Cool thanks!
Question: How do I know which mail is the one sent by the plugin?
That looks like it will add extra stuff to all emails sent.
Is it possible to filter it to add stuff to specific emails only?
Thanks.
In case anyone else needs to do this, here’s a starting point:
// hide or show stuff depening on bp-register-options user status. add_action( 'init', 'bp_registration_status_unapproved' ); function bp_registration_status_unapproved() { if ( is_user_logged_in() ) { $user_ID = get_current_user_id(); $user = get_userdata( $user_ID ); if ( 69 == $user->user_status ) { //just to test echo "Hello, you are not approved"; //add stuff for unapproved users } } }
I looked in the database and an approved user status=0, a pending verification status=2, and pending admin approval=69.
I found a bit of code also in bp-registration-options – core.php:
$user = get_userdata( $user_ID ); if ( 69 == $user->user_status ) { wp_redirect( $bp->loggedin_user->domain ); exit(); }
I’ll see if I can use that to lockdown some other areas of the site while the user is awaiting admin approval.
Cheers.
I understand hooks and filters when I read them, but writing is still a bit beyond me.
What sort of access token does the plugin create for that?
Is it a user meta value that I could check for and then use to display or hide other parts of the site?
I’m not sure how to add it to the email. Do you have any tips on that?
Thanks!Hmm, the extra fields are all created by Buddypress from the extend profiles component. I wonder about creating an array that just grabs everything and hook that into the email?
Something like this?
$current_user = wp_get_current_user(); $current_user_id = $current_user->ID; bp_profile_field_data( array('user_id'=>$current_user_id, $user_fields=> array() )); foreach($user_fields as $name=>$value) { echo "<strong>".$name."</strong>"." => "; foreach($value as $nameAr=>$valueAr) { echo "<br />?????"; echo $nameAr." => "; echo var_dump($valueAr); } }
Forum: Themes and Templates
In reply to: [Lingonberry] Navigation open by default… actually I had to move
body > .navigation { display: none; }
to line 2166 instead and now it works.
Forum: Plugins
In reply to: [Contact Form 7] Contact form 7 subscribe to wysiga newsletter on submitSry Mike, this one slipped by, its been a while, you should just be able to add this at the end:
else{add_action('wpcf7_mail_sent');}
——–
Artaudiomomo:As far as I know the way not to loose modifications to a plugin functions.php file is to save your add-in code, update and then re-add the code. Some plugins are set up to work within child themes, but I don’t know about CF7.
There are instructions in the code on how to set this up in CF7, basically:
Create a form and use the default CF7 name and email.
Create a radio select on your CF7 form and name it ‘opt-in’ with the options ‘yes’, ‘no’.That should do it.
Forum: Themes and Templates
In reply to: [Lingonberry] Navigation open by defaultThanks! Worked perfectly.
Forum: Plugins
In reply to: [jQuery Smooth Scroll] How to scroll to offset anchor linksI got this working using a margin and padding offset attached to a class on the anchor. Change the numbers to fit the height of your heading.
The HTML:
<h3> <a class="offset" name="mission"></a> Mission <a href="#top" title="Return to top">^</a> </h3>
The CSS
.offset { display: block; margin-top: -100px; padding-top: 100px; width: 1px; }
Forum: Plugins
In reply to: Wysija newsletters archivingWhen you create a newsletter/email the option to send automatically is the first radio option. When you get to the next screen edit the automatic latest content and select your category.