-
Author
Tagged: notification
-
April 12, 2014 at 21:25 #14956rudik2Participant
Sharmstr good job!
I have one question. How to add before number with notification some text for example “notification”??
Please look in my project: http://s27.postimg.org/a9p08f2ub/Bez_nazwy_7.jpgRegards,
TomaszApril 12, 2014 at 21:30 #14958KieranParticipantYou can add any text you wish before the li opens.
Example
return $items."MYTEXTHERE<li id='menu-bp-notifications' class='menupop'>
April 12, 2014 at 21:54 #14959rudik2ParticipantTHX. I see one problem. When i logout i see “number” notifications still in menu.
How to fix it?April 12, 2014 at 22:05 #14963KieranParticipantI found that issue too, but a quick get around for me was just to wrap it in a if logged in
if ( is_user_logged_in() ) { CODE_FOR_NOTIFICATIONS_HERE }
April 12, 2014 at 22:24 #14965rudik2ParticipantWhen i wrote before <li, text is after “number” and only in number i can “click”. Text is not active. I would like to text will be befor number and active button.
Sorry for my enlish.April 12, 2014 at 22:43 #14968KieranParticipantYou can add it before the span then which will make it clickable (you’ll probably need a space at the end of the word too)
April 12, 2014 at 22:52 #14970rudik2ParticipantWow, working great! Thank You! One more question. How to edit number backgrund color when is 0 notification?
April 12, 2014 at 23:18 #14972rudik2ParticipantSorry for my english. Where i can edit background color (number) when is 0 notification?
April 12, 2014 at 23:21 #14973KieranParticipantYou can play around with this CSS, first is for state without anything (so, 0) and second is for state with notifications (1 +)
#ab-pending-notifications {
background: none repeat scroll 0 0 #ddd;
border-radius: 10px;
color: #FFFFFF;
display: inline;
font-size: 10px;
font-weight: bold;
padding: 2px 5px;
text-shadow: none;
}#ab-pending-notifications.alert {
background-color: #1FB3DD;
color: #FFFFFF;
}April 20, 2014 at 06:36 #15556derekmeloParticipantHello guys, it worked very well here too, but how can I add the notification dropdown?
Thanks guys!
April 20, 2014 at 14:31 #15566BoblebadParticipantWill this work with the Sweet Date theme as well ?
April 20, 2014 at 16:04 #15567sharmstrModerator@derekmelo You’d have to modify the code to loop through the notifications and echo out the “li”s for each.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
April 21, 2014 at 01:09 #15580mckownParticipantHere’s an update:
Includes the word “Messages” before the bubble
Displays just in top nav menu and for logged in users only (if you want to switch to the other menu change ‘top’ to ‘primary’COPY CODEadd_filter('wp_nav_menu_items','add_notification_to_custom_menu', 2, 2); function add_notification_to_custom_menu( $items, $args ) { if ( is_user_logged_in() ) { if( $args->theme_location == 'top' ){ $notifications = bp_notifications_get_notifications_for_user( bp_loggedin_user_id() ); $count = ! empty( $notifications ) ? count( $notifications ) : 0; if ($count > 0 ) { $alert = 'alert'; $pending = 'pending-count'; } else { $alert = 'no-alert'; $pending = 'count'; } return $items."<li id='menu-bp-notifications' class='menu pop'><a href='".bp_loggedin_user_domain()."notifications/'>Messages <span id='ab-pending-notifications' class='" . $pending . " " . $alert . "'>".$count."</a></li>"; } } return $items; }
April 21, 2014 at 03:32 #15581mckownParticipantstill one glitch I can see .. Everything looks great in Safari but Chrome & IE are having trouble. They’re displaying the Site Title in the Nav … once the notifications are read though it goes away .. how I have no clue
update .. and 30 seconds later it stopped doing it without me changing a single line of code .. God I hate technology LOL
April 22, 2014 at 15:22 #15634catholicauthorParticipantHi, seems like a great addition! I tried adding to to my child functions.php, and Dreamweaver says there’s some error on line 16 (?), starting on this line ‘return $items. “<li…’
It’s thrown me a 500; any further recommendations? I have BuddyPress Live Notification installed. Should that snippet, when added to functions.php automatically insert something in the menu?
April 22, 2014 at 16:05 #15643sharmstrModeratorneed more detail. ‘some error’ doesn’t tell us very much 🙂
I have it working with Live Notification, but had to hack it to get it to work. Live Notification updates it in the Admin bar.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
April 22, 2014 at 17:26 #15655mckownParticipantthe closing li is getting stripped out of the code I posted above for some reason .. just close the li on line 15 above
April 23, 2014 at 17:43 #15736mckownParticipantGlitch … Log in as a non-admin user on either Chrome or IE .. the styling gets thrown off if the bubble is in the top menu and the website title is printed in the menu regardless of where the notification bubble is set to.
You will not see this glitch if you’re logged into your site as an admin … Any ideas???
April 23, 2014 at 18:11 #15748designingParticipantHi Guys,
I thought this was a nice little addition to the theme. So I’ve added the code followed all your instructions. Now I’m getting a complete white blank screen. Any ideas 🙂
ThanX
April 23, 2014 at 18:23 #15752sharmstrModerator@mckown. I’m not having that issue. Works fine for me in all browsers and all levels of users, logged-in or not.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
April 23, 2014 at 18:33 #15758sharmstrModerator@designing It could be any number of things, but usually has something to do with either not copying the entire code OR when you copied it it put in backticks instead of single quotes.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
April 23, 2014 at 18:36 #15762designingParticipantHi Sharmstr,
Really appreciate your reply. I had to deleted the child theme to get back which wasn’t a problem, and tried it again but got the same result 🙁 So I think I better wait until the release it on a new update.
Thanks for you help though
Cheers
April 24, 2014 at 13:52 #15929catholicauthorParticipantHey guys, it’s working fine, but it’s displaying to logged out users with the last notification count. Thoughts?
http://catholicauthor.startlogic.com/journal/members/dan/April 24, 2014 at 14:27 #15930sharmstrModeratorYou need to wrap it in a is_user_logged_in conditional check
COPY CODEif ( is_user_logged_in() ) { CODE_FOR_NOTIFICATIONS_HERE }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
April 24, 2014 at 21:43 #15989SplendorParticipantHi,
Have you updated your pastebin with all the wrap ups and so on? So i don’t take one that doesn’t work correctly..
April 25, 2014 at 00:33 #15999Creative InhabitantsParticipantAwesome idea guys, looks great. Any chance someone could help me remove the notifications from the top menu, but keep in the main menu?
Thanks!
Attachments:
You must be logged in to view attached files.April 25, 2014 at 00:34 #16001Creative InhabitantsParticipantAwesome idea guys, looks great. Any chance someone could help me remove the notifications from the top menu, but keep in the main menu?
Thanks!
Attachments:
You must be logged in to view attached files.April 25, 2014 at 08:41 #16035Creative InhabitantsParticipantI can get it to populate in both the top nav and main nav, but would like to remove from the main nav. Other than that, implementing and styling is very straight forward.
July 4, 2014 at 14:19 #21732AbeKeymasterHi guys and girls
We implemented this functionality and it will be available in next theme version. Current version is 1.5
I attached 2 previews, one from admin – Appearance – menus and one from the front-endBig thanks to @sharmstr and you other contributors
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.Attachments:
You must be logged in to view attached files.July 4, 2014 at 14:20 #21735AbeKeymasterWe are working on a live update feature right now that it will auto-refresh the count in the menu.
Will keep you posted.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.July 7, 2014 at 12:34 #21876AbeKeymasterWohoo. We added live AJAX notifications and some other features. Check out the attach. It will be available in 1.6 coming around 15th July
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.Attachments:
You must be logged in to view attached files.July 16, 2014 at 18:32 #22777KieranParticipantEeee I’m chomping at the bit here – any news on 1.6 release date?
July 19, 2014 at 18:13 #23011AbeKeymasterSorry for the delay, coming on Tuesday
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.July 24, 2014 at 22:47 #23551Creative InhabitantsParticipantIs anyone else getting some funky header alignment with the new update?
Attachments:
You must be logged in to view attached files. -
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.