Forum Replies Created
-
In reply to: Create profile fields visible only to administrator
What was the problem you encountered with your approach?
Paste your code, and let us know the error messages, and someone may be able to assist.
Yes, the activity stream items are created at the time a post is created, so the bug is explicable. Surprised it’s not been encountered before ( @djpaul – have you noticed this previously? ).
I suspect the best solution is to store the links in the activity stream in a ‘permalink neutral’ way, and then apply a filter that ‘adds’ the current permalink structure to them when they are displayed / accessed.
I’ll be surprised if anyone has a sample piece of code using search_terms to post on the forum
You may be best to give it a try — write some test code, and see what happens.
By walking through the bp_has_members() function, you should be able to determine how to set up your search string
In reply to: when upgrading to 1.56 my site stopped workingswitch to bp-default theme… does your site display now?
If so, it is almost certainly a problem with your theme. Which one are you using, or is it a custom build?
In reply to: bp_activity table is emptyThe bbPress plugin does create entries in the activity stream by default… including for site wide forums.
Sitewide activity widget is not part of BuddyPress — it’s a 3rd party plugin from buddydev
Do you see your bbPress activities in the normal BuddyPress activity stream? If not, there is something wrong in the way you have your site configured.
If you problem is just in the sitewide activity stream widget, then try asking on their forums at Buddydev.
Remember to include version numbers for your WP / BP and bbPress
In reply to: bp_activity table is emptyHave you enabled the activity stream component in your BuddyPress settings?
The basic step for debugging any problem like this is — disable all your plugins except BuddyPress; switch to the default theme. Does it work now? If not, there is something wrong with your install.
If it does… switch to your theme, test; then add your plugins one by one testing at each stage.
From that, you can determine what’s breaking it — install, theme, or specific plugin
[edit: from your error log, you clearly also have problems with bbPress not being installed]
This page gives you information on filtering the bp_has_members loop:
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-members-loop/We’ve implemented filtering on profile field values – but did it in 2 passes. It’s fairly complex once you start tying in with the AJAX handling of the members directory.
In reply to: I need a PHP code IF user-levelUser levels were replaced by roles in WP 2.0, and were deprecated in 3.0 — so, checking wp_user_level and such like shouldn’t be relied on
phpxref.ftwr.co.uk/buddypress
No, there isn’t anything on this site.
Your best reference source is the site phpftwr, which will list all the BuddyPress functions for you, and let you drill down to find out what they do.
Are you being serious? You are asking just 1 hour later, why no-one has responded to your question?
You can’t add conditional menus / menu options via the WordPress menu settings in wp-admin.
If you want conditional menus, and those with PHP driven dynamic links (e.g. changing for the current user), you will have to code them in your header / navigation templates.
In reply to: I need a PHP code IF user-levelAre you using a plugin to create your user levels? If so, which one? WordPress supports roles and capabilities for users by default, but doesn’t have numeric levels.
If s2member have a look at their documentation for if queries on member level.
I doubt there’s any documentation — so, you’ll have to search your codebase for it, and then walk through the code (it’s clearly coded — so, not a problem to read what’s happening).
You’ll find the function in bp-groups-activity.php
In reply to: How To: Group Level Pages, Files, Custom Menu ?There was a group documents plugin, but that’s no longer available.
It would be a project to build these capabilities, but nothing too difficult for a BuddyPress developer — the starting point would be the groups extension API: https://codex.buddypress.org/developer-docs/group-extension-api/
Off the top of my head –
You’ll need to set the component as ‘group’ (groups?), as it’s activity related to groups not to the activity stream.
I’m not sure how it will handle ‘action’ and ‘type’ if they’ve not been pre-registered by the groups component — unfortunately, you might have to trawl through the code to work that out.
You might also want to use: groups_record_activity() rather than going directly to bp_activity_add()
In reply to: rating system and anti-spamming capabilitiesFor ratings — have a look at GDPress and their star rating plugin
You can search for ‘buddypress.org anti spam’ on Google ( search doesn’t work on this forum ), and it should throw up a lot of previous discussion on the subject.
@djpaul also revealed that a coming version of BuddyPress will have Akismet support for activity stream entries (1.6 or 1.7… I can’t remember which).
In reply to: How can I get rid of this?@newpress — if you want to modify a website theme, at the very least you’ll need some HTML / CSS knowledge. It would be a good idea to book up on those before attempting to modify the look and feel of your site.
have a look in the codebase at bp_the_profile_field_name() and you’ll see the ‘get’ function that it uses.
Trawling the codebase is the best way to find functions for BuddyPress (or the site phpftwr – google a function name and it will come up in the references)
In this case your function is bp_get_the_profile_field_name()
It’s straightforward to do in BuddyPress – @hotsitez has already pointed you to the basic function for echoing profile field values (which is also documented in member-header.php), and I’ve told you which files you need to look at.
As a PHP coder, you should be able to walk through those files to find the appropriate points in the code to hook actions in or modify your templates. You should also be able to search the BuddyPress codebase to find profile field functions you can call — start with the one @hotsitez gave you.
You can also look on the documentation (codex) area of this site for information about the profile field loop which may help you further – and point you to how base and other profile field groups are handled.
[Edit: and, if you want to learn about the action, filtering paradigm for development, you can find introductory articles on the wordpress.org codex]
I’m pretty sure this came up recently, and the core team had been unable to replicate — @djpaul was this something you were looking at?
an outline solution (there are lots of areas where you’d have to work to implement it):
When a group is created, you could write a hook that creates a corresponding xprofile field group (remember to hook on delete group as well to remove the profile field group)
In the member’s profile screens, you would hide that xprofile field group if the member is not a member of the group
In a hook on Join Group, you’d want to display an additional screen that prompts for the user fields, and when that is submitted use the xprofile API to write the data to the user’s profile
I guess finally, you’d also want to modify the members loop inside the group to show that informationThere’s a lot of code for you to trawl through
In reply to: register new users and missing pagesDid you complete the BuddyPress setup wizard in wp-admin? Including creating the pages?
For new users, you need to enable new user registrations in wp-admin settings
You’ll find the various files in the members/single folder. member-header.php and home.php are ones you should start with
@jason — It’s something that could be built, but it’s a reasonable chunk of development work, which would need some thought and investigation.
I doubt anyone on the forum has done anything like this wrt blogs (certainly in a manner where they can give a quick answer on the forum). We’ve done similar things with the members directory (adding multiple filters), but it was considerable pieces of code and expertise.
In our case, we layered new functionality in / javascript etc., rather than trying to extend any existing function.
I suggest you post follow up as a separate question so people don’t miss it. We tend to switch off the admin bar, so I’m not sure what’s available on there.