Forum Replies Created
-
In reply to: Adding a activity to the Activity Stream
Yes, you can create your own new activity type, and add to the activity stream as a file is uploaded.
I can’t remember the function calls off the top of my head
In reply to: Theme won’t updateYou’ve not provided enough info on your file structure to provide help on this.
Clearly, from your screen grab, your own theme and not the default is being used, so it’s picking up on those files.
It might be an idea to list your full folder / file structure and also which amended file isn’t being picked up
In reply to: Translating buddypresshttps://codex.buddypress.org/translations/
Have a look in the WordPress plugin repository for plugins that let your users switch language. You’ll also find plugins that support translation of page content (as opposed to the standard BP menus / text)
In reply to: Author’s posts in his profileHej Patrik – are you building your own theme for this (writing PHP, HTML templates, etc.)?
You’ll have to modify the templates for your profile page (e.g. members/single/home.php in the default theme) to include your custom activity loop.
You can access the current user_id within that page, and pass it to your custom loop.
In reply to: Author’s posts in his profileyou can do this with your own custom activity loop.
Filter on blog posts and user ID.
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/
Is it an order of activation issue? i.e. needing to make sure the items are removed after BP has finished adding them, and not before… bp-config.php and functions.php are ‘called’ at different points in the initialisation.
In reply to: Login textboxesSet the width of the username and password input boxes in your theme’s CSS file.
If you don’t know the selectors for the input boxes, use firebug in firefox or safari developer tools to take a look at the code
In reply to: Template tag for activity_usernameIt’s not working because you are not passing an integer parameter for the user_id to bp_core_get_username()
bp_activity_user_id() is a template tag for echoing a value to the screen, not for fetching a value to pass to a function.
Instead use: “
In reply to: Template tag for activity_usernameThat surprises me… Post your full code sample, to show how you are calling it
The other thread, with code for the number of messages / notifications, and link across is: https://buddypress.org/community/groups/installing-buddypress/forum/topic/hi-hi-everyone-how-can-i-get-the-message-url-or-the-number-of-messages-and-settings-url/
In reply to: Template tag for activity_usernameYes, it’s missing from the API. If you want it as a single function call, you can always write your own: my_activity_user_nicename() and put it in your bp-custom.php
And, submit it to the trac as an API enhancement!
In reply to: Activity stream replies@antonrsa off the top of my head, isn’t that just a theming issue… Modding your loop? Or does the core template tag spit out all the replies en masse?
In reply to: How to allow ONLY image posts?@adelack Bp-album+ (I think it’s called bp media now) was going to be my other suggestion… It’s definitely a good starting point for your image upload challenges. Good luck with your site.
In reply to: Group loopYes, I suspect the group template only has the current group initialised when you are on a single group page. So, only has one group to loop over. The same as being on a single post page vs. a category page in standard WordPress. We had a similar issue with the activity loop.
Try passing the full set of parameters to the groups loop, rather than either a subset or none.
Let us know if that fixes it.
In reply to: How to Exclude a Group From the Groups Loop@ch8rt – rather than write that long nested if structure, put your group names into an array, and then check if the bp_get_group_name is in that array, using the PHP in_array() function: http://php.net/manual/en/function.in-array.php
@pollyplummer – Yes, an exclude parameter would be very useful – it came up in another forum thread recently as well
In reply to: Template tag for activity_usernamePass the ID into bp_core_get_username
In reply to: How to allow ONLY image posts?@adelack –
I would follow the recommendation from @lightcapturer and try the oEmbed plugin – which will let you pull images from urls
If you want actual image upload features, that would be much harder work – you could look at how the avatar upload code works for profiles and try to find some ideas from that
You could look at adding a filter on: bp_get_displayed_user_nav_ . $user_nav_item to remove the blog menu.
Or, take a look at these functions in bp-core.php:
function bp_core_new_nav_item( $args = ” )
function bp_core_remove_nav_item( $parent_id )I’m not 100% sure what you are trying to achieve. Do you want to add an extra filtering option on the activity list? This will involve some UI work as well as a call to bp_has_activities() template tag.
I think you might be getting confused between the bp_has_activities() template tag, and the bp_has_activities hook / filter.
It’s the template tag bp_has_activities() that lets you set ‘display_comments=stream’ as a parameter. I think you want to working with this template tag, and not the filter.
As a filter bp_has_activities accepts 2 parameters which you would then have to work with and modify (the list of activities, and a reference to the activities template).
In reply to: Customize built-in group widget?follow up: I took a look at the BuddyPress widget pack… that gives you widgets for member (popular, etc.) not for groups.
To set the tab order in the tabbed widgets plugin, it looks like you can just do it from the widget’s admin panel… changing the tab from the dropdown.
Unfortunately, the widget broke in my install, so I can test it.
In reply to: Customize built-in group widget?In general, you need to look in the wp-content/plugins folder to find the code for your widgets.
The code for the built-in groups widget is in wp-content/plugins/buddypress/bp-groups/bp-groups-widgets.php
In reply to: looking for co-authors of www.ratingstars.orgYou should post this request in the jobs board not in the gallery https://buddypress.org/community/groups/bp-jobs-board/
In reply to: Age and Gender@tubruk if you are having a problem using Adam at Hyperspatial’s functions for age (they look fine to me), then please leave a comment for him on his blog
The code you have for gender needs to be used inside a loop that’s iterating over fields, and have the correct profile fields and values set up for gender. You say you got the code from somewhere… Have you asked there about why it doesn’t work for you?
If you don’t get an answer on gender… Start a separate thread, but post a lot more information and code showing exactly how you are trying to use the code
In reply to: Multiple activity loops on same page@djpaul @nuprn1 – Thanks for the help guys: calling the second loop bp_has_activities() with a full set of parameters overrode the default settings for the page and fixed the problem.
[Edit: and there doesn’t seem to be any problem with the AJAX – e.g. changing the main drop down selector to just show blog posts, only affects the main activity stream, and doesn’t interfere with the second stream.]
In reply to: Multiple activity loops on same page@nuprn1 – yes, they were running sequentially, but the second one was just returning the same activities as the first.
As @djpaul suggests, I’ll make sure it’s getting a fuller set of parameters passed in its bp_has_activities() initiation, to keep it showing all activities. Hopefully, this should fix the PHP call.
It’s late here – I’ll leave fiddling with the Javascript side for tomorrow.