Search Results for 'code'
-
Search Results
-
Hi,
I’ve added the nickname field to profile so people can add it.
Now I need it to display on the topic and replies under bbp-reply-author.
Everything I’ve tried shows username. Is there a way of tweaking to below to nickname?
<?php $user = get_userdata( bbp_get_reply_author_id() ); if ( !empty( $user->user_nicename ) ) { $user_nicename = $user->user_nicename; echo "@".$user_nicename; } ?>Hi all,
I hope you can help me. I am trying to create and attach a bbp forum automatically after a BuddyPress group is created.
I have “unset” the BuddyPress group creation steps, and only the “group settings” step remains.
I have been digging in bbp code to try to reproduce the forum creation process, and this is what I put together (though it is not working):
<?php $bbpforum = new BBP_Forums_Group_Extension; ?>
<?php $bbpforum->__construct(); ?><!-- Reproducing parts of public edit_screen() -->
<!-- Reproducing fieldset return -->
<?php $_POST['bbp-edit-group-forum'] = true; ?> <!-- this comes from the edit screen; this form field is sent -->
<!-- end of fieldset return -->
<!-- start of edit_screen_save -->
<?php
if ( empty( $group_id ) ) {
$group_id = bp_get_new_group_id();
}$create_forum = true; // Changed this to true (there was a switch structure down and I kept the true case only
$forum_id = 0;
$forum_ids = bbp_get_group_forum_ids( $group_id );if ( !empty( $forum_ids ) )
$forum_id = (int) is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids;// Set the default forum status
$status = bbp_get_public_status_id();
// Create the initial forum
$forum_id = bbp_insert_forum( array(
'post_parent' => bbp_get_group_forums_root_id(),
'post_title' => bp_get_new_group_name(),
'post_content' => bp_get_new_group_description(),
'post_status' => $status
) );// Run the BP-specific functions for new groups
$bbpforum->new_forum( array( 'forum_id' => $forum_id ) );// Update forum active
groups_update_groupmeta( bp_get_new_group_id(), '_bbp_forum_enabled_' . $forum_id, true );// Toggle forum on
$bbpforum->toggle_group_forum( bp_get_new_group_id(), true );?>
It is placed in create.php, right after the create group form submission entry.
As you see, I have erased the wp_nonce_field functions and the associated admin_referrer functions to avoid the “Are you sure you want to do this?” screen.
If it is not clear, please, let me know what else would be needed to try get the automatic forum, and of course, if you know a better and easier way of doing it.
Thank you very much!
Hi, Can you please advise how to extend the Vbulletin importer.
I know the fields i want to get and where i want them to go. but i am unsure how to add this to the import routine.
Example is to get from vbulletin the user signature (which is a simple lookup to sigparsed field in the db by userid) and insert that into an xprofile field for that user.
Secondly i ahd an issue importing which i believe was because the mycred plugin adds fields to the user table. It might be worth adding some validation of the user fields as the insert is hardcoded with the default fields.
Hello,
if you look at our latest topic, you will see the blue notice bar. In in, the time is formatted incorrect. There should be a comma, or even better, the word “und” between the hours and the minutes, not a full stop. I tried to change it in the translation, but there is only a code for the whole timestamp. I would suggest to update bbpress in this regard, so the timestamp becomes localizable.
Best
ManuelHello there,
I use WP 4.4.2, bbpress 2.5.8, this is a post in our forums.
To insert a link in my copy, there is this popup window. Apparently, it gets its styling from various sources, including my theme’s settings, where for regular text, I set the font-size to 17px, while line-height of 26px is hard-coded into the theme. As you can see (if you click the link-button in the reply form below the sample post given above), this disturbs the styling of this popup.
Is there any way to a) make this popup draw its styling from the back-end CSS (where the same window is used, and looks fine), which in any case I would like to suggest for future updates of bbpress, or b) style it with custom CSS?
Thank you
Manuel