Search Results for 'theme'
-
AuthorSearch Results
-
April 9, 2015 at 2:47 am #237541
In reply to: [Resolved] Mention tag in forum how to get it ?
aces
Participant<?php // hacks and mods will go here function abc() { $user = get_userdata( bbp_get_reply_author_id() ); if ( !empty( $user->user_nicename ) ) { $user_nicename = $user->user_nicename; echo '@'.$user_nicename; } } add_filter( 'bbp_theme_after_reply_author_details', 'abc' ); ?>Without
?>on line three. Would suggest putting?>on it’s own line at the end…Edit : don’t know why it double posted…
n.b. This is presuming there is nothing else in the file. If you want to add other snippets they should go after the opening
<?phptag or before the closing?>and should not break up any other php snippets…I just noticed that you missed the
;from the end of theadd_filterline. This is important….April 9, 2015 at 2:44 am #237539In reply to: [Resolved] Mention tag in forum how to get it ?
Svend Rugaard
Participantwould you put the code as it should be because i dont get it then ?
Mine is looking like this now ?
<?php // hacks and mods will go here ?> <?php function abc() { $user = get_userdata( bbp_get_reply_author_id() ); if ( !empty( $user->user_nicename ) ) { $user_nicename = $user->user_nicename; echo '@'.$user_nicename; } } add_filter( 'bbp_theme_after_reply_author_details', 'abc' )?>April 9, 2015 at 2:08 am #237537In reply to: [Resolved] Mention tag in forum how to get it ?
Svend Rugaard
ParticipantLook here ? http://www.playstationforum.dk/topic/opdatering-a-forum/
My bp-custom.php is looking like this
<?php // hacks and mods will go here ?> function abc() { $user = get_userdata( bbp_get_reply_author_id() ); if ( !empty( $user->user_nicename ) ) { $user_nicename = $user->user_nicename; echo '@'.$user_nicename; } } add_filter( 'bbp_theme_after_reply_author_details', 'abc' )April 9, 2015 at 1:34 am #237535In reply to: [Resolved] List current users memberships
danbp
Participanthi @eikeco
you can use this widget.
Download the file and rename it to bp-my-groups-widget.php
Add the file to wp-content/plugins/ and activate it.
Go to appearence > widgets and pull it somewhere to your theme. Enjoy.April 9, 2015 at 12:45 am #237528In reply to: [Resolved] Mention tag in forum how to get it ?
danbp
ParticipantNothing happen ? Where do you try to use this function ?
And No you haven’t to use another snippet.The snippet is not correct as it ouput the display name. We need nicename.
Use this instead
function abc() { $user = get_userdata( bbp_get_reply_author_id() ); if ( !empty( $user->user_nicename ) ) { $user_nicename = $user->user_nicename; echo '@'.$user_nicename; } } add_filter( 'bbp_theme_after_reply_author_details', 'abc' );This will only show up in a bbpress forum. Like here, that’s what you asked for.
April 8, 2015 at 11:39 pm #237524In reply to: [Resolved] Mention tag in forum how to get it ?
danbp
Participanthi @svend-rugaard,
this is a bbpress trick. Add this snippet to bp-custom.php
function abc() { echo '@'. bbp_get_topic_author_display_name(); } add_filter( 'bbp_theme_after_reply_author_details', 'abc' );April 8, 2015 at 5:27 pm #237507In reply to: Add friend button error in Buddypress plugin
Henry Wright
Moderator@jay_chauhan when there’s a problem like this, it’s quite difficult to know where to look first because the problem is so broad. The link @bphelp provides above is a good place to start.
The usual approach is to disable all plugins, use the Twenty Fifteen theme, remove all custom code in functions.php and bp-custom.php and then work forward from there to identify what is introducing the problem.
It’s a tedious process ๐
April 8, 2015 at 4:02 pm #237493In reply to: Add friend button error in Buddypress plugin
Henry Wright
ModeratorHi @jay_chauhan
Does the problem happen with Twenty Fifteen activated? If not then the problem could be the theme you’re using.
April 8, 2015 at 1:36 pm #237482In reply to: [Resolved] Only display custom field if not empty
danbp
ParticipantYou just need an existing user_id.
He an example where you get a field value to add in a custom action in one of your template.
function bpfr_field( $custom_field ) { global $bp; // is xprofile component active ? if ( bp_is_active( 'xprofile' ) ) // fetch the user_id $current_user = wp_get_current_user(); $current_user_id = $current_user->ID; // fetch the data $custom_field = xprofile_get_field_data('42', $current_user_id); // 42 is a field ID // show the data echo '<div class="authorinfo">'. $custom_field . '</div>'; } add_action( 'myfield', 'bpfr_field', 1 );Then, add this at the appropriate place in your template
<?php do_action( 'myfield'); ?>Another example, which you can add at the begin of a custom function.
global $bp; // Check if the Activity component is active before using it. if ( ! bp_is_active( 'activity' ) ) { return; } if( bp_is_user() && ! bp_get_member_user_id() ) { $user_id = 'displayed: '. bp_displayed_user_id(); } else { $user_id = 'get_member_user: '. bp_get_member_user_id(); } // your stuf hereNote that both examples use global $bp, a check for active component with a different usage for a same result: if not active, the function will do nothing. This allows you to deactivate a component without throwing a warning or a php failure despite the function is in your theme, bp-cutom or plugin.
April 8, 2015 at 10:58 am #237468In reply to: Why is there no ajax on profile tabs?
mcpeanut
ParticipantAfter doing some reading this has come up a few times in the past and it seems its not going to happen, i see brajesh tried creating a theme a while back that used ajax on the members single profile pages but even he states its not for a production site, so no worries, i was just curious as to why its not as standard same as the way the other tabs work that’s all.
April 8, 2015 at 8:10 am #237455In reply to: Member , Activity Pages etc free
danbp
ParticipantPlease read here, as you have to debug your install.
Are all pages assigned to BP components ?
Have you same issue with Twenty Fifteen or one of the other WP default themes ?Note also that you got that issue after activating bbPress, which has his own support.
And as you use a premium theme, we can’t help you much here, as we have no free access to it’s code.April 8, 2015 at 12:14 am #237430shaquana_folks
ParticipantThe only reason why I started this topic was because I spoke to a WordPress representative and as I’ve done here, after explaining the issues to the rep, they said for me to get in contact with the creators of the plugin that allows me to do all of these news feed configurations so I assumed it was through here, BuddyPress. And I already was reading through the Codex, videos tutorials, support forums and speaking to numerous amounts of representatives and didn’t get anywhere. But okay, I will try reaching out to the creator of the Vipress theme and hopefully get my questions answered. Thank you.
April 7, 2015 at 11:39 pm #237428danbp
ParticipantI told about BuddyDrive because you have a download button aside a description written in french. And that plugin author is french, like me. And i’m a user of this plugin….
You use a premium theme, and we can’t help you much here if you have an issue with it. As we have no free access to it’s code.
As site admin, you can configure the registration form and add some description if you need some near a field.
Go to dashboard > users > profile fieldsIf you need some more details about BuddyPress feel free to read the Codex. And don’t hesitate to ask your theme support.
Have a nice day too.
April 7, 2015 at 11:18 pm #237425shaquana_folks
ParticipantI understand everything that you’re saying, but everything that you’re saying through here is still not resolving my issue to get the registration process to work on my site. I am not allowing just any random person to upload to my server with random documents if I am not only having them labeled as “Authors” (where they are able to edit their OWN profiles and edit their OWN posts, so on and so forth) and not as “Administrators” (where a person has control to change up EVERYTHING on the site and the server), but also for the fact that this Vipress theme was created to be compatible with BuddyPress, therefore, allowing people to be able to create a profile with, in this case, the MyLoopNetwork.
As far as with the whole newly register user, I already know to keep in mind about who I allow to become a member for I am constantly checking the back end of my site on a regular basis. All I’m trying to do is create my own version of a website where users can sign up as a new user, create their own profiles, update their posts, upload their own pictures, connect with other MyLoopNetwork users, create groups that people can join, and pretty much build up on their own news feed through their profiles without conflicting with any sections or areas of the overall site.
I don’t know anything about this BuddyDrive plugin that you have mentioned, but for the record, this is my first WordPress website that I’ve been working on for months and I’m trying to learn as much as possible. I’m just trying to get some assistance on how to resolve certain issues that came across my way with configuring this particular theme. So with you saying, “Youโre talking about pdf, doc and docx, but on the register page nothing appears about what type of file they have to upload (as it is required) and for what !” that’s what I’m trying to explain to you. That’s what pops up on my end and on other people’s end that are trying to create their own MyLoopNetwork profile, so therefore, I do not have any control over that, for I wasn’t the one that created that coding for it to show up that way. And then you was saying, “‘Here youโll be able to upload images. Try it out now!’ is a bit vague.” you will have to ask the creator of this Vipress theme and ask them why they have it set that way because, once again, I am NOT the one that created this theme, and this is how it automatically showed up on the registration page when people were trying to create their profile. So unless you’re going to actually give me a full detailed, step-by-step guide on how to resolve the issues that I’m trying to fix, I thank you for your time and patience and I hope you have a good day.
April 7, 2015 at 5:57 pm #237403In reply to: Changing avatar size?
Henry Wright
ModeratorHi @mrgiblets
The avatar sizes are set via constants that you can override.
Check out this article for more info: https://codex.buddypress.org/themes/guides/customizing-buddypress-avatars/
April 7, 2015 at 5:39 pm #237401In reply to: Changing avatar size?
mrgiblets
ParticipantOk just found this, I think this will achieve the same thing in a different way :
But I’d still like to be able to give the members page avatars a different class, so instead of it rendering img.avatar it would output img.ml_avatar for example.
Any ideas how to pass that new class arg here?
April 7, 2015 at 10:24 am #237371In reply to: Styling user roles differently? Different templates
Roger Coathup
ParticipantYou can add the following template to your theme to override how members profile are displayed: /buddypress/members/single/index.php
In that index.php you can include different template parts to display the user based on their role.
So, you’d have a template part to display writers, and a different template part to display subscribers.
You can read more on the template hierarchy here: https://codex.buddypress.org/themes/theme-compatibility-1-7/template-hierarchy/
April 7, 2015 at 10:07 am #237370In reply to: Customizing Buddypress Activity Wall
Roger Coathup
ParticipantChanging these titles isn’t the easiest thing, but BuddyPress does provide 2 ways you can do it. However, hacking core files like bp-activity-loader.php is definitely not one of them. [Never hack core files — have a Google if it’s not obvious to you why you shouldn’t]
Ok the 2 solutions are:
- Use a language / translation file
- Use the template hierarchy
The string “Site-Wide Activity” is translatable — all the strings are. You can implement a language file that translates ‘Site-Wide Activity’ into whatever string you’d like. Have a search for translating BuddyPress strings / POT files / poedit. There’s also a documentation (they call it the Codex) page on it: https://codex.buddypress.org/getting-started/customizing/customizing-labels-messages-and-urls/
The second solution is to use the template hierarchy. If you don’t provide a specific template for your activity directory, BuddyPress will use the page.php file from your theme and ‘inject’ the title “Site-Wide Activity” where page.php makes a call to the_title().
You can override this by implementing your own template — create a file called index-directory.php inside /buddypress/activity in your site’s theme. Copy the basics of page.php into that file, and replace the_title() with your hardcoded title for the page.
You can read more about the template hierarchy here: https://codex.buddypress.org/themes/theme-compatibility-1-7/template-hierarchy/
Neither solution is simple, you’ll either have to get your head around using poedit, or need some basic PHP coding skills and an understanding of the principles of templates and themes in WordPress. In the future, it would be nice to see a settings panel in wp-admin to configure these basic strings.
[p.s. if you don’t want to use poedit, you could take a look at plugin solutions for string translation, e.g. codestyling localisation]
April 7, 2015 at 3:23 am #237362In reply to: Merging all BP JS files into one
mrgiblets
ParticipantOk managed to do it, it’s a dirty way but it works…
1) Compile all of the above scripts into a single file “mynewjsfile.js” then minify it to keep it even more compact if you want (forget the buddypress.js thing as what I’ve done stops the script from looking for it completely).
2) Upload mynewjsfile.js wherever you want to put it (for the sake of this I’ve put it into my theme root /js/mynewjsfile.js
3) Make a copy of buddypress-functions.php (inside bp-legacy/)
4) In your new buddypress-functions.php around line 89 comment out the following :
add_action( 'bp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );Like this :
/* add_action( 'bp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); */5) Create a new folder called “buddypress” in your theme’s root and upload buddypress-functions.php into it. Now buddypress will use this file instead of the original.
6) In your wordpress functions.php add the following :
function mynewjsfile() { wp_enqueue_script( 'mynewjsfile', get_template_directory_uri() . '/js/mynewjsfile.js', 'jquery', false ); } add_action( 'wp_enqueue_scripts', 'mynewjsfile' );The ‘jquery’ is there because our new script requires it to function properly. This ensures that Jquery loads before it. False is telling wordpress to load it in the header.
7) Enjoy your new single minified JS file ๐
April 6, 2015 at 7:59 pm #237348In reply to: mentions suggestion js problem
danbp
ParticipantAnd no theme ? ๐
Seems that you have actually two theme declared on your site.
And apparently one of js function (jmigrate) is deprecated.Note also that BuddyPress doesn’t work when WP is in its own directory. Both should be in the same directory.
April 6, 2015 at 7:51 pm #237346In reply to: Show admin bar for normal users?
danbp
ParticipantHave you tried by using Twenty Fifteen or one of the other WP default theme ?
April 5, 2015 at 4:51 pm #237306shanebp
ModeratorThe file is here:
buddypress\bp-templates\bp-legacy\buddypress\members\register.phpThe recommended approach to changing any template is to create a template overload and make your changes in that file.
April 5, 2015 at 7:48 am #237299In reply to: turn off email notifictions in functions.php
5high
ParticipantBrilliant! It worked a treat, and I used the ‘user_register’ as suggested. So for anyone else looking for this solution, this is the code i used to turn some on and some off by default on new user registration:
add_action( 'user_register', 'bpdev_set_email_notifications_preference'); function bpdev_set_email_notifications_preference( $user_id ) { //I am putting some notifications to no by default and the common ones to yes to enable it. //ref. https://bp-tricks.com/snippets/changing-default-buddypress-notifications-settings and BP forum $settings_keys = array( 'notification_activity_new_mention' => 'yes', 'notification_activity_new_reply' => 'yes', 'notification_friends_friendship_request' => 'no', 'notification_friends_friendship_accepted' => 'no', 'notification_groups_invite' => 'no', 'notification_groups_group_updated' => 'no', 'notification_groups_admin_promotion' => 'no', 'notification_groups_membership_request' => 'no', 'notification_messages_new_message' => 'yes', ); foreach( $settings_keys as $setting => $preference ) { bp_update_user_meta( $user_id, $setting, $preference ); } }and this went in my child theme functions.php file.
Hooray! Thanks so much again – it will make a big different to our users experience.
Cheers ๐April 4, 2015 at 5:37 pm #237288auston1
ParticipantOh and I should add that I am using a child theme of Iconic one theme.
April 4, 2015 at 3:57 pm #237279In reply to: Display all Members on Member Page
shanebp
ModeratorCreate template overloads of these two pages:
buddypress\bp-templates\bp-legacy\buddypress\members\members-loop.php
buddypress\bp-templates\bp-legacy\buddypress\members\index.phpIn the first, change
if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) :
to
if ( bp_has_members( bp_ajax_querystring( 'members' ) '&per_page=1000') ) :In the second, delete the div that starts with:
<div class="item-list-tabs" id="subnav" role="navigation"> -
AuthorSearch Results