Search Results for 'theme'
-
AuthorSearch Results
-
August 11, 2015 at 6:57 pm #243051
In reply to: [Resolved] Add Count Near Nav Menu
gurselgunacar
Participant@danbp you are my hero. i tried to find this code for 2 weeks 🙂 you solved that. my theme doesnt contain user menu. So i need to add count of notification. Lastly how can we move this menu items left side of menu?
August 11, 2015 at 5:51 pm #243047In reply to: [Resolved] Add Count Near Nav Menu
danbp
ParticipantAdd this to bp-custom.php and give a try ! Should show at the left of the logout button on Buddy theme nav bar
function my_nav_menu_notif_counter($menu) { $url = bp_core_get_user_domain(bp_loggedin_user_id()) .'notifications/'; // condition: user must be loggedin if (!is_user_logged_in()) return $menu; else $notif = '<li><a href=" ' .$url. ' ">Notif ['. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .']</a></li>'; $menu = $menu . $notif; return $menu; } add_filter( 'wp_nav_menu_items', 'my_nav_menu_notif_counter' );August 11, 2015 at 1:03 pm #243025In reply to: How to change the activity avatar size
ajay25
ParticipantHi,
Please ignore the previous message.
1) I created a new child theme and created a style.css and function.php.
2) In function.php, I used the below code. It changed the size of the profile pic but not the size of the profile pic in the activity streamdefine ( 'BP_AVATAR_THUMB_WIDTH', 80 ); define ( 'BP_AVATAR_THUMB_HEIGHT', 80 ); define ( 'BP_AVATAR_FULL_WIDTH', 175 ); define ( 'BP_AVATAR_FULL_HEIGHT', 175 ); define ( 'BP_AVATAR_ORIGINAL_MAX_WIDTH', 300 );August 11, 2015 at 12:53 pm #243024In reply to: How to change the activity avatar size
ajay25
ParticipantHi,
As per the link that you shared, I created a child theme and a style.css in it.
I used the code as mentioned above but it didn’t work. Unable to know where I am making a mistake.
August 11, 2015 at 12:47 pm #243023danbp
ParticipantAugust 11, 2015 at 12:09 pm #243014In reply to: How to change the activity avatar size
danbp
ParticipantNote: I am using the default theme of buddypress.
Weird ! Have you tried with Twenty Fifteen ?
First, read here:
Try to add the define to your child-theme functions.php, instead of bp-custom.
Spare bandwidth…
define ( 'BP_AVATAR_ORIGINAL_MAX_WIDTH', 640 );Are you sure you want to allow such a big size for a picture who use as max full width a default size of only 150 px ? 😉August 11, 2015 at 10:44 am #243009danbp
ParticipantMention stuff is in buddypress/bp-activity/css and buddypress/bp-activity/js
To modify the text color of the name list, add this into your child-theme style.css.
Use !important for the new rule..atwho-view { color: #e30472!important; }August 10, 2015 at 10:23 pm #242989danbp
ParticipantOnly thing i understand from default.css concern gallery and images rules.
If you don’t want them, remove them or usedisplay:none;bp-default styles are in bp-default/_inc/css/default.css
To overide, you use a child-theme containing a style.css fileAugust 10, 2015 at 6:45 pm #242982rgrober
Participant@danbp, thank you for the reply!
I was modifying media queries in the style.css of my child theme (placed at the end of the css). That is actually working now.
My new question would be is there anyway to disable the already existing media query rules?
I’m aware the bp-default is no longer maintained. I’m using the latest version of BP and WP.
August 10, 2015 at 6:20 pm #242980danbp
Participantcan you give details please, as media queries and css are not, imo, the same thing. What do you mean by media queries in style.css ?
Can you tell what you want to do exactly and what you have already done ?
Also bp-default theme is no more maintained. Are you still using it ? And if so, what WP/BP version are you using ?
August 10, 2015 at 5:13 pm #242978In reply to: Hide friendshp in sitewide activity stream
danbp
Participanthere a complete solution you can use for friends privacy.
– Whe’re going to show the friends menu only to… friends !
– We remove friends activity.Copy this to bp-custom.php
function bpfr_maybe_hide_friends_nav_etc() { $retval = false; if ( bp_is_user() && ! bp_is_my_profile() && ! friends_check_friendship( bp_displayed_user_id(), bp_loggedin_user_id() ) ) { $retval = true; } return $retval; } function bpfr_hide_friends_nav_to_non_friends() { // Stop if condition is not filed if ( ! bpfr_maybe_hide_friends_nav_etc() ) { return; } // otherwise, we remove the nav bp_core_remove_nav_item( 'friends' ); // bp topnav bp_core_remove_subnav_item( 'activity', 'friends' ); //bp subnav (my activities, my groups, etc) } add_action( 'bp_ready', 'bpfr_hide_friends_nav_to_non_friends' ); // we want also to remove all friends related activities to non friends function bpfr_hide_friends_activity_type_to_non_friends( $activity_action = array(), $component_id = '' ) { // if condition is not filed we go back to original output if ( 'friends' != $component_id || ! bpfr_maybe_hide_friends_nav_etc() ) { return $activity_action; } // otherwise, we remove member from context $activity_action['context'] = array_diff( $activity_action['context'], array( 'member' ) ); return $activity_action; } add_filter( 'bp_activity_set_action', 'bpfr_hide_friends_activity_type_to_non_friends', 10, 2 );Related topic (other solution, or strict answer to your question) 😉
https://buddypress.org/support/topic/documentation-for-remove_action-activity-streams/#post-242974August 10, 2015 at 4:47 pm #242974In reply to: documentation for remove_action activity streams
danbp
Participanti wouldn’t remove the whole action hook, as other functionnalities from other plugins, can use it. Filtering is even better.
bp_parse_{component}_argsis intended to filter template loops.If you remove an {activity} type with this function, it will remove that activity from each activity feed (swa, profile and group). Something like an all or nothing thing.
bp_parse return values. So if you want to remove something, you have to list what you want to keep to show, and not what to remove !
Here a snippet, listing all existing BP activity types (2.2.x). Simply comment or remove the type you don’t want.
function my_bp_activity_types( $retval ) { // list of all BP activity types - remove or comment those you won't show. $retval['action'] = array( 'activity_comment', 'activity_update', 'created_group', 'friendship_created', 'joined_group', 'last_activity', 'new_avatar', 'new_blog_comment', 'new_blog_post', 'new_member', 'updated_profile' ); return $retval; } add_filter( 'bp_after_has_activities_parse_args', 'my_bp_activity_types' );IMPORTANT: copy/paste to bp-custom.php or child-theme functions.php. Used as-is will do nothing ! You have to remove the type you don’t want from the list….
Third party plugins (like bbPress) use also activity types. Easiest way to get the right type name is to check xxxx_bp_activity table in DB and search for it in the Type column.
@umar007, removingfriendship_createdwill solve your question.
@djsteveb, removenew_avatar! 😉August 10, 2015 at 6:30 am #242943In reply to: Custom display of sitewide notices
chlab
ParticipantHey thunksalot
You have to upload widgets to your theme directory, never modify the contents of a plugin directory.
So e.g. add a “widgets” directory in your theme directory and upload it to there. Then you should see a “Smart BuddyPress Sitewide Notices” widget in the WordPress backend. Activate that and disable the default one.August 10, 2015 at 5:59 am #242942jkin
Participantthis is not a Buddypress issue.
I have solved it by editing the theme’s plugin.
Solved. thanks.August 9, 2015 at 9:11 pm #242938In reply to: New Install and getting error
djsteveb
ParticipantFirst thing I would do – go to permalinks – note what the settings are – change setting to something else – save. Then change settings back and save.
see if it now works.
if not I would check the bp associated pages thing – https://codex.buddypress.org/getting-started/configure-components/#settings-buddypress-pages
see if works..
if not – deactivate all plugins except BP… switch to default 2014 theme… see if works..
August 9, 2015 at 8:39 pm #242933djsteveb
Participant@wpguru6
you MAY have a “bp login widget” under widgets in themes-appearance-widgets and not need to get into the actual php codes.. and there are plenty of other addons in the wp-repo as well ( https://wordpress.org/plugins/search.php?type=term&q=login+widget )add a custom post or video with another widget perhaps?
August 8, 2015 at 9:46 pm #242918djsteveb
Participant@jrunfitpro – hopefully one of the bp devs will chime in as to whether or not the comments on static pages, and or if comments on multi-site blog posts / static pages are supposed to be pulled into activity stream when site tracking is turned on.
This COULD be a bug that needs to be put into trac..
or it may need to be a feature request to add an additional setting somewhere to enable or disable or something..
The last bp update was June 18th, 2015 according to the blog and the download page here.
Not sure how to contact one of the devs to ask if this is an intended action – also not sure if this lack of comment tracking is due to my use of some old plugins, or me not using the default theme – I could convert one of my test sites to see if doing all defaults makes any difference.
Maybe @boone or @james or someone knows about this.
I could see many people finding this as a normal setting getting out of control – and I wonder if new comments on an old post should show up in the most recent activity stream , or would be added to a thread WAAY back in the activity if the post / page was created a year ago.. know what mean?
Hopefully someone else can shed some light on how this is supposed to work so we can know if it’s working and if there are any current methods for modifying the current, or future intended behaviors.
It’s too bad the title of this thread has Optimize Press in it – as I THINK some of the BP folks will completely dismiss it as it’s main question appears to be about a paid third party thing – yet the issue itself may be related to all bp installs actually.
August 8, 2015 at 1:58 pm #242905In reply to: Editing media queries
rgrober
Participant@djsteveb, I found a way to activate the bp default theme from long ago, so that I could just build upon it:
I am not using the “twenty-fifteen” or 2014 theme.
Thanks again for responding!
August 8, 2015 at 7:52 am #242902In reply to: documentation for remove_action activity streams
djsteveb
ParticipantI’d love to see some documentation on the ways to use this function..
I’m having to retire the old “activity block plugin”
So I guess code should be added to them functions.php… and this is more lightweight than doing a plugin or something in bp-custom? Not as easy to change main themes this way – but I prefer lighter loads with extra dev notes than heavier loads for easier to re-theme once every so many years..
with activity block I have currently set to “disallow”
deleted_group_document, new_blog, new_member, joined_group, friendship_created, activity_likedWhat would be the code needed to put in the theme function to block these things with how bp stuff is setup these days?
remove_action( 'bp_register_activity_actions', 'friends_register_activity_actions', 'bp_blogs_format_activity_action_new_blog', 'bp_groups_format_activity_action_joined_group' );I checked hooker io and I do not see any info about friendship created, deleted_group_document, activity liked…
I am guessing that old code “new_blog” is replaced by “bp_blogs_format_activity_action_new_blog” for current bp stuff.. ?
“joined_group” = “bp_groups_format_activity_action_joined_group” ?
“new_member” = “bp_members_format_activity_action_new_member” ?
friendship created = ?
deleted_group_document = ?
activity liked = ?would adding “bp_xprofile_format_activity_action_new_avatar” stop the flood of activity showing when someone changes profile pic 10 times in an hour?
August 8, 2015 at 6:10 am #242900In reply to: 404 error on topic pages
djsteveb
Participant@labsupplyorg –
Topics? You mean like bbpress forums topics? What do you mean exactly by “topic pages”?I would..
check your permanlinks perhaps? go there, note what they are.. change them to something else.. save.. then change back.. save again..
May not be related, but on one of my sites this similar issue crops up every other time I update rtmedia plugin for some reason.Does this happen if you disable other plugins?
Does this happen with the default twenty-fifteen or 2014 theme?August 8, 2015 at 1:19 am #242897In reply to: Editing media queries
djsteveb
Participant@rgrober – I am pretty new to this as well. I wonder what you mean by the buddypress default theme – as there was a bp default theme thing some time ago – but from what I have seen (and I have not seen everything) – the bp default theme stuff is legacy – do you mean you have a fresh install of wp / bp and it is using the “twenty-fifteen” or 2014 theme?
August 8, 2015 at 12:47 am #242896In reply to: Editing media queries
rgrober
ParticipantHey, @djsteveb, thank you so much for the response!
Full disclosure, I’m very new to a lot of this.
I’m building on the buddypress default theme. I’ve tried to add media queries to style.css in my child theme, but I’m not having any luck.
How should I go about modifying media queries?
Any help you can provide is greatly, greatly appreciated.
August 8, 2015 at 12:39 am #242895In reply to: Editing media queries
djsteveb
Participant@rgrober – What theme are you asking about?
I am not sure this is even a buddypress related question / issue.August 7, 2015 at 10:32 pm #242894In reply to: Members Page not working.
atfpodcast
Participantnever mind its theme related. it looked like it did not work in the default 2014
August 7, 2015 at 9:16 pm #242892In reply to: site crashing
djsteveb
Participant@hot-head-videos – have you tried to switch to default theme, and deactivate all your other plugins, and then install BP.. and run through bp’s setup process… then start to enable your other plugins one by one to see if there is a conflict with other plugins / themes at that point?
I highly suggest deactivating everything and get BP working with just wp and default theme first.
-
AuthorSearch Results