Forum Replies Created
-
cross reference is good – answered now!
In reply to: Show Profile changes in activity feedYou should add an action function to the xprofile_updated_profile() hook. It’s called when a profile is edited.
In your action function, you can use bp_activity_add() to create a new activity item each time a profile is edited.
You can find those functions in bp-xprofile.php and bp-activity.php, and it’s probably worth checking to see how they work.
If you are not familiar with writing hooks, there is some content in the docs section on here. [ https://codex.buddypress.org/developer-docs/action-reference/ ]
If you search the forums for bp_activity_add you’ll find some examples of how to setup and call that function – it’s at the heart of what you are trying to do.
@ehegwer – post your question as a separate thread, if you want users to find and answer it
Yes, there are already filters for this in the default theme.
Also, take a look at: https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/
In reply to: Get non-activated usersHi @bowromir,
This has the makings of a good debate, (and nothing to do with “get non activated users”.. Someone close this thread!)
I want to argue with you, refute your points, etc., etc. – but in reality, I tend to agree with a lot of them.
You are right, this site is very poor when it comes to finding information – even, as you point out, “how to” information (tricks… I hate that word!) that you know you read just a few days ago.
I’ve seen little constructive feedback, desire or direction from Automattic on this. So, I understand the motivation to create a separate site that attempts to do the job of presenting technical “how to” information well (and easily searchable).
I’m a little uncomfortable though about mixing your commercial side (themes) in the same site as the community resource, but accept there are arguments each way. I don’t know much about Adii and WooThemes, but suspect a lot of their content is self generated, or produced by their theme users. Where I worry about the ethics is if things are simply taken from this site (or others) and represented as “another great trick brought to you by Bowe”.
Ok, enough of hijacking this thread – and @travel-junkie‘s excellent snippet. Let’s talk separately sometime.
In reply to: Get non-activated users@paulhastings0 – are you suggesting we should copy good code snippets from these forums across to a 3rd party site that will sell themes? That’s sounds like a lot of freely acquired content and SEO for what’s ostensibly a commercial business.
I’m generally happy to submit and publish code to help people on these forums (and for them to use how they see fit, commercial or otherwise). It will occasionally be abused, and there are spam sites that will trawl and re-publish as their own work, and we can’t prevent that.
However, if I thought it was being republished blatantly with little added value, as you suggest, as an offering from another business, I would be much more reluctant to publish it in the first place.
https://codex.wordpress.org/The_Loop#Style_Posts_From_Some_Category_Differently
@rossagrant – these Codex pages on the loop are your ‘bread and butter’ when theming with WordPress blogs.
In reply to: Activity PageThe basic function for checking whether they are logged in is:
is_user_logged_in()
You could combine this with logic for php page redirect: e.g. http://www.totallyphp.co.uk/code/page_redirect.htm
Implement a static page / template with this code, and set it as the front page (via wp-admin… settings… reading… front page displays)
In reply to: Translating buddypressin wp-config.php:
`
/**
* WordPress Localized Language, defaults to English.
*
* Change this to localize WordPress. A corresponding MO file for the chosen
* language must be installed to wp-content/languages. For example, install
* de.mo to wp-content/languages and set WPLANG to ‘de’ to enable German
* language support.
*/
define (‘WPLANG’, ‘fr_FR’);
`In reply to: Stylizing the navigation barI’m not really sure what you are asking:
Do you want to allow all blogs to have their own choice of theme, but ensure that they use the same font for the admin bar?
That’s not really possible, because you don’t have any control over the CSS files in the sub site themes – if they define their own CSS settings for the admin bar / standard fonts / etc., they are the ones that will be applied in their site.
If you want that degree of control, you probably need to create a small set of bespoke themes that they can choose from, ensuring you have set the admin bar settings as you want them in each of those themes.
In reply to: BuddyPress Competition is heating up@sulley – on the flip side – with one company developing it, you have a single point of weakness. if they go under, the whole project disappears – not just one plugin.
However, I tend to agree with you: BuddyPress would definitely be a more attractive development platform if a solid company took more responsibility for specifying standard components, resourcing their development, ensuring stated deadlines were met, and supporting them.
It’s not possible with the current profile implementation to have structured fields made up of several component parts (they’d be useful though!).
As a workaround – you could group them together in their own profile group – and then it would require some rework of the edit / view profile templates to present the profile as you want it.
In reply to: Display recent group blog posts on home page?To show blog activity you’d typically customise your home page template to include a customised activity loop that just shows blog posts.
Check under Docs… Custom buddypress loops on ths site for details on how to do that.
There might also be off the shelf widgets that will work for you, but you will need to have a widgetised home page theme
In reply to: How To Show “Status Updates” In The Frontpage?DUPLICATE
This is the same question you posted a few hours ago: https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-show-status-updates-in-the-frontpage/For the solution, please see this thread: https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/customizing-buddypress-profile-page-default-tab-and-item-nav-order/?topic_page=1&num=15
In reply to: Creating a directory of already existing blogs1 solution: Add profile fields for them to enter their blog details, create your directory template with a custom members loop that checks for the blog fields and displays them. This may be inefficient for a sparse databse with lots of members
In reply to: plazaa – A german BuddyPress community@hnla ja ja stimmt! I thought long and hard about that, but decided proper names and all shouldn’t be translated… Honest guv!
In reply to: How To Show “Status Updates” In The Frontpage?If you want the activity stream as your front page – go to wp-admin … settings … reading … front page displays
If you just want a small area to show updates, try a widgetised theme, and add the sitewide activity widget
If you want something more bespoke, i.e. just status updates… you will have to write your own custom activity loop – check docs on this site for information on this. Make sure you do this in a new or child theme.
In reply to: How to display the most popular activities?update: for an individual activity BP uses the function call $fav_count = bp_activity_get_meta( $activity_id, ‘favorite_count’ );
If you look at bp_activity_get_meta you should be able to determine the table used, and the SQL query to build.
In reply to: It doesn’t work@paduy – there could be a number of reasons: file write permissions on .htaccess, restrictions with your server setup, etc.
You need to get your basic WordPress installation working correctly before attempting to install / activate BuddyPress.
@nuprn1 – thanks
In reply to: How to display the most popular activities?I believe favourites are stored as activity meta information.
Therefore, you should be able to write an SQL query that does the job for you. Retrieving a list of activity IDs ordered by a COUNT on the number of times it’s been favourited. You’d then loop through the popular IDs retrieving the info you wanted (name, etc.) – I guess you could even pull that in the query.
I don’t know the field names / table names off the top of my head, but a scan of the DB should reveal it.
There may be an easier way via the API.
yes, you know your IDs. But, I couldn’t see any obvious template tag to find the ID of the blog you are currently processing inside the bp_has_blogs() loop. You’ll need that ID to compare against your list of featured blog IDs.
I’ve asked it as a separate forum question for you: https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-do-i-find-the-blog-id-of-the-current-blog-inside-a-bp_has_blogs-loop/