Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'notification user id'

Viewing 25 results - 626 through 650 (of 1,091 total)
  • Author
    Search Results
  • bp-help
    Participant
    jstuartwp
    Participant

    Thanks for response!

    I did some research and found that s2member syncs profiles with buddypress, so that part is solved. The only thing I’m still really looking for is a notifications bar or widget, other than the wordpress one. Hopefully there is a plugin for that?

    jstuartwp
    Participant

    Hello!

    Thanks in advance to all who read and respond to this. I am trying to build a membership site with the premise of the members paying for access to a community to collaborate with. Ideally my end result includes:

    -A general forum for anyone to view (easy enough)

    -A members-only forum for collaborative project postings (like a job board, for example – in fact something closer to that would be even better)

    -The ability for collaborators to have their own forum or group messaging (as in buddypress), paid members only

    -The synchronization of forum and membership profile pages, etc. Currently I have the WPMU Membership plugin and its “Profile” page is different from the BuddyPress profile, obviously I would like them to be the same (so that if a user updates their name in the BuddyPress profile it is concurrent throughout).

    -A clean looking solution for notification and links to profile, groups, etc either in a sidebar widget or toolbar at the top of the page (preferably not the wordpress toolbar)

    That is more or less it. What is the best way to achieve this? Or even something close to it? I am relatively familiar with WordPress but new to BuddyPress, however I assumed this wouldn’t be very difficult. Please excuse any ignorance I am showing. :p

    I reeeeeeally appreciate any help with this at all, it would be amazing to get this figured out! I’d owe any and all of you a beer!

    -Jimmy

    #170262
    #169918
    Hugo Ashmore
    Participant

    With Theme Compatibility BP doesn’t have control over sidebars, bp-default theme used to hardcode messages to it’s sidebar. This is an issue discussed on a ticket, the interim solution was to feed site messages into the WP footer, and add default styling to position them over the site towards top of the page.

    The solution is a widget, which is simple enough, I ran one up, but harder for users is knowing how to disable the existing feed into the wp_footer

    #169915
    MCLMarcos
    Participant

    Guys I have a problem:
    When sending a notification to all users it does not appear in the sidebar of users.

    Can anyone help me

    thank you

    Marcos

    Buddypress 1.8

    http://partilho.com.br

    craig
    Participant

    Hey All,

    I thought that I wanted to remove the ‘last active’ that shows alongside all profiles and groups etc, however after using a simple css hide; span.activity { display: none; }, I found that the site suddenly looked bare.

    I’m wondering if anyone exchanged it for something slightly less revealing (if the sites not that active currently), or if theres a function that will hide it if the user hasn’t been active in 2 weeks or something.

    thefluxo
    Participant

    Hi there,

    this is my first thread here and i hope i make everything right, so here is my configuration:

    i run WP3.6, along with BP 1.8.1. and Geotheme 3.3.2. on a subdomain, but on root directory.

    and here is my problem: i’d like to use arrowchat with the site and i already bought it. arrowchat gives you the opportunity to use a notification system. there are several integrations ready for oxwall, phpbb and stuff, but there is only an general tutorial for customized notifications. this is what the say about it:

    First, you need to understand how notifications work and the basic process of installing them. The most difficult part of installing a notification is finding the place where the action occurs. Consider the following example:

    Let’s assume that we want to install a notification for when a user comments on a photo:

    function add_photo_comment()
    {
    // Process the photo comment

    if ($comment)
    {
    // Insert the photo comment

    $msg = “Success! The comment was added to the user’s photo”;

    // BEGIN ARROWCHAT NOTIFICATION
    $sql = “INSERT INTO arrowchat_notifications (to_id, author_id, author_name, type, alert_time)
    VALUES (‘”.$to_id.”‘, ‘”.$author_id.”‘, ‘”.$author_name.”‘, ‘1’, ‘”.time().”‘)”;
    mysql_query($sql);
    // END ARROWCHAT NOTIFICATION
    }
    else
    {
    $error = “You did not enter a comment”;
    }
    }
    As you can see from the example above, we only inserted the notification into the database where the action occured, which in this case, was adding a photo comment. If you want to add a notification for private messages, you would insert the ArrowChat mySQL code where a user has successfully sent a private message.

    Sample MySQL Insert Code
    Here is the way a proper notification should be entered into the database:

    $sql = “INSERT INTO arrowchat_notifications (to_id, author_id, author_name, type, alert_time, misc1, misc2, misc3)
    VALUES (‘”.$to_id.”‘, ‘”.$author_id.”‘, ‘”.$author_name.”‘, ‘1’, ‘”.time().”‘, ”, ”, ”)”;
    mysql_query($sql);
    The above is a basic template that you should use for inserting notifications. Some modification might be necessary.

    to_id – (int) The user ID of the user that should receive the notification.
    author_id – (int) The user ID of the user that sent the notification. Can be left blank if none.
    author_name – (varchar) The name of the user that sent the notification. Can be left blank if none.
    type – (int) The type of notification. You need to create a notification markup in the admin panel, and then insert the number of that markup as the type.
    alert_time – (int) The unix time of when the notification was sent.
    misc1 – (varchar) A miscellaneous field that can be used for anything or left blank.
    misc2 – (varchar) A miscellaneous field that can be used for anything or left blank.
    misc3 – (varchar) A miscellaneous field that can be used for anything or left blank.

    The Notification Markup and Type Number

    If you need to install a notification that is not already included in the default ArrowChat installation, you can add one by clicking Notifications under the Manage menu. Add a name and the HTML markup that should be used when receiving the notification. You can look at the notifications already installed for reference.

    After the notification is created, click “Edit” and you will be shown the notification number that is to be used to generate that markup.

    since i am not a programmer, i don’t know how to implement it and i hope to find anybody here who can help me with that. i want to use the notifications for new messages in BP, friendship notifications and activity comments.

    it would be nice if anyone can help me out here!

    thank you
    oliver

    #169063

    In reply to: Notification Messages

    I was able to add notification message.

    I added this code in bp-activity-functions.php

    case ‘request_accepted’:
    $activity_id = $item_id;
    $poster_user_id = $secondary_item_id;
    $at_mention_link = bp_loggedin_user_domain() . bp_get_activity_slug();
    $at_mention_title = sprintf( __( ‘@%s Mentions’, ‘buddypress’ ), bp_get_loggedin_user_username() );

    if ( (int) $total_items > 1 ) {
    $text = sprintf( __( ‘You have %1$d pet requests’, ‘buddypress’ ), (int) $total_items );
    $filter = ‘bp_activity_multiple_at_mentions_notification’;
    } else {
    $user_fullname = bp_core_get_user_displayname( $poster_user_id );
    $text = sprintf( __( ‘%1$s accepted your pet request’, ‘buddypress’ ), $user_fullname );
    $filter = ‘bp_activity_single_at_mentions_notification’;
    }
    break;

    my problem is I need to remove the notification once clicked.

    Do you know where it is triggered?

    #168534
    minto
    Participant

    Here’s what I did meanwhile:

    1. removed all those junkcode, I had originally in 😉

    2. found that display-issue in the above + corrected it in the code, which seemed responsible for no text/ no links being given (I inserted the missing a-href):
    return apply_filters( ‘bp_activity_multiple_new_likes_notification’, ‘‘ . $text . ‘‘);
    … but this also did not bring up the link + text …

    3. wonder about that line:
    $link=ac_notifier_activity_get_permalink2( $activity_id );
    …removed the “2”, because with that in, my toolbar disappears…
    Should that be noticed in the ac_notifier too, with the need to keep the “2”?

    4. any notifications (even the live-notification-popup) still only appear on the likers-side, still not yet on the liked-user-profile!

    So this is, what it looks like atm:

    
    function bp_like_setup_globals() {
    global $bp, $current_blog;
    $bp->bp_like=new stdClass();
    $bp->bp_like->id = 'bp-like';
    $bp->bp_like->slug = 'bp_like';
    $bp->bp_like->notification_callback = 'bp_like_format_notifications';
    $bp->active_components[$bp->bp_like->slug] = $bp->bp_like->id;
    do_action( 'bp_like_setup_globals' );
    }
    add_action( 'bp_setup_globals', 'bp_like_setup_globals' );
    
    function bp_like_format_notifications( $action, $item_id, $secondary_item_id, $total_items,$format='string') {
    global $bp;
    $glue='';
    $user_names=array();
    $activity = new BP_Activity_Activity( $activity_id );
    $link=ac_notifier_activity_get_permalink( $activity_id );
    
    //si c’est le posteur d’origine, dites que vous êtes, d’autre dire de% s après
    if($activity->user_id==$bp->loggedin_user->id){
    $text=__("your");
    $also="";
    }
    else{
    $text=sprintf(__("%s’s"), bp_core_get_user_displayname ($activity->user_id));//quelqu’un
    $also=" also";
    }
    $ac_action='new_bp_like_'.$item_id;
    
    if($action==$ac_action){
    // if ( (int)$total_items > 1 ) {
    // $users=ac_notifier_find_involved_persons($activity_id);
    $total_user=$count=count($users);//montrent de nombreux utilisateurs uniques ont commenté
    if($count>2){
    $users=array_slice($users, $count-2);//simplement indiquer le nom de deux affiches, le repos doit être aussi et ‘n’ autre a également commenté
    $count=$count-2;
    $glue=", ";
    }
    else if($total_user==2)
    $glue=" xxxx1xxxx ";//si il ya 2 utilisateurs uniques, disons x et y commenté
    
    foreach((array)$users as $user_id)
    $user_names[]=bp_core_get_user_displayname($user_id);
    
    if(!empty($user_names))
    $commenting_users=join($glue, $user_names);
    
    if($total_user>2)
    $text=$commenting_users." xxxxxxxx2xxxxxxx ".$count." xxxx3xxxx".$also." xxxxxxxx4xxxxxxx on ".$text." post";//peut-on changer la poste à quelque chose de significatif en fonction de l’élément d’activité?
    else
    $text=$commenting_users.$also." xxxxxx5xxxxx on ".$text." post";
    
    if($format=='string')
    return apply_filters( 'bp_activity_multiple_new_likes_notification', '<a href="'.$link.'">'.$text.'</a>');
    else{
    return array('link'=>$link,
    'text'=>$text);
    }
    return false;
    }
    
    }
    

    any suggestions?

    thx in advance!

    #168145
    cameronwilby
    Participant

    I am helping Kathryn with this issue, here are the details for the installation.

    The original programmer for the site vanished, so the configuration is the way it is. Not asking anybody to solve the problem on our behalf, just opening the issue to more eyes. All help and all input is greatly appreciated.

    Wordpress: 3.5.2
    Buddypress: 1.7.3
    PHP: 5.3 (I suspect this might be the culprit.)

    Installed Plugins

    Legend – (A)Active, (-)Deactivated

    BUDDYPRESS PLUGINS

    (A)BP Auto Login on Activation 1.0.1
    (A)BP Export Users 1.1
    (A)BP Group Announcements 1.0.2
    (A)BP Group Hierarchy 1.3.9
    (A)BG Group Management 0.6
    (A)BP Group Organizer 1.0.7
    (-)BP Labs 1.3

    (A)BuddyPress 1.7.3
    (A)BuddyPress Activity Plus 1.5
    (A)BuddyPress Auto Group Join 2.2.1
    (A)BuddyPress Docs 1.4.3
    (A)BuddyPress Docs Wiki add-on 1.0.3
    (-)BuddyPress Edit Group Slug 1.2
    (A)BuddyPress Group Email Subscription 3.3.3
    (A)BuddyPress Groups Extras 3.5.7
    (A)BuddyPress Like 0.0.8
    (-)BuddyPress Live Notification 1.0.3
    (-)BuddyPress Usernames Only 0.6
    (A)bbPress 2.3.2
    (A)bbPress reCaptcha 1.1
    (A)bbPress Search Widget 2.0.0
    (A)bbPress Threaded Replies 0.4.3
    (A)GD bbPress Attachments 1.9.2

    OTHER

    (A)Akismet 2.5.7
    (A)Automessage 2.3.1
    (A)BackWPup 3.0.12
    (-)Blog Categories for Groups 1.0.4
    (-)Confirm User Registration 2.0.4
    (-)Disable Comments 0.9
    (-)downML – Download Media Library 0.3.1
    (A)Email Users 4.4.4
    (-)Fundraising 2.3.6
    (-)Invite Anyone 1.0.21
    (-)Live Stream Widget 1.0.4.2
    (A)New RoyalSlider 3.0.93
    (-)P3 (Plugin Performance Profiler) 1.4.1
    (A)Plugins Garbage Collector 0.9.12
    (A)Revolution Slider 2.3.8
    (-)Scheduled Content 1.1.1
    (-)Select Language At Signup 1.0.4
    (A)SI CAPTCHA Anti-Spam 2.7.6.4
    (A)Sidebar Login 2.5.3
    (A)Simple Badges 0.1-alpha20120703
    (-)Snapshot 2.3.3
    (-)Tweet Blender 3.3.15
    (A)Ultimate Maintenance Mode 1.5.0
    (-)W3 Total Cache 0.9.2.11
    (A)WordPress Importer 0.6.1
    (A)WP-DBManager 2.63
    (-)WP-reCAPTCHA 3.1.6
    (-)WP Htaccess Editor 1.2.0
    (-)WP UI – Tabs accordions and more. 0.8.7
    (A)Yoast Breadcrumbs 0.8.5

    #167928

    In reply to: My account menu

    mathieu.urstein
    Participant

    @espellcaste
    do you have some news?
    I have been able to take the notifications like this :

    // notifications
    function my_bp_adminbar_notifications_menu() {
    	global $bp;
    
    	if ( !is_user_logged_in() )
    		return false;
    
    	echo '<li id="menu-item-9991" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-9991 parent">';
    //	_e( 'Alerts', 'buddypress' );
    
    	if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
    		<a href="#"><span id="notifs_top"><?php echo count( $notifications ) ?></span></a>
    	<?php
    	}
    
    	echo '</a>';
    	echo '<ul class="sub-menu">';
    
    	if ( $notifications ) {
    		$counter = 0;
    		for ( $i = 0; $i < count($notifications); $i++ ) {
    			$alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>
    
    			<li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>
    
    			<?php $counter++;
    		}
    	} else { ?>
    
    		<li><a href="<?php echo $bp->loggedin_user->domain ?>"><?php _e( 'You have no new alerts.', 'buddypress' ); ?></a></li>
    
    	<?php
    	}
    
    	echo '</ul>';
    	echo '</li>';
    }
    joanicegreen
    Participant

    Redirects are leading to a blank page (header and sidebar’s are there but the actual activity is not displayed)

    During an email notification of an activity, the link provided in the email is:
    http://www.itsartmag.com/features/activity-2/p/1234

    When you click the link it goes to
    http://www.itsartmag.com/features/members-2/user/activity/1234/

    When it gets to this page the page is blank, it will have the header and sidebar and content space, but nothing appears in the content space.

    An example of this is as follows:

    The email gives this link:

    http://www.itsartmag.com/features/activity-2/p/816/

    The site redirects you to:
    http://www.itsartmag.com/features/members-2/cgartist/activity/816/

    And the activity entry does not show at all

    Is there a way to have the link redirect to just the activity page or how is this handled in the core

    We have tried to update the .htaccess but the redirect is actually pretty ugly.

    This is similar to the following posts (opened over a year ago, so I am just referencing them, since I am not sure if it was ever resolved)

    http://buddypress.org/support/topic/why-does-buddypress-use-redirection-links-in-activities/

    http://buddypress.org/support/topic/view-single-activity-infinite-redirect/

    http://buddypress.org/support/topic/buddypress-activity-stream-permalinks/

    1. Which version of WordPress are you running? Version 3.5.2

    2. Did you install WordPress as a directory or subdomain install?
    It is installed on the following path from the web root:
    features/itsart

    3. If a directory install, is it in root or in a subdirectory?
    It is in a subdirectory:

    httpdocs/features/itsart

    4. Did you upgrade from a previous version of WordPress? If so, from which version?

    Not recently

    5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting.
    Yes

    6. Which version of BP are you running?
    1.7.2

    7. Did you upgraded from a previous version of BP? If so, from which version?
    No

    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?
    Yes:

    AddThis Follow Widget
    AddThis Social Bookmarking Widget
    AdRotate Professional
    Akismet
    BP Activity Autoloader
    BP Friends Suggestions Widget
    BP Group Organizer
    BP Members With Uploaded Avatars Widget
    BP reshare
    BP Resume Page
    BuddyMenu
    BuddyPress
    BuddyPress AddThis LS
    BuddyPress Follow
    BuddyPress Live Notification
    BuddyPress login redirect
    BuddyPress Media
    Buddypress Sitewide activity widget
    BuddyPress Template Pack
    Chartbeat
    Clean up wp_head
    Clobber spam users
    Community Activity On profile
    Conditional Widgets
    Contact Form 7
    Core Control
    Disqus Comment System
    DRP WordPress User Management
    DZS Video Gallery
    Events +
    Export Users to CSV
    Facebook Friends Inviter
    Facebook Like Activity Stream For BuddyPress
    Google Analytics for WordPress
    If Menu
    iframe
    Jetpack by WordPress.com
    JW Player 6 Plugin for WordPress
    Login Logo
    Magic Members
    Manual Control for Jetpack
    Newsletters
    Prevent Password Reset
    PunchTab for WordPress
    Really Simple CAPTCHA
    Slide-In
    Social Articles
    SSH SFTP Updater Support
    TS Widget Pack
    Use Google Libraries
    Video SEO for WordPress SEO by Yoast
    Viper’s Video Quicktags
    Welcome Pack
    White Label CMS
    Widgetize pages Light
    WordPress SEO
    WP-Memory-Usage
    WP Hide Dashboard
    WPMU DEV Dashboard
    WP Status Notifier
    WPtouch Pro

    9. Are you using the standard BuddyPress themes or customized themes?

    Customized theme wpzoom’s magazinium with buddypress template pack installed

    10. Have you modified the core files in any way?
    No

    11. Do you have any custom functions in bp-custom.php?
    No

    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in?
    Not Running

    13. Please provide a list of any errors in your server’s log files.
    None that I can see in relation to this, no 404’s etc

    14. Which company provides your hosting?
    Self Hosted

    15. Is your server running Windows, or if Linux; Apache, nginx or something else?
    LAMP

    #167017
    bp-help
    Participant

    @sushmitha
    Just some friendly advice but I would open a new topic because the initial topic is going on four years old and some of that information may have been outdated. If you do not find the help you need then consider perhaps posting it on the jobs board.

    #166562
    @mercime
    Participant

    @midexsoftware you can allow users to post anonymously in bbPress forums in Settings > Forums. As for notifications for each change in the forum, there’s no setting available by default. You could post at bbpress.org/forums/ for more assistance.

    #166126

    In reply to: Pending Notifications

    b a
    Participant

    OKay, I followed this guy http://androoha.com/web-design-tuts/80-custom-notifications-buddypress-en

    And it did a trick, in some way, so I will extend my question here.

    I managed to add function which adds notifications to database when I like an activity.
    It displays it well when I have only 1 notification with such component_action.
    But when I have to, it just merges my notifications into one, or something like this, sometimes it even brokes (but might be another issue)

    so here is my code in functions.php

    function bp_members_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { 
    	global $bp; 
    
    	switch ( $action ) {
    		case 'new_likes': 
    			$thanks_for      = $item_id; 
    			$who_thanked     = $secondary_item_id; 
    			$link = '/heregoeslink'; 
    			$return = '<a href="'.$link.'">'. $who_thanked .' liked your link!</a>'; 
    		break;
    	} 
    
    	return $return; 
    }

    I have 5 notifications in database with new_likes component_action and 4 of them belong to current user. so $total_user contains “4”,

    now I want to remake this code to display user notifications separatly.

    Many thanks even for reading till this )) I also try to continiue thiking for an answer and if something I’ll post it here

    #166070
    Tecca
    Participant

    You can make your own. Here’s mine as an example. You’ll need to tinker around with the CSS or code if you’d like to display them differently. What the below does is it shows a number (the amount of notifications you have) when you have one or more. It is hidden when there are none to display. Hovering over the number will display your notifications in a drop-down.

    Place into bp-custom.php:

    /**
    * Add Notification number to template
    */
    function my_bp_adminbar_notifications_menu() {
    global $bp;
    
    if ( !is_user_logged_in() )
        return false;
    
    echo '<div class="notices"><ul class="notices">';
    _e( '', 'buddypress' );
    
    if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
        <li class="parent"><span class="notice-badge"><?php echo count( $notifications ) ?></span>
    <?php
    }
    
    echo '</a>';
    echo '<ul class="sub-menu">';
    
    if ( $notifications ) {
        $counter = 0;
        for ( $i = 0; $i < count($notifications); $i++ ) {
            $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>
    
            <li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>
    
            <?php $counter++;
        }
    } else { ?>
    
        <li><a href="<?php echo $bp->loggedin_user->domain ?>"><?php _e( 'You have no new alerts.', 'buddypress' ); ?></a></li>
    
    <?php
    }
    
    echo '</ul></li>';
    echo '</ul></div>';
    }

    CSS:

    /*-------------------------- Notification dropdown -----------------------------------*/
    .notice-badge { font-weight: bold; cursor: default; background: #d33939; padding: 0 3px; border-radius: 10px }
    .parent.user-bar { width: 86px; text-align:left; float: right; font-weight: bold; }
    .notices { float: right; margin:0; line-height: 45px; z-index: 9999; }
    .notices a { color: #ffffff; }
    .notices ul, .notices { margin:0 2px 0 0; padding:0; list-style-type:none; list-style-position:outside; position:relative; }
    .notices ul a:link, .notices ul a:active, .notices ul a:visited { display:block; padding: 0; text-decoration:none; }
    .notices ul ul a:link, .notices ul ul a:active, .notices ul ul a:visited { width: 480px; display:block; padding:0 7px; text-decoration:none; }
    .notices ul ul a:hover { color: #0d385f; text-shadow: none; }
    .notices ul li { float:left; position:relative; background:none; padding:0 12px; }
    .notices ul li:hover { transition: all 100ms ease-in; }
    .notices ul ul { width: 480px; line-height: 35px; background: #ffffff; position:absolute; right: 0; top:45px; text-align:left; padding:0; display:none; border:1px solid #eeeeee; border-bottom:none; border-top:none; box-shadow:0 0 2px rgba(0, 0, 0, 0.15), 0 3px 5px rgba(0, 0, 0, 0.1); }
    .notices ul ul a { color:#248361; font-weight: bold; }
    .notices ul li ul a { float:left; }
    .notices ul li ul ul { left:-170px; top:2px; margin:0px; border-right:3px solid #cccccc; border-top:1px solid #eeeeee; }
    .notices ul li ul li { width: 480px; padding:0; margin:0; border-bottom:1px solid #eeeeee; max-width:none; list-style-type:none; text-shadow: none; }
    .notices ul li ul li:hover { background: #f5f5f5; }
    .noticesn ul li:hover ul ul, ul li:hover ul ul ul, ul li:hover ul ul ul ul { display:none; }
    .notices ul li:hover ul, .notices ul li li:hover ul, .notices ul li li li:hover ul, .notices ul li li li li:hover ul { display:block; }
    .notices ul li ul.children li { list-style-type:none; }
    .notices ul li ul li.current-menu-item { background:#f5f5f5; }
    .notices ul li ul li.current-menu-item a { color:#585858; }
    .notices ul li.current-menu-item span { color:#585858; }
    .notices ul li.parent { background-image: url(images/menu-arrow-transparent.png); background-position: center center; background-repeat: no-repeat; }
    .notices ul li.parent:hover { background-image: url(images/menu-arrow1.png); background-position: 14px 36px; background-repeat: no-repeat; }
    .notices ul li ul li.parent:hover { background-image: url(images/menu-arrow-left.png); background-position: 152px center; background-repeat: no-repeat; }

    Place into header.php or wherever you’d like your notifications shown:
    <?php my_bp_adminbar_notifications_menu()?>

    #165052
    3quid
    Participant

    Hi,

    I am trying to show the number of new mentions associated with the logged in users profile.

    I have found this page http://buddydev.com/support/forums/topic/at-mention-notification/ … I have used the last code provided by @sbrajesh

    //at mention
    
    add_action( 'bp_adminbar_menus', 'user_show_mentione_count_in_adminbar',20  );
    
    function user_show_mentione_count_in_adminbar(){
    
    global $bp;
    
    if(!is_user_logged_in()||!($count=get_user_meta( $bp->loggedin_user->id, 'bp_new_mention_count' ,true)))
    
    return;
    
    //clear it because bp won't do it on profile
    
    if(bp_is_home ()&&$bp->current_component==BP_ACTIVITY_SLUG&&$bp->current_action=="mentions")
    
    delete_user_meta($bp->loggedin_user->id, 'bp_new_mention_count');
    
    //show mentions
    
    echo  "<li ><a href='".bp_get_loggedin_user_link().BP_ACTIVITY_SLUG."/mentions/'>New mentions(".$count.")</a></li>";
    
    }

    The only thing I have changed is the last line as I don’t want a link or any HTML outputted. Just the count (even if it’s zero).

    echo  "<li ><a href='".bp_get_loggedin_user_link().BP_ACTIVITY_SLUG."/mentions/'>New mentions(".$count.")</a></li>";
    

    to

    echo  $count;
    

    It works just fine except for one thing…

    When the user has no new mentions I can’t get the code to display a ‘0’. It displays nothing at all.

    I’m pretty sure this must be a simple fix but I’ve stared at it for ages now and haven’t managed it.

    Can anyone help?

    #164887
    joe35
    Participant

    Hi, @mercime

    Here I am again! The author of the theme did an update and thereby solved the two of the three problems I had. But the problem with the Crop tool persists, now in a different way. I can upload the image, I can see both images for one or two seconds and the crop tool and immediately after it automatically crop a part of the image without having the control over what portion of the picture will be cropped.

    Could you please take a look on my website and tell me what you think? I don’t think it is related to JQuery since I no longer get this jQuery error.

    Thanks in advance.

    My Site URL: http://kostassamaras.com/develment
    Username: Peter
    Password: joe36lok

    #164586
    P
    Participant

    @Chouf1, that’s my blog you’re linking to. I am not sure if they added Throttling to the new Buddypress version. I opened a ticket months ago, the milestone has been set to: version 1.7 to Future Release https://buddypress.trac.wordpress.org/ticket/3732. This is a bit frustrating since Throttling makes for great spam control.

    @tifire Go to /bp-friends/bp-friends-functions.php in your Buddypress installation and change the friends_add_friend function to the following:

    function friends_add_friend( $initiator_userid, $friend_userid, $force_accept = false ) {
    	global $bp;
    
    	$friendship = new BP_Friends_Friendship;
    
    	if ( (int) $friendship->is_confirmed )
    		return true;
    
    	$friendship->initiator_user_id = $initiator_userid;
    	$friendship->friend_user_id    = $friend_userid;
    	$friendship->is_confirmed      = 0;
    	$friendship->is_limited        = 0;
    	$friendship->date_created      = bp_core_current_time();
    	
    	/**
    	 * BuddyPress Friend Request Throttling
    	 *
    	 * Set a throttle period for user friendship requests
    	 *
    	 * @author Patrick Saad
    	*/
    	
    	global $wpdb;
    	$qry = "SELECT date_created FROM wp_bp_friends where initiator_user_id = '".$initiator_userid."' order by date_created desc limit 1";
        $user_friend_requests = $wpdb->get_results( $qry );
    	
    	if ($user_friend_requests)
    	{
    		$latest_user_request = strtotime($user_friend_requests[0]->date_created, time());
    		$time_since_latest_request = time() - $latest_user_request;
    		
    		// that's 2 minutes
    		$throttle_period = 60 * 2;
    		
    		// if the last request was over 5 minutes ago, allow it
    		
    		if ($time_since_latest_request < $throttle_period)
    			return false;
    	}
    	// End of BuddyPress Friend Request Throttling //
    
    	if ( $force_accept )
    		$friendship->is_confirmed = 1;
    
    	if ( $friendship->save() ) {
    
    		if ( !$force_accept ) {
    			// Add the on screen notification
    			bp_core_add_notification( $friendship->initiator_user_id, $friendship->friend_user_id, $bp->friends->id, 'friendship_request' );
    
    			// Send the email notification
    			friends_notification_new_request( $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );
    
    			do_action( 'friends_friendship_requested', $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );
    		} else {
    			// Update friend totals
    			friends_update_friend_totals( $friendship->initiator_user_id, $friendship->friend_user_id, 'add' );
    
    			do_action( 'friends_friendship_accepted', $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );
    		}
    
    		return true;
    	}
    
    	return false;
    }

    This will prevent a user from sending a friendship request to someone if their recent friendship request date was less than, say 2 minutes (change the $throttle_period variable to modify this time)

    Just gave this a fresh test, works in Buddypress 1.7.2. This same concept can be applied to comments, groups, etc, you just have to find the functions and play around.

    #163671
    kkradel
    Participant

    @mercime

    I guess I should have said I want to DISABLE the text box all together. Get rid of it.

    So I need to know where this exists in the code so I can delete it, or disable it.

    I know how to close the text box via the repeated text message underneath the login area. The placement of the text box doesn’t allow for accessing the drop down menus in the navigation bar.

    This is hindering my non-techie users from using the site.

    Thanks!

    #163599
    albeck
    Participant

    Hi

    All was fine with BP until I upgraded to 1.7.1.. I was using the BP for Woocommerce plugin from Themekraft with no issues.

    After upgrading BP (and woo) I noticed that the BP menu didn’t work from the same place. There was a message that it had been moved to under settings. I thought this was an issue so reinstalled BP.

    Problems began: BP for Woocommerce plugin stopped the site working (in combination with WC and BP and, with just with BP or WC). I reverted back to BP and WC 1.6 – still no luck.

    I have tried reinstalling BP manually and removing WP_BP_ tables from the database – same outcome. All works until I active the BP for WC plugin – there’s a white screen.

    As a novice to WP my knowledge is limited but debug reads-

    SELECT COUNT(DISTINCT m.group_id) FROM wrd_bp_groups_members m, wrd_bp_groups g WHERE m.group_id = g.id AND m.user_id = 1 AND m.is_confirmed = 1 AND m.is_banned = 0

    Table ‘dyslexi5_wor3.wrd_bp_groups_members’ doesn’t exist

    SELECT g.*, gm1.meta_value as total_member_count, gm2.meta_value as last_activity FROM wrd_bp_groups_groupmeta gm1, wrd_bp_groups_groupmeta gm2, wrd_bp_groups_members m, wrd_bp_groups g WHERE g.id = m.group_id AND g.id = gm1.group_id AND g.id = gm2.group_id AND gm2.meta_key = ‘last_activity’ AND gm1.meta_key = ‘total_member_count’ AND m.is_confirmed = 0 AND m.inviter_id != 0 AND m.invite_sent = 1 AND m.user_id = 1 ORDER BY m.date_modified ASC

    Table ‘dyslexi5_wor3.wrd_bp_groups_groupmeta’ doesn’t exist

    SELECT COUNT(DISTINCT m.group_id) FROM wrd_bp_groups_members m, wrd_bp_groups g WHERE m.group_id = g.id AND m.is_confirmed = 0 AND m.inviter_id != 0 AND m.invite_sent = 1 AND m.user_id = 1 ORDER BY date_modified ASC

    Table ‘dyslexi5_wor3.wrd_bp_groups_members’ doesn’t exist

    SELECT * FROM wrd_bp_notifications WHERE user_id = 1 AND is_new = 1

    Table ‘dyslexi5_wor3.wrd_bp_notifications’ doesn’t exist

    Thanks for any help – my site http://www.dyslexiatribe.org.uk

    doxaliber
    Participant

    @karmatosed, thank you for your response.

    I’ve tried the default theme without translation on my development site, here:
    http://devel.escrivere.com

    No way, notifications doesn’t work. 🙁

    I’ve also another problem (but is less important, than the ones above).
    Users can’t edit their own forum posts, also if I’ve setup editing time to 15 minutes.

    Other ideas?

    doxaliber
    Participant

    Hi everybody, thank you for this great plugin.

    I begin with my platform datas:
    – wordpress 3.5.1
    – buddypress 1.7.1
    – bbpress 2.3.1
    That’s my site forum: http://escrivere.com/forums/forum-groups/indice-argomenti/

    I’ve made the transition from buddypress group forums to bbpress following your guide.
    All seems to work fine, but there’s a big issue that i can’t deal with!

    When a user tries to invite some other user to his group the invited users don’t receive any notification, not via mail nor on their status bar!
    The problem exists on public, private and hidden group forums.
    Some solution?

    Other issue: Even if a forum is private or hidden (using buddypress administration) users that are not subscribed to the group can see the topic title here:

    Discussions

    If group is private they are redirect to the page where they can request to enter in the group.
    If the group is hidden they get a 404 error page.

    I don’t know how to deal with bbpress forums options, if I made a group forum “hidden” using bbpress settings group vanish from topic index, also for users that are subcribed to the hidden group, except for moderators and keymaster.

    Ah, and another big big mistake when a users try to change group settings of his group (private, hidden, public) forum option is deselected and forum group vanish, until you select again the forum group!

    Hope you can help me!

    kkradel
    Participant

    This is a new one.

    WordPress Multisite 3.5.1
    BuddyPress 1.7.1
    Tetris Theme

    When an existing user comes to the site to login, and then after login they might have a notification message waiting.

    The notification message is in a large pale orange box that is the width of the website (and as long as it needs to be for the length of the message.) At the end of the message is a “Close” link.

    Click on “Close” and nothing happens.

    The orange box covers the drop down menus from the buddybar so that one can’t maneuver in the site.

    The only way to get rid of it is if someone notices that the same message is printed underneath their avatar in the sidebar and they happen to notice that there is a “Close” link there as well. Clicking the “Close” link in the sidebar closes the message both in the orange box and the sidebar.

    Thoroughly annoying behaviour.

Viewing 25 results - 626 through 650 (of 1,091 total)
Skip to toolbar