thanks for the update
essentially that part of the code is looking at urls, so that would make some sense
it is this code returning ‘false’ that causes the error you see
function bbp_verify_nonce_request( $action = '', $query_arg = '_wpnonce' ) {
/** Home URL **************************************************************/
// Parse home_url() into pieces to remove query-strings, strange characters,
// and other funny things that plugins might to do to it.
$parsed_home = parse_url( home_url( '/', ( is_ssl() ? 'https' : 'http' ) ) );
// Maybe include the port, if it's included
if ( isset( $parsed_home['port'] ) ) {
$parsed_host = $parsed_home['host'] . ':' . $parsed_home['port'];
} else {
$parsed_host = $parsed_home['host'];
}
// Set the home URL for use in comparisons
$home_url = trim( strtolower( $parsed_home['scheme'] . '://' . $parsed_host . $parsed_home['path'] ), '/' );
/** Requested URL *********************************************************/
// Maybe include the port, if it's included in home_url()
if ( isset( $parsed_home['port'] ) ) {
$request_host = $_SERVER['HTTP_HOST'] . ':' . $_SERVER['SERVER_PORT'];
} else {
$request_host = $_SERVER['HTTP_HOST'];
}
// Build the currently requested URL
$scheme = is_ssl() ? 'https://' : 'http://';
$requested_url = strtolower( $scheme . $request_host . $_SERVER['REQUEST_URI'] );
/** Look for match ********************************************************/
// Filter the requested URL, for configurations like reverse proxying
$matched_url = apply_filters( 'bbp_verify_nonce_request_url', $requested_url );
// Check the nonce
$result = isset( $_REQUEST[$query_arg] ) ? wp_verify_nonce( $_REQUEST[$query_arg], $action ) : false;
// Nonce check failed
if ( empty( $result ) || empty( $action ) || ( strpos( $matched_url, $home_url ) !== 0 ) ) {
$result = false;
}
// Do extra things
do_action( 'bbp_verify_nonce_request', $action, $result );
return $result;
}
perhaps I over thought this. I tried this below
$this->field_map[] = array(
'from_tablename' => 'messagebodies',
'from_fieldname' => 'msgid',
'join_tablename' => 'messages',
'join_type' => 'LEFT',
'join_expression' => 'USING messagebodies.msgid = messages.msgid AND messagebodies.forumid = messages.forumid',
'from_expression' => 'WHERE messages.msgid = 0',
'to_type' => 'topic'
however I cannot know if this is proper because I am getting an error that seems to point to the base converter logic for “topic” the to_type here of topic should refer to the destination table right?
I’m setting up the importer using the example but I’m a little stuck doing the joins. This is a little advanced for me because it seems to me that I need to join 3 tables and a total of 3 fields to match from the origin forum which has each post separated in two separate tables and those tables reference the forumID in a third table.
so the example code for topics is:
`// 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’
);`
in my source forum tables that are being imported from, it is broken down into four tables:
forums.forumid, forums.categoryid
categories.categoryid
messages.msgid, messages.forumid, messages.threadid, messages.subject
messagebodies.msgid, messagebodies.forumid, messagebodies.bodytext
I believe that I can ignore the category to get what is needed but that is still three tables. the threadID is sequential and relative to each forum so there is a thread 1 in forum1 and and thread1 in forum2 and all other forums. So the forum ID has to be referenced in the third table (forums)
I am thinking this is a “LEFT” with and conditions is that right? can someone get me started with an example? Thank you.
Anonymous User 17557030Inactive
Hi there,
I’m a fresh out of water BBPress user and I have never coded in my life 🙂
We have just set up a BBPress forum on our WordPress website and we are looking into changing what is displayed in the profile section. At the moment it’s Forum Role, Topics Started and Replies Created.
I would like to create custom fields like Company, Job Title, Area, Email, Phone Number and Website to be displayed there.
First of all, I would need to add these sections in Profile Edit tab. Secondly, find a way to display them on the Profile page.
I have to mention, I have found a way to remove Forum Role, Topics Started and Replies Created by editing plugin file bbpress/templates/default/bbpress/user-profile.php
Also, I have just noticed that when you visit somebody’s profile page, his name is not displayed there, which would be something i would like to be displayed as well 🙂
Have anyone managed to do things mentioned above, and would be willing to share with the class? 🙂
Many thanks,
Dominik
WORDPRESS VERSION [Last checked on September 18, 2019 at 9:48 am. Check Again
You have the latest version of WordPress. Future security updates will be applied automatically.]
BBPRESS VERSION: 2.5.14
TWENTYNINETEEN
home
I am using the bbpress [forum] plugin.
I do not want to use it in its default state. I want to have it maintain my site’s design.
According to what I have read [HERE; https://codex.bbpress.org/themes/theme-compatibility/ ]
to do so requires me to copy both the bbpress and the css directories
from the default folder and paste it or upload
it into the ‘theme’ directory/ folder.
Thing is I am not quite sure if I ought to paste them [ bbpress & css directories] into the wp-config.php folder
& if so where [in the wp-config.php folder] ? Is it Before or after the present info I see there now?
Try this :
Put this in your child theme’s function file – or use
Code Snippets
/This function changes the text wherever it is quoted
function change_translate_text( $translated_text ) {
if ( $translated_text == 'Publicaciones' ) {
$translated_text = 'Mensajes';
}
return $translated_text;
}
add_filter( 'gettext', 'change_translate_text', 20 );
If that doesn’t work try
/This function changes the text wherever it is quoted
function change_translate_text( $translated_text ) {
if ( $translated_text == 'Posts' ) {
$translated_text = 'Mensajes';
}
return $translated_text;
}
add_filter( 'gettext', 'change_translate_text', 20 );
Hey Robin, I was just looking around to try to fix all the weirdness with my bbPress (still have no idea why there are so many issues with it!) and found this: https://codex.bbpress.org/getting-started/configuring-bbpress/creating-content/
“Sticky – Posts will stick to top of the Forum which it is in.
Super Sticky – Posts will stick to the top of all Forums.”
This is a “Super Sticky” post — it sounds like it is supposed to stick the top of all forums, but it’s not here. Am I misunderstanding?
Thanks!
Hi
I have the shortcode for forums list on a page: website.com/forum/
BUT, when i click a specific forum, it redirect to that forum page: website.com/forum/forum-name.
The base forum page is beautifully designed, so i want all permalink to also follow this design, or have these link open on the same page. How can this be done?
Currently it redirect to that topic or forum page with no design and basic white background.
PLEASE HELP!
ok, this should do that
li.bbp-forum-topic-count {
display: none !important;
}
Put this in your child theme’s function file – or use
Code Snippets
/This function changes the text wherever it is quoted
function change_translate_text( $translated_text ) {
if ( $translated_text == 'old text' ) {
$translated_text = 'new text';
}
return $translated_text;
}
and change ‘old text’ to what you want to change, and ‘new text’ to what you want it changed to
put this is the custom css area of your theme
#left-area ul li ul {
padding: 2px 0 2px 0px !important;
}
put this in the custom css of your theme
li.bbp-topic-voice-count {
display: none !important;
}
Robin, I am running 23 plugin’s
Admin Columns
Admin Menu Editor
Another WP Classifieds
BAW Login/logout
bbPress
BP Disable
BuddyPress
Code Snippets
Code Toolkit
Email Users
Events Manager
Grand FlaGallery
Mmm Simple File list
Nav Menu Roles
Peters Login Redirect
REmove Dashboard Access
s2Member Framework
SSL Insecure
TinyMCE
User Role Editor
WooCommerce
WordFence
WP Spam Shield
Still no luck. I have 2 users that have Keymaster access on their profiles.
Your change worked for me last week. Thanks for that!
Only changing the line 18 reply.js
reply.parentNode.appendChild(respond, reply);
I don’t know if there is a side effect on this but I think it’s not because for a week is working.
I’m using the version 2.5.14. I didn’t try to deactivate all my plugins to see if there’s a conflict.
I am attempting to convert my message board to bbPress, but have run into a problem trying to convert the database. I get the following errors:
Repair any missing information: Continue
WordPress database error: [Unknown column 'users.user_website' in 'field list']
SELECT convert(users.user_id USING "utf8mb4") AS user_id,convert(users.user_password USING "utf8mb4") AS user_password,convert(users.user_form_salt USING "utf8mb4") AS user_form_salt,convert(users.username USING "utf8mb4") AS username,convert(users.user_email USING "utf8mb4") AS user_email,convert(users.user_website USING "utf8mb4") AS user_website,convert(users.user_regdate USING "utf8mb4") AS user_regdate,convert(users.user_aim USING "utf8mb4") AS user_aim,convert(users.user_yim USING "utf8mb4") AS user_yim,convert(users.user_icq USING "utf8mb4") AS user_icq,convert(users.user_msnm USING "utf8mb4") AS user_msnm,convert(users.user_jabber USING "utf8mb4") AS user_jabber,convert(users.user_occ USING "utf8mb4") AS user_occ,convert(users.user_interests USING "utf8mb4") AS user_interests,convert(users.user_sig USING "utf8mb4") AS user_sig,convert(users.user_from USING "utf8mb4") AS user_from,convert(users.user_avatar USING "utf8mb4") AS user_avatar FROM phpbb_users AS users LIMIT 0, 100
No users to convert
Starting Conversion
There are two problems I see. One is that it’s having trouble converting part of it. The other is that it says there are no users to convert and there are a ton, so what do I do?
too many possibilities to discuss – this is like asking how to get my car to go faster.
I’d suggest you start with your hosting company, and discuss with them.
also
System and Server Requirements
It’s simple [bbp-single-topic id=724]
but there is not any result on the webpage.
Clicking on WP Menus->Forums at Forum-ID the number 724 is shown.
Via the hyperlink https://www.domain.com/root/forum/forum1/ the Topics are shown correctly.
—
The shortcodes [bbp-topic-index] and [bbp-stats] (without any ID) on the other hand work perfectly.
can you give an example of exactly what you have as a shortcode that doesn’t work
Ok, the hyperlink I found myself,
but I can’t guess why the single-shortcodes don’t show anything…
by the way:
Do you know why the single-shortcodes of bbPress don’t work?
[bbp-single-topic] [bbp-single-forum] [bbp-single-reply] [bbp-single-tag] and so on
have absolute no effect
hmmm…. that would be quite hard to code, lots of places where you would need filters.
Unlikely I’d look at that.
ok, as a product you can do
add_action( 'digimember_purchase', 'digitest_purchase', 10, 4 );
function digitest_purchase( $user_id, $product_id, $order_id, $reason )
{
switch ($reason)
{
case 'order_paid':
// handle paid orders here
if ($product_id == '12') {
update_user_meta ($user_id , 'private_group' , '*group1*') ;
}
break;
case 'order_cancelled':
if ($product_id == '12') {
delete_user_meta ($user_id , 'private_group' ) ;
}
break;
case 'payment_missing':
// handle missing rebilling payment here
break;
}
}
where in this case ’12’ is the product id of the subscription product
time period and other conditionals are I’m afraid well beyond free help
Hi Robin,
thxs a lot for your big help!
Since I’ll do something like that first time, it may take a while…
Watching the code, there are a two things I don’t understand:
1. Since I have different products in my digimember-account, where in the code is specified which product the user must have bought to become member of group1?
2. Since “order cencallation” and “payment missing” should both result in finishing the membership of the user, why doesn’t have to be the same “delete user-meta”-parameter in the code for both cases?
Thxs again for your help,
cu, Roman
yes, that is helpful
so this code will add a user to private group 1 on paying membership, and take them out on cancellation
add_action( 'digimember_purchase', 'digitest_purchase', 10, 4 );
function digitest_purchase( $user_id, $product_id, $order_id, $reason )
{
switch ($reason)
{
case 'order_paid':
// handle paid orders here
update_user_meta ($user_id , 'private_group' , '*group1*') ;
break;
case 'order_cancelled':
delete_user_meta ($user_id , 'private_group' ) ;
break;
case 'payment_missing':
// handle missing rebilling payment here
break;
}
}
Put this in your child theme’s function file – or use
Code Snippets
Then set up forums so that group 1 users can access the forum, and everyone else just see it