Search Results for 'code'
-
Search Results
-
Hi guys, I am developing a website using 2.6-rc-7, and changing the default look of bbpress. (paged and threaded replies with alternating gray white backgrounds)
I have one problem the style sheet located
.../theme/ccs/bbpress.cssis not loaded,I ended up in putting the css code into the theme style and deleting the default styles of the plugin.
This is either a bug in 2.6-rc-7 or I am missing some coding finesse to make this happen. Any ideas?
WP 5.2, PHP 7.1,
PS. bbp 2.5.14 does not have above problem.
So I’m converting a forum that was originally written in Coldfusion. I have imported the data into MySQL and thought I had the forum converting correctly (all the threads were imported). However it seems like replies were added as topics and not joined with the topic they were associated with. I’ve banged my head against this problem and now have to ask for help from people who know much more than I do. In exchange I will buy you a coffee or dinner đ
Here’s a screenshot of the database I’m importing from

and the result

Here is my importing script
<?php /** * Implementation of ECO Forums converter. * * @since bbPress (r4689) * @link Codex Docs http://codex.bbpress.org/import-forums/custom-import */ class VSI extends BBP_Converter_Base { /** * Main Constructor * * @uses Example_Converter::setup_globals() */ function __construct() { parent::__construct(); $this->setup_globals(); } /** * Sets up the field mappings */ public function setup_globals() { /** Forum Section *****************************************************/ // Setup table joins for the forum section at the base of this section // Forum id (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_FORUMS', 'from_fieldname' => 'forumid', 'to_type' => 'forum', 'to_fieldname' => '_bbp_forum_id' ); // Forum parent id (If no parent, then 0. Stored in postmeta) //$this->field_map[] = array( // 'from_tablename' => 'forums_table', // 'from_fieldname' => 'the_parent_id', // 'to_type' => 'forum', // 'to_fieldname' => '_bbp_forum_parent_id' //); // Forum topic count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_FORUMS', 'from_fieldname' => 'numberoftopics', 'to_type' => 'forum', 'to_fieldname' => '_bbp_topic_count' ); // Forum reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_FORUMS', 'from_fieldname' => 'numberofreplies', 'to_type' => 'forum', 'to_fieldname' => '_bbp_reply_count' ); // Forum total topic count (Stored in postmeta) //$this->field_map[] = array( // 'from_tablename' => 'forums_table', // 'from_fieldname' => 'the_total_topic_count', // 'to_type' => 'forum', // 'to_fieldname' => '_bbp_total_topic_count' //); // Forum total reply count (Stored in postmeta) //$this->field_map[] = array( // 'from_tablename' => 'forums_table', // 'from_fieldname' => 'the_total_reply_count', // 'to_type' => 'forum', // 'to_fieldname' => '_bbp_total_reply_count' //); // Forum title. $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_FORUMS', 'from_fieldname' => 'forumtitle', 'to_type' => 'forum', 'to_fieldname' => 'post_title' ); // Forum slug (Clean name to avoid confilcts) //$this->field_map[] = array( // 'from_tablename' => 'forums_table', // 'from_fieldname' => 'the_forum_slug', // 'to_type' => 'forum', // 'to_fieldname' => 'post_name', // 'callback_method' => 'callback_slug' //); // Forum description. $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_FORUMS', 'from_fieldname' => 'forumdescription', 'to_type' => 'forum', 'to_fieldname' => 'post_content', 'callback_method' => 'callback_null' ); // Forum display order (Starts from 1) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_FORUMS', 'from_fieldname' => 'forumorder', 'to_type' => 'forum', 'to_fieldname' => 'menu_order' ); // Forum dates. $this->field_map[] = array( 'to_type' => 'forum', 'to_fieldname' => 'post_date', 'default' => date('Y-m-d H:i:s') ); $this->field_map[] = array( 'to_type' => 'forum', 'to_fieldname' => 'post_date_gmt', 'default' => date('Y-m-d H:i:s') ); $this->field_map[] = array( 'to_type' => 'forum', 'to_fieldname' => 'post_modified', 'default' => date('Y-m-d H:i:s') ); $this->field_map[] = array( 'to_type' => 'forum', 'to_fieldname' => 'post_modified_gmt', 'default' => date('Y-m-d H:i:s') ); // Setup the table joins for the forum section //$this->field_map[] = array( // 'from_tablename' => 'groups_table', // 'from_fieldname' => 'forum_id', // 'join_tablename' => 'forums_table', // 'join_type' => 'INNER', // 'join_expression' => 'USING groups_table.forum_id = forums_table.forum_id', // 'from_expression' => 'WHERE forums_table.forum_id != 1', // 'to_type' => 'forum' //); /** Topic Section *****************************************************/ // Setup table joins for the topic section at the base of this section // Topic id (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'messageid', 'to_type' => 'topic', 'to_fieldname' => '_bbp_topic_id' ); // Topic reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'replycount', 'to_type' => 'topic', 'to_fieldname' => '_bbp_reply_count', 'callback_method' => 'callback_topic_reply_count' ); // Topic total reply count (Stored in postmeta) //$this->field_map[] = array( // 'from_tablename' => 'topics_table', // 'from_fieldname' => 'the_total_topic_reply_count', // 'to_type' => 'topic', // 'to_fieldname' => '_bbp_total_reply_count', // 'callback_method' => 'callback_topic_reply_count' //); // Topic parent forum id (If no parent, then 0. Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'forumid', 'to_type' => 'topic', 'to_fieldname' => '_bbp_forum_id', 'callback_method' => 'callback_forumid' ); // Topic author. $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'memberid', 'to_type' => 'topic', 'to_fieldname' => 'post_author', 'callback_method' => 'callback_userid' ); // Topic author ip (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'ipaddress', 'to_type' => 'topic', 'to_fieldname' => '_bbp_author_ip' ); // Topic content. $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'forummessage', 'to_type' => 'topic', 'to_fieldname' => 'post_content', 'callback_method' => 'callback_html' ); // Topic title. $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'forumsubject', 'to_type' => 'topic', 'to_fieldname' => 'post_title' ); // Topic slug (Clean name to avoid conflicts) //$this->field_map[] = array( // 'from_tablename' => 'topics_table', // 'from_fieldname' => 'the_topic_slug', // 'to_type' => 'topic', // 'to_fieldname' => 'post_name', // 'callback_method' => 'callback_slug' //); // Topic parent forum id (If no parent, then 0) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'forumid', 'to_type' => 'topic', 'to_fieldname' => 'post_parent', 'callback_method' => 'callback_forumid' ); // Sticky status (Stored in postmeta)) //$this->field_map[] = array( // 'from_tablename' => 'topics_table', // 'from_fieldname' => 'the_topic_sticky_status', // 'to_type' => 'topic', // 'to_fieldname' => '_bbp_old_sticky_status', // 'callback_method' => 'callback_sticky_status' //); // Topic dates. $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'datecreated', 'to_type' => 'topic', 'to_fieldname' => 'post_date', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'datecreated', 'to_type' => 'topic', 'to_fieldname' => 'post_date_gmt', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'dateupdate', 'to_type' => 'topic', 'to_fieldname' => 'post_modified', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'dateupdate', 'to_type' => 'topic', 'to_fieldname' => 'post_modified_gmt', 'callback_method' => 'callback_datetime' ); //$this->field_map[] = array( // 'from_tablename' => 'topics_table', // 'from_fieldname' => 'the_topic_modified_date', // 'to_type' => 'topic', // 'to_fieldname' => '_bbp_last_active_time', // 'callback_method' => 'callback_datetime' //); // Setup any table joins needed for the topic section //$this->field_map[] = array( // 'from_tablename' => 'replies_table', // 'from_fieldname' => 'the_topic_id', // 'join_tablename' => 'topics_table', // 'join_type' => 'INNER', // 'join_expression' => 'USING replies_table.the_topic_id = topics_table.the_topic_id', // 'from_expression' => 'WHERE forums_table.the_topic_id = 0', // 'to_type' => 'topic' //); /** Reply Section *****************************************************/ // Setup table joins for the reply section at the base of this section // Reply id (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'threadid', 'to_type' => 'reply', 'to_fieldname' => '_bbp_post_id' ); // Reply parent forum id (If no parent, then 0. Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'forumid', 'to_type' => 'reply', 'to_fieldname' => '_bbp_forum_id', 'callback_method' => 'callback_topicid_to_forumid' ); // Reply parent topic id (If no parent, then 0. Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'replyto', 'to_type' => 'reply', 'to_fieldname' => '_bbp_topic_id', 'callback_method' => 'callback_topicid' ); // Reply author ip (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'ipaddress', 'to_type' => 'reply', 'to_fieldname' => '_bbp_author_ip' ); // Reply author. $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'memberid', 'to_type' => 'reply', 'to_fieldname' => 'post_author', 'callback_method' => 'callback_userid' ); // Reply title. $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'forumsubject', 'to_type' => 'reply', 'to_fieldname' => 'post_title' ); // Reply slug (Clean name to avoid conflicts) //$this->field_map[] = array( // 'from_tablename' => 'replies_table', // 'from_fieldname' => 'the_reply_slug', // 'to_type' => 'reply', // 'to_fieldname' => 'post_name', // 'callback_method' => 'callback_slug' //); // Reply content. $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'forummessage', 'to_type' => 'reply', 'to_fieldname' => 'post_content', 'callback_method' => 'callback_html' ); // Reply order. //$this->field_map[] = array( // 'from_tablename' => 'replies_table', // 'from_fieldname' => 'the_reply_order', // 'to_type' => 'reply', // 'to_fieldname' => 'menu_order' //); // Reply parent topic id (If no parent, then 0) $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'replyto', 'to_type' => 'reply', 'to_fieldname' => 'post_parent', 'callback_method' => 'callback_topicid' ); // Reply dates. $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'datecreated', 'to_type' => 'reply', 'to_fieldname' => 'post_date', 'callback_method' => 'callback_datetime' ); //$this->field_map[] = array( // 'from_tablename' => 'replies_table', // 'from_fieldname' => 'datecreated', // 'to_type' => 'reply', // 'to_fieldname' => 'post_date_gmt', // 'callback_method' => 'callback_datetime' //); $this->field_map[] = array( 'from_tablename' => 'ECOFORUMS_MESSAGES', 'from_fieldname' => 'dateupdate', 'to_type' => 'reply', 'to_fieldname' => 'post_modified', 'callback_method' => 'callback_datetime' ); //$this->field_map[] = array( // 'from_tablename' => 'replies_table', // 'from_fieldname' => 'dateupdate', // 'to_type' => 'reply', // 'to_fieldname' => 'post_modified_gmt', // 'callback_method' => 'callback_datetime' //); // Setup any table joins needed for the reply section //$this->field_map[] = array( // 'from_tablename' => 'topics_table', // 'from_fieldname' => 'the_topic_id', // 'join_tablename' => 'replies_table', // 'join_type' => 'INNER', // 'join_expression' => 'USING topics_table.the_topic_id = replies_table.the_topic_id', // 'from_expression' => 'WHERE topics_table.first_post != 0', // 'to_type' => 'reply' //); /** User Section ******************************************************/ // Setup table joins for the user section at the base of this section // Store old User id (Stored in usermeta) $this->field_map[] = array( 'from_tablename' => 'ECO_MEMBERS', 'from_fieldname' => 'member_id', 'to_type' => 'user', 'to_fieldname' => '_bbp_user_id' ); // Store old User password (Stored in usermeta serialized with salt) $this->field_map[] = array( 'from_tablename' => 'ECO_MEMBERS', 'from_fieldname' => 'userpassword', 'to_type' => 'user', 'to_fieldname' => '_bbp_password', 'callback_method' => 'callback_savepass' ); // Store old User Salt (This is only used for the SELECT row info for the above password save) //$this->field_map[] = array( // 'from_tablename' => 'users_table', // 'from_fieldname' => 'the_users_password_salt', // 'to_type' => 'user', // 'to_fieldname' => '' //); // User password verify class (Stored in usermeta for verifying password) //$this->field_map[] = array( // 'to_type' => 'user', // 'to_fieldname' => '_bbp_class', // 'default' => 'Example' //); // User name. $this->field_map[] = array( 'from_tablename' => 'ECO_MEMBERS', 'from_fieldname' => 'login_id', 'to_type' => 'user', 'to_fieldname' => 'user_login' ); // User nice name. $this->field_map[] = array( 'from_tablename' => 'ECO_MEMBERS', 'from_fieldname' => 'login_id', 'to_type' => 'user', 'to_fieldname' => 'user_nicename' ); // User email. $this->field_map[] = array( 'from_tablename' => 'ECO_MEMBERS', 'from_fieldname' => 'emailaddress', 'to_type' => 'user', 'to_fieldname' => 'user_email' ); // User homepage. //$this->field_map[] = array( // 'from_tablename' => 'users_table', // 'from_fieldname' => 'the_users_homepage_url', // 'to_type' => 'user', // 'to_fieldname' => 'user_url' //); // User registered. $this->field_map[] = array( 'from_tablename' => 'ECO_MEMBERS', 'from_fieldname' => 'accountcreated', 'to_type' => 'user', 'to_fieldname' => 'user_registered', 'callback_method' => 'callback_datetime' ); // User status. //$this->field_map[] = array( // 'from_tablename' => 'users_table', // 'from_fieldname' => 'the_users_status', // 'to_type' => 'user', // 'to_fieldname' => 'user_status' //); // User display name. $this->field_map[] = array( 'from_tablename' => 'ECO_MEMBERS', 'from_fieldname' => 'login_id', 'to_type' => 'user', 'to_fieldname' => 'display_name' ); // User AIM (Stored in usermeta) //$this->field_map[] = array( // 'from_tablename' => 'users_table', // 'from_fieldname' => 'the_users_aim', // 'to_type' => 'user', // 'to_fieldname' => 'aim' //); // User Yahoo (Stored in usermeta) //$this->field_map[] = array( // 'from_tablename' => 'users_table', // 'from_fieldname' => 'the_users_yahoo', // 'to_type' => 'user', // 'to_fieldname' => 'yim' //); // User Jabber (Stored in usermeta) //$this->field_map[] = array( // 'from_tablename' => 'users_table', // 'from_fieldname' => 'the_users_jabber', // 'to_type' => 'user', // 'to_fieldname' => 'jabber' //); // Setup any table joins needed for the user section //$this->field_map[] = array( // 'from_tablename' => 'users_profile_table', // 'from_fieldname' => 'the_users_id', // 'join_tablename' => 'users_table', // 'join_type' => 'INNER', // 'join_expression' => 'USING users_profile_table.the_user_id = users_table.the_user_id', // 'from_expression' => 'WHERE users_table.the_user_id != -1', // 'to_type' => 'user' //); } /** * This method allows us to indicates what is or is not converted for each * converter. */ public function info() { return ''; } /** * This method is to save the salt and password together. That * way when we authenticate it we can get it out of the database * as one value. Array values are auto sanitized by WordPress. */ public function callback_savepass( $field, $row ) { $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); return $pass_array; } /** * This method is to take the pass out of the database and compare * to a pass the user has typed in. */ public function authenticate_pass( $password, $serialized_pass ) { $pass_array = unserialize( $serialized_pass ); return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) ); } }Hi All,
I am setting up a site to help me learn, so all this is very new to me so apologies for the silly questions if it seems straight forward to others,
My Site is: martialartsavenue.com
I am using AVADA themed WordPress, vers 5.9.1
I have several plugins installed, including BBpress Version 2.5.14 and BuddyPress Version 4.3.0.Steps to Troubleshoot:
-Spent hours on Google looking for other occurances and found several reports from years ago, and code suggestions, however i do not know how to code and scared it will cause more harm,
-I tried disabling BuddyPress plugins but still no difference.
-Tried creating a noreply@martialartsavenue.com email address in case anything was being sent to that, and confirmed nothing recieved.
-I checked with my host- siteground that they couldn’t see anything being blocked on their Mail systems, nothing appearing to be the cause on their side.
-Tried finding settings where i can add/modify email addresses or Enable/Disable who gets what and can not find.So, I would like to know, is there any fixes for this, or are others getting it as well
-Any other suggestions I could try to fix it with?
-Also, is the Site Admin meant to also get a copy of an email to all new Topics, or just the Creators?
thanks,Hi! I’ve been reading a lot of threads like this but I can’t find the solution. When a user registers on my webpage I receive the email “New User Registration” but the user does not receive the email. My website is http://www.motoadicted.top and my email admin@motoadicted.top, so I think the domain is not the problem. When a user tries to register I receive also this message:
“Mail failure – rejected by local scanning code
A message that you sent was rejected by the local scanning code that
checks incoming messages on this system. The following error was given:This message was classified as SPAM and may not be delivered”
Thanks for reading.
Hello !
I am using the [bbp-single-forum] shortcode to display a topic in a page. But when I click on the pagination link (for example to go the the 2nd page), the links is not correct and I go to “not found page”.
Those links work correctly on the forum. It is only on page with shortcode that I got that issue.
Am I the only one to face that issue ?
PS : Sorry I can’t provide URL to see the issue because this forum is private on my training website :s
We have some custom code in the mu-customisations plugin which filters bp_core_fetch_avatar to add a variety of little image overlays to the user’s avatar (e.g. instrument icon, “Team” logo). (mu_add_overlays_to_avatar() in mu-buddypress.php)
This has been working fine throughout the site, but as of today (I suspect with the upgrade of BuddyPress from 2.8.2 to 4.2.0) it no longer works in bbPress discussions.
It does still work correctly in BuddyPress content, e.g. the “login widget” at the top of the sidebar with the user’s own avatar, the activity feed in the sidebar, member profile pages. But in the author info in bbPress discussion posts, the overlays are no longer appearing.
Could you please look into what might have changed here, and why the bbPress template for showing the author avatar seems to no longer be affected by our mu_add_overlays_to_avatar filter? Thanks!
http://prntscr.com/nig5is http://prntscr.com/nig6jwHi!
I Want to take a last message topic link for the header place near bread crumbs.
For what I add
<a href="<?php bbs_forum_last_reply_url(); ?>"to content-single-forum file. The reference works 50\50. Sometimes work correctly, but sometimes transfer to the last message other topics.
How to do it right and what else to add?Hi,
I am trying to create a plugin for my own use, I think the problem is a coding one.I have copied some of this code from a plugin and added some myself to try to create my own plugin rather than adding it to my function.php file.
1. I have added a new record in the postmeta table with the topic ID. meta key and meta value for every topic I have in the table.
2. I want a meta box at the backend on both the topic and reply screens, in the metabox for both screens I want to show the meta value of the associated topic.
I have done both these3. I would like to be able to change this value, but only in the topic screen.
With the code below, if I change the value in the reply screen when I update nothing changes which is great, but if I change the value in the topic screen, when I update I get a blank value returned and the original value in the table is also removed.
When I create a new topic I would also like to populate the meta table.*/
class bbPress_add_meta_fields {
/**
* Construct.
*/private $match_m_fields = array();
public function __construct() {
if ( is_admin() ) {
add_action( âload-post.phpâ, array( $this, âinit_metaboxâ ) );
add_action( âload-post-new.phpâ, array( $this, âinit_metaboxâ ) );
$this->match_m_fields = array(âtopicâ, âreplyâ);
}
}/**
* Meta box initialization.
*/
public function init_metabox() {
add_action( âadd_meta_boxesâ, array( $this, âadd_metaboxâ ) );
add_action( âsave_postâ, array( $this, âsave_metaboxâ ), 10, 2 );
}/**
* Adds the meta box.
*/
public function add_metabox() {
add_meta_box(
âbbp_m_field_metaboxâ,
__(âTwitter nameâ, âtextdomainâ ),
array( $this, ârender_metaboxâ ),
âtopicâ, âsideâ, âhighâ
);
add_meta_box(
âbbp_m_field_metaboxâ,
__( âTwitter nameâ, âtextdomainâ ),
array( $this, ârender_metaboxâ ),
âreplyâ, âsideâ, âhighâ
);}
/**
* Renders the meta box.
*/
public function render_metabox( $post ) {
// Add nonce for security and authentication.
wp_nonce_field( âcustom_nonce_actionâ, âcustom_nonceâ );// get the topic id
$post_id = get_the_ID();
$reply_topic_id = bbp_get_reply_topic_id( $post_id );
// get value from table
$twitval = get_post_meta( $reply_topic_id, âbbp_twitnameâ, true );
echo $twitval;
echo â<br><label for=âbbp_twitnameâ>Twitter Name</label><br>â;
echo â<input type=âtextâ name = âbbp_twitnameâ value= ââ . $twitval .’â>â;
//echo â<input type=âsubmitâ value=âSubmitâ />â;add_action ( âbbp_new_topicâ, âbbp_save_extra_fieldsâ, 10, 2 );
add_action ( âbbp_edit_topicâ, âbbp_save_extra_fieldsâ, 10, 2 );function bbp_save_extra_fields($reply_topic_id,$twitval) {
if (isset($_POST) && $_POST[âbbp_twitnameâ]!=â)
update_post_meta( $reply_topic_id, âbbp_twitnameâ, $twitval );
}
}/**
* Handles saving the meta box.
*
* @param int $reply_topic_id Post ID.
* @param WP_Post $post Post object.
* @return null
*/public function save_metabox( $reply_topic_id) {
// Add nonce for security and authentication.
$nonce_name = isset( $_POST[âcustom_nonceâ] ) ? $_POST[âcustom_nonceâ] :â;
$nonce_action = âcustom_nonce_actionâ;// Check if nonce is set.
if ( ! isset( $nonce_name ) ) {
return;
}// Check if nonce is valid.
if ( ! wp_verify_nonce( $nonce_name, $nonce_action ) ) {
return;
}// Check if user has permissions to save data.
if ( ! current_user_can( âedit_postâ, $reply_topic_id ) ) {
return;
}// Check if not an autosave.
if ( wp_is_post_autosave( $reply_topic_id ) ) {
return;
}// Check if not a revision.
if ( wp_is_post_revision( $reply_topic_id ) ) {
return;
}// Check to match the slug
if(!in_array($post->post_type, $this->match_m_fields)){
// return;
}$meta_box_text_value = $twitval;
if(isset($_POST[âbbp_twitnameâ])) {
$meta_box_text_value = $_POST[âbbp_twitnameâ];
}update_post_meta($reply_topic_id, âbbp_twitnameâ, $twitval);
}/**
* is_edit_page
* function to check if the current page is a post edit page
*/public function is_edit_page($new_edit = null){
global $pagenow;
//make sure we are on the backend
if (!is_admin()) return false;
if($new_edit == âeditâ)
return in_array( $pagenow, array( âpost.phpâ, ) );
elseif($new_edit == ânewâ) //check for new post page
return in_array( $pagenow, array( âpost-new.phpâ ) );
else //check for either new or edit
return in_array( $pagenow, array( âpost.phpâ, âpost-new.phpâ ) );
}}
new bbPress_add_meta_fields();
Why would the short code for latest topics display the topics for some users but not for others?
Non-logged in users and subscriber/participant levels cannot see the Topics on the page where the shortcode is used – yet they can see everything fine when they go the actual Forums.
But I as admin can see the Topics fine when I visit the page where the shortcode is used.
WordPress 5.1.1
bbPress 2.5.14Topic: Lattest Topic Widget
I use a widget on my bbpress forum site for recent topis. Itâs the standard bbpress widget. Before the topic title are 7 speech bubbles. I donât know if itâs always seven, but it doesnât look good and it has no real use. Can I change this to a emoji symbol, like fire, and maybe the number of replies to it? How can I find the right code?
I’d like to show the newest topics, but only the ones, which have more than 3 replies. I haven’t found a shortcode or a filter for this, is it possible to set this up somehow?
thanks
Hello bbPress team and users
I am currently setting up my first bbpress forum. I am using buddypress and gamipress (didnt set it up so far) too.
I use a widget on my bbpress forum site for recent topis. It’s the standard bbpress widget. Before the topic title are 7 speech bubbles. I don’t know if it’s always seven, but it doesn’t look good and it has no real use. Can I change this to a emoji symbol, like fire, and maybe the number of replies to it? How can I find the right code?
Another question somebody could maybe anwser. Can I show gamipress ranks and points below the avatar in postings or other informations from buddypress profiles, or any bbpress related informations?
Thank you in advance and have a nice day to the whole in community!