Forum Replies Created
Right, so the advice from @shanebp worked.
As I mentioned above, when originally did the translation, I didn’t use Poedit, I used an online editor (after using Codestyling first). Turns out the they simply aren’t as advanced as Poedit and those source keywords were really important here. As I was going through the strings in Poedit, I was seeing strings I had never seen before in the other software since the other editing softwares probably couldn’t read the strings in the first place.
I’ve seen various threads where other people have struggled with translating the same thing. Perhaps an update to the documentation including information about these specifics might be helpful for other in the future. The documentation https://codex.buddypress.org/getting-started/customizing/customizing-labels-messages-and-urls/ does talk about using Poedit, but leaves out those rather important details needed to get a complete label and message change.
Either way, this issue is resolved.
@shanebp and @danbp thank you for the replies on this. I did my change of this using Codestyling Localization. That didn’t work (it worked everywhere but in the subnav). Then I manually created po/mo files and it also worked everywhere but in the subnav. When I did that translation, I created the po using an online po edit (I don’t remember which one, and it certainly didn’t say anything about source keywords).
I’ve now installed a copy of PoEdit on my pc and am working through the file now, with the keyword information mentioned in the link above.
I have a couple additional question though, because I’ve found conflicting information on the internet and following the instructions from the BP documentation doesn’t seem to work right.
The buddypress-en_US.po and buddpress-en_US.mo files need to be in which folder?
The documentation says to put them in /wp-content/languages/plugins/ however, sources I’ve seen elsewhere say to put them in /wp-content/languages/ – currently neither of them work for me, but I’m starting this translation from scratch now and I want to get it right.
Also, does the language define statement in wp-config.php need to be set for this to work? Keep in mind that I’m not doing a full on translation, just this BuddyPress translation to change Friends to Connections.
Yeah, I just saw the other thread with the interim fix to rename my stylesheet to buddypress.min.css. I’m tracking that thread now too and the support ticket.
I appreciate the quick reply.
@mcpeanut It sounds like you are doing everything right if I’m reading your posts correctly. There are only 4 edits to the snippet that need to be done.
One thing you need to check is to make sure is that you are not blocking search engines on the site. This may not work if the site isn’t being tracked. Also, if this is the first time you’ve started using bp-custom.php make sure you’ve got the file formatted correctly with the opening and closing php tags.
I am still using this code, and it still works (I tested it again before posting this comment to be sure), it is as solid as ever.
Keep in mind that there is a push to keep some native support for this kind of thing into BP core. You can read more about it here: https://buddypress.trac.wordpress.org/ticket/3460
There is no timeline for when it will be ready.
Have you tried this addon for the plugin?
I would also try to get support from the developers on the BadgeOS site. You are likely to get better help there than here since it is such a specific use. They do know and support BuddyPress so you may get your answer from them.
@neo-tronic not sure where that error is coming from. I’m still using that snippet to support CPTs without issue. You can narrow it down be checking which one of the above is line 35 and edit it as needed.
Also, keep in mind, the BP crew is hard at work getting CPTs officially supported. I think it has been bumped to version 1.9, but they’ve been working on the open ticket related to this. Once CPTs get official support, it becomes a game changer for BP.
I’ll add that the code resaves the activity record everytime the CPT is updated, even after it has already been published. So everytime an edit is made and saved to the CPT, the corresponding activity stream record gets bumped.
I should have updated this thread ages ago. Yes, I have long had custom post types showing up in my activity stream and it is pretty rock solid.
I use this snippet (which I found someplace but don’t know where) and add it to bp-custom.php, which is a file you create in your plugins folder.
The snippet is currently written for MarketPress products, however, you can use it to support any custom post type. Edit the four things below to modify for your custom post type.
– Edit the function name to whatever you want, it just needs to be unique,
– Line 19 to be the the custom post type you want to use;
– Line 28 to reflect the activity record text you want,
– Line 62 to reflect the name of the function you created for your CPT
I’m currently using about 7 different edits of it to support that many different CPTs in the activity stream and it works great. Yes, it works in BP 1.7
This is something near and dear to my heart, and I hope others will pick up on this thread. Social intranets are something that I’ve been investigating for organizations that go beyond a simple few people. I’ve done a ton of research into this and to start off, I think you need to read this book: The Collaborative Organization by Jacob Morgan. I’m not associated with the book or the author, but when it comes to doing what you are attempting, understanding beyond the software capabilities is something that we should all be living and breathing.
I’m in the very early stages of a project in which I want to deploy WP/BP as an SaaS for organizations while allowing those organizations to take advantage of the iteration quickness and overall flexibility that WordPress offers when compared to SharePoint, Yammer, Basecamp, SocialText and Mango Apps.
After reading the Morgan book, which I cannot recommend enough to anyone who is considering BP as an intranet solution, you begin to realize that there are things that go beyond BP. You need to not only know BP and WP, but you need to know about all the available plugins out there, both premium and repository. I’ve been living and breathing this stuff for the last 6 months as I researched and studied.
What you are talking about is emergent collaboration, and it goes beyond micro-blogging, activity streams, forums and rich profiles. It might mean document management, relevance-based searching and more. More importantly, the Morgan book talks about how IT deployments work in organizations. Understanding how to deploy a setup like this, even in a small organization of ten people, goes beyond understanding how to build templates and hack BP.
What you are doing can certainly be done, but don’t go any further until you’ve read the book. It’ll help yo understand better the impact of what you are working on once it gets past novelty. That book will also help excite you about your project, it will help you think big, even if you don’t need to (because your organization might be small). The main thing you have to remember is that when using you WP/BP as the platform for an intranet, you are not building a website, you are building a communications platform. Having your mindset right along those lines will help guide you as you build and test because you will be asking yourself, “How does this impact communications?” It’s different than a website, because everything about it is about communications and information discovery.
Also, don’t bother reading any tutorial currently on the internet about BP as a Intranet. I’ve read them all, and they are all woefully inadequate. A 1000-word blog post doesn’t do the concept justice – even you are only building a platform for 10 people. There is so much more to the discussion than the existing content about this topic provides and the overall conversation about BP as an intranet solution is only just beginning in the larger community.
I double checked, registrations and blog creation are permitted. I’m using the Salutation theme. I’ll switch to default and check to make sure it is there. Of course, your response indicates that the feature still exists (I wasn’t sure if it was removed) so now I know I need to troubleshoot.
@boonebgorges since this patch was implemented by you, could you take a minute to help me out with this?
Thanks for stopping by @modemlooper but not sure what that means, I don’t know php (which is why I’m asking for help).
The snippets above work, but they use the default text for new blog posts in the activity when the custom post types are added.
I have tried adding an the action and type parameters into the array, but that didn’t work – it didn’t record the update to the cpt, but I think I’m writing array wrong.
Here’s a link to the snippet I tried for that, (unfortunately, BP.org isn’t letting me post code into this thread anymore for some reason, keeps returning an error, so you’ll have to go to the other thread where I’m asking for help): http://premium.wpmudev.org/forums/topic/need-some-php-help-custom-post-types-and-buddypress#post-191533
I started a new thread on this topic with a number of resources linked in it. I’m trying to do exactly what you are looking for but I need some help. Check the thread for more explanation: https://buddypress.org/community/groups/creating-extending/forum/topic/adding-custom-post-types-in-the-activity-stream-need-php-help/
Found the solution here: https://buddypress.trac.wordpress.org/ticket/3661
To choose between the BuddyBar and the WP Admin Bar this needs to be added to wp-config.php. Make the setting true or false, depending on your needs. Setting it to false will force buddypress to use the buddybar.
`define( ‘BP_USE_WP_ADMIN_BAR’, false );`
Bump. Does anyone have any thoughts on this?
@nicholmikey that code worked, but I started getting header rewrite errors (my theme is pretty heavy and probably caused this)
An interesting side effect was that when I edited a forum post with the word “Courseware” in it, when I saved it, the automatically changed it (on its way to the database) to “Classroom”. Would be a clever way to filter out curse words too!
I may take a look at the localization file method and see if I can figure out how to do it that way, but doesn’t that change the core code?