Forum Replies Created
-
In reply to: ACTIVITY STREAM TEXT COLOR
Still can’t login but it’s OK. The below code was supposed to work if you cleared your browser cache and restarted it. If that wouldn’t work still you could have tried testing the site on another computer which you had not used to visit the site. If you had a browser that you hadn’t used to visit the site that could work too to help you see the changes made by this code.
#buddypress div.activity-comments div.acomment-content { color: #FFFFFF; }Also, make sure you’re placing that code in the right place “style.css”
In reply to: ACTIVITY STREAM TEXT COLORI Can’t login are those correct?
In reply to: Changing the registration page textThis article may be of help to you to change that text http://premium.wpmudev.org/blog/make-your-wordpress-site-buddypress-ready/
Or you can use this one too with a plugin: https://webdevstudios.com/2015/06/02/creating-custom-templates-for-buddypress/
In reply to: Disable Activity Stream LinksI’m not sure of the solution to the issue in IE but I guess that’s probably the furthest you can go without hacking the core files.
In reply to: ACTIVITY STREAM TEXT COLORPlease create a temporary buddypress user account for me so that I can log in and take a look.
In reply to: Disable Activity Stream Links@zabelator in that case, you’ll have to use jQuery and probably not CSS.
Open “head.php” and add the following code.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#buddypress .acomment-meta a, #buddypress .activity-header a, #buddypress .comment-meta a" ).click(function(oneb){ oneb.preventDefault(); }); }); </script>It should now work across the board. Note, this will be disabled even when the user is logged in so you might want to use php to load this script on home page only. Let me know if works.
In reply to: ACTIVITY STREAM TEXT COLOR@canadianmusicnetwork, Please remove the previous code and add this.
#buddypress div.activity-comments div.acomment-content { color: #FFFFFF; }Lemme know if it works.
In reply to: How to get an ID of a user who was just activated?@henrywright, I’m trying to write a function that will return user id on account activation so that I can use the user id somewhere else with this hook:
bp_after_activate_content. Something like my previous code which was:function my_f( $user_id ) { // You can do something with $user_id here. Note though, the return value of // bp_core_activate_signup() may be false. In that case, // the value of $user_id here will be false. return $user_id; } add_filter( 'bp_core_activate_account', 'my_f' ); function do_thingsz(){ $willie = my_f(); echo "The user id is "; echo $willie; } add_action( 'bp_after_activate_content', 'do_thingsz', 10, 0 );Do you have more ideas @henrywright. I appreciate @shanebp’s suggestion above but it’s not working the way I want it to (Returning the user id)
In reply to: Disable Activity Stream LinksHi @zabelator
Try adding this to “style.css” in your active theme
#buddypress .acomment-meta a, #buddypress .activity-header a, #buddypress .comment-meta a { text-decoration: none; pointer-events: none; cursor: default; }In reply to: How to Change landing page after loginIn reply to: ACTIVITY STREAM TEXT COLORTry adding this to “style.css” in your active theme
#buddypress #activity-stream p { color: #FFFFFF; }In reply to: How to get an ID of a user who was just activated?Thanks again @henrywright I’m executing the following code on account activation but I now get this error “Warning: Missing argument 1 for my_f() … ”
Here is the code:
function my_f( $user_id ) { // You can do something with $user_id here. Note though, the return value of // bp_core_activate_signup() may be false. In that case, // the value of $user_id here will be false. return $user_id; } add_filter( 'bp_core_activate_account', 'my_f' ); function do_thingsz(){ $willie = my_f(); echo "The user id is "; echo $willie; } add_action( 'bp_after_activate_content', 'do_thingsz', 10, 0 );In reply to: How to get an ID of a user who was just activated?Thanks @henrywright. Now that we’ve defined the function which is
my_f( $user_id )and returned user id, how can we use the same function to assign the value to a valuable? something like:$user_id = my_f();In reply to: How to get an ID of a user who was just activated?Thanks @henrywright for pointing me in right direction. This will definitely work. I’m giving it a try and will let you know the results!
Thanks again @henrywright. What’s the simplest way to override activate.php? I don’t mind overriding it if I won’t be modifying the core files.
Thanks for your suggestion @henrywright. Is it possible to achieve this with hooks instead?
In reply to: Users not able to view the members page@Venutius maybe a screenshot or a link would help identity the problem. Please try sharing those.
In reply to: How to get an ID of a user who was just activated?@shanebp Thanks for spotting the problem with my code. I just got rid of the following line and I was able to get the user id of a user who just got activated without the warnings!
add_action( 'bp_after_activate_content', 'william_bp_core_activated_user', 10, 0 );In fact, according to my logic, that line is unnecessary anyway.
Thanks so much @shanebp. The codex article was very helpful too.
In reply to: How to get an ID of a user who was just activated?It’s an extremely simple plugin that just echos the user id of the user who just got activated. I’m going to do something a little complicated with the id later on. I just want it to work first. Here’s the code.
<?php
/*
Plugin Name: A simple plugin
Plugin URI: http://google.com
Description: Test
Version: 1.5
Author: John Smith
Author URI: http://URI_Of_The_Plugin_Author
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Domain Path: /languages
Text Domain: my-toolset
*/function william_bp_core_activated_user( $user_id, $key, $user ) {
// do something with $user_id
// there is no return for add_action, only add_filter
echo $user_id;
};
add_action( ‘bp_core_activated_user’, ‘william_bp_core_activated_user’, 10, 3 );
add_action( ‘bp_after_activate_content’, ‘william_bp_core_activated_user’, 10, 0 );It echos the user id of the user who just got activated and so I’m now sure it’s working.
What could be wrong with my code @shanebp hence the warnings?
In reply to: How to get an ID of a user who was just activated?You’re a GENIUS @shanebp!
It seems to be working fine except that I’m getting these errors:
Warning: Missing argument 1 for william_bp_core_activated_user() in /…/two/wp-content/plugins/The Kick/TheKick.php on line 24
Warning: Missing argument 2 for william_bp_core_activated_user() in /…/two/wp-content/plugins/The Kick/TheKick.php on line 24
Warning: Missing argument 3 for william_bp_core_activated_user() in /…/two/wp-content/plugins/The Kick/TheKick.php on line 24
Any ideas on how to fix these @shanebp?
In reply to: How to get an ID of a user who was just activated?@shanebp here’s how to hook into “do_action( ‘bp_core_activated_user’, $user_id, $key, $user );”
// define the bp_core_activated_user callback
function action_bp_core_activated_user( $bp_core_clear_member_count_caches )
{
// make action magic happen here…
};// add the action
add_action( ‘bp_core_activated_user’, ‘action_bp_core_activated_user’, 10, 1 );but I still can’t return the user id. Please help.
In reply to: How to get an ID of a user who was just activated?Thanks @shanebp I’ll try to use that hook. Will let you know the results.
Thanks @modemlooper. This is doable but will the account remain deactivated as usual? The user might justchoose to ignore the second email with activation link since they can already login. What do you say? I’d like to sort of force a user to fill the second form and I don’t want them logging in if they haven’t filled the second form.