Forum Replies Created
-
In reply to: Getting the unread-count inbox-count info elsewhere
Bumping to re-post the information that @drebabels posted but looks to have been lost due to use of quotes
bp_total_unread_messages_count() uses echo. So if you use this within an ‘echo’ you’ll get unexpected results (value doesn’t print where you expect it to in the DOM, in my experience)
add ‘get’, e.g. bp_get_total_unread_messages_count() to simply return the # of messages for the logged-in user in your code
In reply to: bp_get_the_thread_recipients reporting extra namesWhat I think I’ve learned:
wp_bp_messages_recipients needed some work before spam content was safely deleted
not paying attention to wp_bp_messages_recipients, and simply deleting data from wp_bp_messages_messages and wp_bp_notifications …meant that when bp_get_the_thread_recipients is called, subsequent conversation IDs got confused with data left over in wp_bp_message_recipients, and additional recipients were pulled into the conversation.
This was pretty much the worst possible thing that could happen on a social network (especially a dating site) so, hopefully these notes help someone else. This occurred as a result of my deleting message spam (in an incomplete manner) so hopefully there are some qualified plugins for spam prevention and message moderation that I simply haven’t stumbled upon yet.
In reply to: bp_get_the_thread_recipients reporting extra namesTurns out those other users are in fact receiving messages NOT intended for them. I’ve had to put our production site into Maintenance mode until this is sorted out. Any emergency help/notes/advice would be greatly appreciated!
In reply to: bp_get_the_thread_recipients reporting extra nameswp_bp_messages_recipients is where the problem is..
I do see IDs for the other two names in this table. I still don’t think these people are actually receiving the messages, though… still checking
It’s actually only the Month and Year that reset, which makes this more confusing.
none of the other <select>-driven options reset either
I’ve resorted to a javascript solution which checks for the existence of “error” divs within my registration form and modifies the HTML of the headline above the form, if necessary.
Note: this code is specific for my registration form, which uses .six .columns grid framework and a short vs. extendable registration experience, depending on how much time the user feels like spending on optional fields from extra field groups. Anyway:
if (jQuery('.row .six div.error').html()) { jQuery('h2.article-title').html('Wait! Something needs fixing, below.'); jQuery('p.lead').html('There is at least one error marked below. We\'ve expanded the form to help you find them.'); jQuery('.extended').fadeIn(1000); }It seems there should be some more practical/server-side method for this.
Still looking for answers/help on the birthday thing! 🙂
In reply to: How to force photo-visibility settingsdoh, must be a sweetdate thing. Delete thread!?
In reply to: Obtaining useful community metrics?I’d love to be able to isolate ‘Mutual Follows’ from ‘Total Follows’, i.e.:
if useridA is following useridB AND useridB is following useridA
In reply to: Obtaining useful community metrics?If you’re using the BP-Follow plugin as we are, here’s total follows:
$follows_total = count($wpdb->get_results( 'SELECT * FROM wp_bp_follow', OBJECT ));In reply to: Obtaining useful community metrics?Here are the easiest ones which I’ve implemented so far.
$msg_threads_total = count($wpdb->get_results( 'SELECT DISTINCT thread_id FROM wp_bp_messages_messages', OBJECT )); $msg_threads_today = count($wpdb->get_results( 'SELECT DISTINCT thread_id FROM wp_bp_messages_messages WHERE DATE(NOW()) = DATE(date_sent)', OBJECT )); $msg_threads_yesterday = count($wpdb->get_results( 'SELECT DISTINCT thread_id FROM wp_bp_messages_messages WHERE DATE(DATE_SUB(NOW(), INTERVAL 1 DAY)) = DATE(date_sent)', OBJECT )); $msg_threads_week = count($wpdb->get_results( 'SELECT DISTINCT thread_id FROM wp_bp_messages_messages WHERE DATE(DATE_SUB(NOW(), INTERVAL 7 DAY)) <= DATE(date_sent)', OBJECT )); $msg_sent_total = count($wpdb->get_results( 'SELECT * FROM wp_bp_messages_messages', OBJECT )); $msg_sent_today = count($wpdb->get_results( 'SELECT * FROM wp_bp_messages_messages WHERE DATE(NOW()) = DATE(date_sent)', OBJECT )); $msg_sent_yesterday = count($wpdb->get_results( 'SELECT * FROM wp_bp_messages_messages WHERE DATE(DATE_SUB(NOW(), INTERVAL 1 DAY)) = DATE(date_sent)', OBJECT )); $msg_sent_week = count($wpdb->get_results( 'SELECT * FROM wp_bp_messages_messages WHERE DATE(DATE_SUB(NOW(), INTERVAL 7 DAY)) <= DATE(date_sent)', OBJECT ));In reply to: How is "popularity" derived?Wondering how to customize the conditions for popularity on my network, if anyone has done this before?
cliff notes on these questions:
- Why does the <select> options for birthdays reset when reg form is submitted with errors
- Is there a conditional check available on registration load to see if form is being re-rendered due to errors.
anyone?
In reply to: How to properly filter bp_member_avatarwill be digging back into this today and I’ll let you know
In reply to: How to properly filter bp_member_avatarAlso – I realized I can just modify the call in members-loop.php and include a static alt text string e.g. &alt=Picture, and I’ve done this in the mean time, since this is a major privacy issue on our site.
But I would like to know how to filter my way to this modification properly 🙂
In reply to: Filtering E-mail Message ContentI think so too! 🙂 Will submit a ticket
In reply to: Filtering E-mail Message Contenthalf solved.. of course I can get the sender’s username with:
$sender_username = bp_core_get_username(bp_loggedin_user_id())but I can’t use displayed_user_id for the recipient’s ID, because when you send messages you send them from your own profile.
So, still looking for a way to get the recipient’s ID (and therefor, their username using bp_core_get_username($theid)
In reply to: Filtering E-mail Message ContentCan’t determine if I’m supposed to use:
mm_new_message_message($raw_args = array()) {}…and try to get the usernames from the sender/recipient ID (not working no matter what I try)or
mm_new_message_message($email_content, $sender_name, $subject, $content, $message_link $settings_link){}..which doesn’t seem to offer any opportunity to get usernames, as sender_name can’t be reverse engineered (that I know of) and there’s no recipient info passed this wayor
mm_new_message_message($email_content, $sender_name, $subject, $content, $message_link $settings_link, $sender_id, $recipient){}.. which isn’t working either no matter what I do in trying to get sender IDs/usernames or recipient ids/usernames, probably because I only have available to me the original 6 parameters and adding the two on the end is useless?Banging my head against the wall here on this, any help MUCH appreciated!
In reply to: Filtering bp_get_send_message_button()?It’s always simpler than I think, with BuddyPress.
Thanks! (RESOLVED)
In reply to: 404 upon save changes to user profileUpgrading to 2.0.1 solved this issue. Thx!
Would be interested in where the fix was, if anyone cares to point it out – but this is otherwise closed!
In reply to: 404 upon save changes to user profileNobody has any ideas?
In reply to: All fields for registrationstill not resolved
If there is a guide on this issue can someone post it
In reply to: WP profile fields not editable in BP profileThanks. Agree that it seems important to offer a single account-management area for users, who won’t care about the separation between WP/BP.
In my case, we also don’t want to allow users to access the (unbranded) WP admin back end, which I believe is necessary until a more “front end” experience is available for managing all of these settings
according to the codex they’re (bp_is_home and bp_is_my_profile) the same thing
In reply to: 404 upon save changes to user profileexported from old site using
https://wordpress.org/plugins/export-user-data/In reply to: Blank page after saving edited profileSame issue I posted a few days ago
https://buddypress.org/support/topic/404-upon-save-changes-to-user-profile/