Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 26 through 50 (of 53 total)
  • @adamt19

    Participant

    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

    @adamt19

    Participant

    What 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.

    @adamt19

    Participant

    Turns 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!

    @adamt19

    Participant

    wp_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

    @adamt19

    Participant

    It’s actually only the Month and Year that reset, which makes this more confusing.

    none of the other <select>-driven options reset either

    @adamt19

    Participant

    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! 🙂

    @adamt19

    Participant

    doh, must be a sweetdate thing. Delete thread!?

    @adamt19

    Participant

    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

    @adamt19

    Participant

    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 ));

    @adamt19

    Participant

    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 ));

    @adamt19

    Participant

    Wondering how to customize the conditions for popularity on my network, if anyone has done this before?

    @adamt19

    Participant

    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?

    @adamt19

    Participant

    will be digging back into this today and I’ll let you know

    @adamt19

    Participant

    Also – 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 🙂

    @adamt19

    Participant

    I think so too! 🙂 Will submit a ticket

    @adamt19

    Participant

    half 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)

    @adamt19

    Participant

    Can’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 way

    or

    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!

    @adamt19

    Participant

    It’s always simpler than I think, with BuddyPress.

    Thanks! (RESOLVED)

    @adamt19

    Participant

    Upgrading 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!

    @adamt19

    Participant

    Nobody has any ideas?

    @adamt19

    Participant

    still not resolved

    If there is a guide on this issue can someone post it

    @adamt19

    Participant

    Thanks. 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

    @adamt19

    Participant

    according to the codex they’re (bp_is_home and bp_is_my_profile) the same thing

    Template Tag Reference

    @adamt19

    Participant

    @adamt19

    Participant
Viewing 25 replies - 26 through 50 (of 53 total)
Skip to toolbar