Search Results for 'code'
-
Search Results
-
I’m trying to import an old vBulletin (3.8.3) forum to a new bbPress (2.5.14) setupon WordPress 5.1.1 and the initial import looks great. It imports the users (~13k) says something about deleting their WordPress password, then a moment later it seems to hang and no matter how long I leave it we never progress.
Calculating forum hierarchy (0 - 99) Converting forums (0 - 99) Delete users WordPress default passwords (12700 - 12799) Delete users WordPress default passwords (12600 - 12699) Delete users WordPress default passwords (12500 - 12599) Delete users WordPress default passwords (12400 - 12499) Delete users WordPress default passwords (12300 - 12399)Looking at the forum sections shows that it’s created the 22 forums and correctly set some of them as categories, they also show how many topics and replies are in each one correctly –
— Random Thoughts - Topics: 3,119 Replies: 54,698But only 27 topics across the entire forum are imported. It’s the same 27 topics every time as well. To the point that if I stop the import, and hit the start button again, it imports these same 27 topics once more now showing 54. Is there an error log I can find that might show me why it’s hanging up? The bit above with the Calculating Hierarchy is the last update I ever get in the window. I added the lines to turn on debug logging in WordPress but nothing every shows up.
define( 'WP_DEBUG', true ); // turn on debug mode if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { define( 'WP_DEBUG_LOG', true ); // log to wp-content/debug.log }One of the problems I’ve encountered in trying to use the TinyMCE editor in bbPress is styling the text inside the editor itself. The default fonts are serif, but suppose you want sans?
Attempting to override the font-family in the usual way — by modifying your theme’s CSS file — fails because the editor window of TinyMCE is in it’s own tiny little world as far as CSS is concerned.
In order to get TinyMCE to use your own stylesheet, you have to pass it as an argument when the editor is called. Here’s how to do it in bbPress.
function bbp_enable_visual_editor( $args = array() ) { $args['tinymce'] = array( 'content_css' => '/wp-content/themes/mytheme/css/tinymce-editor.css', ); return $args; } add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );In the example above, “tinymce-editor.css” is the CSS file you want the editor to use. It is located in a folder entitled “CSS”, which is located in your theme folder “mytheme”. The code above can be copied and pasted into your functions.php file.
Other options for the editor can be found here. Notice that the value for “tinymce” can be an array. That’s what we’re doing above.
Additional arguments to pass in the array for the TinyMCE editor can be found here.
I hope this helps someone. The documentation for styling the editor text could be improved. I banged my head on this problem for years until I stumbled on the solution elsewhere.
Topic: Get rid of fixed separators
I had problems with fixed separators in source. I edited the core code, but is there any other way?
See my changes here:Topic: Shortcodes not working
I created a site using buddypress. The shortcodes like [bbp-login], [bbp-register], [bbp-lost-pass] not working. It just shows the shortcode. I tested it with the theme Twenty Seventeen and NO other plugin installed. WordPress 5.1.1, PHP 7.3 (tested also with 5.6 and 7.2), and Buddypress 4.2.0.
You can see it here: https://bbpress.at-creation.ch/login/
Thanks for your help.Hi all,
I hope this is the right place to put this but I need some help. A quick backstory I’m working for a startup and before I joined someone made the site for them on WordPress. He left however and I’ve taken over the general running of the site, I have a decent understanding of WordPress because I have messed around with it before but this is the biggest project I’ve been apart of.
On to the problem they want to add a news section with news from the industry (blockchain). So I’m trying to research how to get that done and most of the plugins I’ve found keep talking about entering a snippet of code into your site to do X or Y. The problem is that the person before me built the site using some plugin I have never seen before.
Any help would be greatly appreciated.
I would like to use html in topics that is then reflected in excerpts. There is a plug-in for general WP called Advanced Excerpt that enables this. But I am wondering if it can be done for bbpress excerpts.
Details:
In a forum (https://devgo.jeffbelkora.com/collections/articles/resource-list/) I am using some code from https://premium.wpmudev.org/forums/topic/bbpress-topic-excerpts, namely:
function add_topic_excerpt() {
echo “<p>”.bbp_get_topic_excerpt( $topic_id, 200).”</p>”;
}
add_action(‘bbp_theme_after_topic_title’, ‘add_topic_excerpt’ );Unfortunately, the bbpress excerpt does not show active links (html) from the content as I desire.
Any ideas?
Hi there!
We’re trying to move our forums from a custom Q&A platform to bbPress… very glad there is now an importer!
So I copied example.php to myimport.php, changed the class name, and updated the tables/columns that apply (the ones that exist in the old database).
And ran the import…
But I keep running into import errors for fields that don’t apply as they don’t exist in the other database, like forums_table.the_reply_count
So for a field that just does not exist in the old database, what’s the proper syntax for “ignore this”? 🙂
For example, this one…
// Forum topic count (Stored in postmeta)
$this->field_map[] = array(
‘from_tablename’ => ‘forums_table’,
‘from_fieldname’ => ‘the_topic_count’,
‘to_type’ => ‘forum’,
‘to_fieldname’ => ‘_bbp_topic_count’
);
I looked for this on the importer codex page, but just don’t see it.Thanks!
LICON