Forum Replies Created
-
In reply to: topics held repeatedly for moderation
@spanky11, as Robin clarified in his reply to my request, I had quite a few links buried in the code I pasted (which was an oversight on my part)…and that explained why the post was held for moderation.
If you’ve confirmed the link count (under 3), perhaps making a direct appeal to the mod like I did should suffice?
Robin had released my post even before I logged my request / (complaint?) 🙂 They’re human and will certainly understand if the (perceived) violation wasn’t committed with maliciousness 🙂In reply to: Can’t create sub-forums (parents)Thank you, Galt! Almost 4 years later, this Elementor-Bbpress post type conflict still remains unresolved but your solution provides a good fix!
#Grateful
In reply to: How to make “FORUM” titleHello Robin,
Thanks for the reply. After some consideration, I’ve decided to leave that part of the forum as it is. It may not be worth all the effort, after all.
As always, thank you so very much for your availability and technical assistance. Beyond any doubt, one of the main pillars of this forum! Arigatou!
In reply to: How to make “FORUM” titleHi Robin,
It’s showing this (screenshot)
Wohoo! Works like a charm! thanks so very much, Robin. Thank you, thank you, thank you!
Wait what…Version 1 ?! oh my! (facepalm)!
Thanks, Robin, for this. I’ll update bbpress on my site and run the code you’ve provided.
merci!
Hi Robin,
I’m sad to report that the code provided had no effect on my site.
I inserted it Code Snippet but no effect.screenshot of the part to be changed
I guess my real question is how to change theme/WP header on pages specifically displaying forum content? Some other participant here had something to say about it https://bbpress.org/forums/topic/wordpress-header-on-bbpress/ and claimed to have been successful (?)
Will you vouch for it as well or do you have have something else you can help me implement?
TIA
Thanks so much for this, Robin. Will give it a try and see how it goes.
#Grateful
In reply to: topics held repeatedly for moderationThanks, Robin! Totally forgot about the presence of urls in the html i posted.
My apologies.
HIn reply to: topics held repeatedly for moderationHello,
Please disregard this thread. I can now see the initial post diplayed in the forum.
Thanks.
In reply to: Why “Login Here” shows up instead of Form?Hi Robin,
sorry for the delay. The issue got resolved with some extra help from a developer. It’s all working fine now. Thanks for your assistance again.
Regards,
HIn reply to: Inserting tables into topics@stephan, thanks for the plugin.
I installed it and it works like a charm.
Just a quick question.
The <table>, <tr>, etc tags aren’t visible in the editor. So I manually had to insert them in my reply. Is this how you intended it to be used or is there a setting area where I can make these tags available in the reply area?thanks for letting me know.
HIn reply to: Why “Login Here” shows up instead of Form?Hi Robin,
Yes, I can see form-topic.php in the parent theme.
<?php /** * New/Edit Topic * * @package bbPress * @subpackage Theme */ ?> <?php if ( !bbp_is_single_forum() ) : ?> <div id="bbpress-forums"> <?php bbp_breadcrumb(); ?> <?php endif; ?> <?php if ( bbp_is_topic_edit() ) : ?> <?php bbp_topic_tag_list( bbp_get_topic_id() ); ?> <?php bbp_single_topic_description( array( 'topic_id' => bbp_get_topic_id() ) ); ?> <?php endif; ?> <?php if ( bbp_current_user_can_access_create_topic_form() ) : ?> <div id="new-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-form"> <form id="new-post" name="new-post" method="post" action="<?php the_permalink(); ?>"> <?php do_action( 'bbp_theme_before_topic_form' ); ?> <fieldset class="bbp-form"> <legend> <?php if ( bbp_is_topic_edit() ) printf( __( 'Now Editing “%s”', 'bbpress' ), bbp_get_topic_title() ); else bbp_is_single_forum() ? printf( __( 'Create New Topic in “%s”', 'bbpress' ), bbp_get_forum_title() ) : _e( 'Create New Topic', 'bbpress' ); ?> </legend> <?php do_action( 'bbp_theme_before_topic_form_notices' ); ?> <?php if ( !bbp_is_topic_edit() && bbp_is_forum_closed() ) : ?> <div class="bbp-template-notice"> <p><?php _e( 'This forum is marked as closed to new topics, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></p> </div> <?php endif; ?> <?php if ( current_user_can( 'unfiltered_html' ) ) : ?> <div class="bbp-template-notice"> <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p> </div> <?php endif; ?> <?php do_action( 'bbp_template_notices' ); ?> <div> <?php bbp_get_template_part( 'form', 'anonymous' ); ?> <?php do_action( 'bbp_theme_before_topic_form_title' ); ?> <p> <label for="bbp_topic_title"><?php printf( __( 'Topic Title (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br /> <input type="text" id="bbp_topic_title" value="<?php bbp_form_topic_title(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_title" maxlength="<?php bbp_title_max_length(); ?>" /> </p> <?php do_action( 'bbp_theme_after_topic_form_title' ); ?> <?php do_action( 'bbp_theme_before_topic_form_content' ); ?> <?php bbp_the_content( array( 'context' => 'topic' ) ); ?> <?php do_action( 'bbp_theme_after_topic_form_content' ); ?> <?php if ( ! ( bbp_use_wp_editor() || current_user_can( 'unfiltered_html' ) ) ) : ?> <p class="form-allowed-tags"> <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br /> <code><?php bbp_allowed_tags(); ?></code> </p> <?php endif; ?> <?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags' ) ) : ?> <?php do_action( 'bbp_theme_before_topic_form_tags' ); ?> <p> <label for="bbp_topic_tags"><?php _e( 'Topic Tags:', 'bbpress' ); ?></label><br /> <input type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> /> </p> <?php do_action( 'bbp_theme_after_topic_form_tags' ); ?> <?php endif; ?> <?php if ( !bbp_is_single_forum() ) : ?> <?php do_action( 'bbp_theme_before_topic_form_forum' ); ?> <p> <label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br /> <?php bbp_dropdown( array( 'show_none' => __( '(No Forum)', 'bbpress' ), 'selected' => bbp_get_form_topic_forum() ) ); ?> </p> <?php do_action( 'bbp_theme_after_topic_form_forum' ); ?> <?php endif; ?> <?php if ( current_user_can( 'moderate' ) ) : ?> <?php do_action( 'bbp_theme_before_topic_form_type' ); ?> <p> <label for="bbp_stick_topic"><?php _e( 'Topic Type:', 'bbpress' ); ?></label><br /> <?php bbp_form_topic_type_dropdown(); ?> </p> <?php do_action( 'bbp_theme_after_topic_form_type' ); ?> <?php do_action( 'bbp_theme_before_topic_form_status' ); ?> <p> <label for="bbp_topic_status"><?php _e( 'Topic Status:', 'bbpress' ); ?></label><br /> <?php bbp_form_topic_status_dropdown(); ?> </p> <?php do_action( 'bbp_theme_after_topic_form_status' ); ?> <?php endif; ?> <?php if ( bbp_is_subscriptions_active() && !bbp_is_anonymous() && ( !bbp_is_topic_edit() || ( bbp_is_topic_edit() && !bbp_is_topic_anonymous() ) ) ) : ?> <?php do_action( 'bbp_theme_before_topic_form_subscriptions' ); ?> <p> <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe" <?php bbp_form_topic_subscribed(); ?> tabindex="<?php bbp_tab_index(); ?>" /> <?php if ( bbp_is_topic_edit() && ( bbp_get_topic_author_id() !== bbp_get_current_user_id() ) ) : ?> <label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label> <?php else : ?> <label for="bbp_topic_subscription"><?php _e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label> <?php endif; ?> </p> <?php do_action( 'bbp_theme_after_topic_form_subscriptions' ); ?> <?php endif; ?> <?php if ( bbp_allow_revisions() && bbp_is_topic_edit() ) : ?> <?php do_action( 'bbp_theme_before_topic_form_revisions' ); ?> <fieldset class="bbp-form"> <legend> <input name="bbp_log_topic_edit" id="bbp_log_topic_edit" type="checkbox" value="1" <?php bbp_form_topic_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" /> <label for="bbp_log_topic_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br /> </legend> <div> <label for="bbp_topic_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br /> <input type="text" value="<?php bbp_form_topic_edit_reason(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_edit_reason" id="bbp_topic_edit_reason" /> </div> </fieldset> <?php do_action( 'bbp_theme_after_topic_form_revisions' ); ?> <?php endif; ?> <?php do_action( 'bbp_theme_before_topic_form_submit_wrapper' ); ?> <div class="bbp-submit-wrapper"> <?php do_action( 'bbp_theme_before_topic_form_submit_button' ); ?> <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button> <?php do_action( 'bbp_theme_after_topic_form_submit_button' ); ?> </div> <?php do_action( 'bbp_theme_after_topic_form_submit_wrapper' ); ?> </div> <?php bbp_topic_form_fields(); ?> </fieldset> <?php do_action( 'bbp_theme_after_topic_form' ); ?> </form> </div> <?php elseif ( bbp_is_forum_closed() ) : ?> <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic"> <div class="bbp-template-notice"> <p><?php printf( __( 'The forum ‘%s’ is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title() ); ?></p> </div> </div> <?php else : ?> <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic"> <div class="bbp-template-notice"> <p> <?php if(is_user_logged_in()) { _e( 'You cannot create new topics.', 'bbpress' ); } else { echo esc_html__( 'You must be logged in to create new topics.', 'bbpress' ) . ' <a href="' . esc_url( thim_get_login_page_url() ) . '">' . esc_html__( 'Login here', 'bbpress' ) . '</a>'; } ?> </p> </div> </div> <?php endif; ?> <?php if ( !bbp_is_single_forum() ) : ?> </div> <?php endif; ?>
In reply to: Why “Login Here” shows up instead of Form?Hello Robin,
Here is a link to a live page provided earlier. Please, just convert “dot come” to “.com”
From my website, bottom of the page, you can see an example of “Login Here” :
frenchtasticpeople dot com/lab2/forum/60-day-intensive-training-for-beginners-of-french-grammar/welcome-forum-say-bonjour-to-the-french-community/ (I’ve edited the “dot com” part for obvious reasons)Thanks for your support!
HIn reply to: Why “Login Here” shows up instead of Form?Cleared all caches (browser, wp-rocket, cloudflare and dynamic cache directly from server)
Still get the login url appearing as shown here. Hmm…
login url screenshotIn reply to: Why “Login Here” shows up instead of Form?Hi Robin,
I’ve deleted the content in the form-user-login.php and replaced it as instructed but I see no changes so far.
file in child themeAs shown in the screenshot above, the amended file has been uploaded to my child theme. Anything I’m doing wrong? The instructions you gave were easy to follow, so I’m not sure why it remained unchanged.
From my website, bottom of the page, you can see an example of “Login Here” :
frenchtasticpeople dot com/lab2/forum/60-day-intensive-training-for-beginners-of-french-grammar/welcome-forum-say-bonjour-to-the-french-community/ (I’ve edited the “dot com” part for obvious reasons)I am open to other suggestions if you have any for me. Grateful for your assistance.
HIn reply to: Why “Login Here” shows up instead of Form?Oh, FTP’ing? Sure, I can do that. I use FileZilla.
Thanks Robin!
HIn reply to: Why “Login Here” shows up instead of Form?Hi Robin!
Thanks for your quick reply and assistance. But there’s only one major challenge (at least to me) I am currently facing, which I’ll describe below:Re: — “Then amend this file to take out the current form and put in a link”
I get the “what” to-do part (i.e. amending file…, creating a folder in my child theme, etc) but as for the “how?”, I have absolutely no idea. In all humility, I make no pretense of familiarity with php syntax or anything php code-related.
I see the <form>….</form> tags in my file below, should I remove it all and place https://mydomain.com/login?
<?php /** * User Login Form * * @package bbPress * @subpackage Theme */ // Exit if accessed directly defined( 'ABSPATH' ) || exit; ?> <form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form"> <fieldset class="bbp-form"> <legend><?php esc_html_e( 'Log In', 'bbpress' ); ?></legend> <div class="bbp-username"> <label for="user_login"><?php esc_html_e( 'Username', 'bbpress' ); ?>: </label> <input type="text" name="log" value="<?php bbp_sanitize_val( 'user_login', 'text' ); ?>" size="20" maxlength="100" id="user_login" autocomplete="off" /> </div> <div class="bbp-password"> <label for="user_pass"><?php esc_html_e( 'Password', 'bbpress' ); ?>: </label> <input type="password" name="pwd" value="<?php bbp_sanitize_val( 'user_pass', 'password' ); ?>" size="20" id="user_pass" autocomplete="off" /> </div> <div class="bbp-remember-me"> <input type="checkbox" name="rememberme" value="forever" <?php checked( bbp_get_sanitize_val( 'rememberme', 'checkbox' ) ); ?> id="rememberme" /> <label for="rememberme"><?php esc_html_e( 'Keep me signed in', 'bbpress' ); ?></label> </div> <?php do_action( 'login_form' ); ?> <div class="bbp-submit-wrapper"> <button type="submit" name="user-submit" id="user-submit" class="button submit user-submit"><?php esc_html_e( 'Log In', 'bbpress' ); ?></button> <?php bbp_user_login_fields(); ?> </div> </fieldset> </form>
My question is and where do I amend this form-user-login.php file with my login url https://mydomain.com/login/?
If given a blueprint, I can certainly reproduce the steps faithfully when dealing with a similar issue
Can you (or anyone willing) please pinpoint the parts/lines to modify with the url? Thanks so much in advance.
In reply to: Forums index vs custom page shorturlHello Regnalf,
I’m happy to report that your fix worked. I had to apply the new class to all the previous CSS code, but it did the trick!!!
This is truly got the time to appreciate firsthand php notions such hook and filters, etc and see them at work. It was neat to be able to fine-tune the bbpress-index class vs bbpress and target one vs all parts of the site. I’m grateful.
Pushing my luck a bit further and modeling your code above and another post I saw elsewhere, I was hoping to get a bit more granular in the way I applied my css to parts of the forum, so I tried this bit of code below to target individual topic pages (or replies?)
but it didn’t work. If it’s not too much to ask, whenever it’s convenient for you or anyone, could you tell me if this code below somewhat does what you just provided me.function my_topic_class($classes) { $classes[] = 'herman-topic-class'; return $classes; } add_filter( 'bbp_get_topic_class','my_topic_class' );
Nowhere, when viewing the topic page or thread did I see the new class ‘herman-topic-class’ in the Inspect Element utility. With your code, the bbpress and bbpress-index appeared.
thanks in advance for all the support.H
In reply to: Forums index vs custom page shorturlHi Robin,
Thanks as always for your assistance.
Starting with the last question, I have BuddyPress installed but not activated…As for the slug, I’ve now ditched the underscore thing and went with /lab for the shortcode page, and in settings, /forums for the root and /forum for the forum. My permalinks are back to %postname%. This current setting guarantees that all my styles are displayed properly when accessing the page with the bbp-forum-index shortcode.
If I visit the /lab page, it’s all good until I clicked on a specific forum. Then the /lab is lost to acquire /forums (declared the settings) and thus display a 404 error page since there’s no page with that /forums/forum/topic, etc.
When I switch to having the shortcode page slug and settings slug be the same, no 404 error message, but all customizations vanish.
I’ve read some other post talking of templates not being properly referenced and honestly, so I created a bbpress folder in my childtheme. Since I’m not sure which templates/file to copy inside the newly-created BBPRESS there, I tried copying all php files included in the default template folder inside the BBPress plugin, and it didn’t go to well, so I removed them.
Still not sure where else to look. 🙁
I appreciate other pointers you or other bbpress-ers might have.Best,
HIn reply to: Forums index vs custom page shorturlHello,
I don’t know if anyone here was able to resolve their issue, but mine is quite similar to the OP.
Scenario: Created a forum with the shortcode [bbp-forum-index] on page with having slug /custom_forum to output index page. Used css to style the page (no theme builder).. In the forum settings, the root is set to /forums. When visiting /custom_forum, all the style appears great.
However, if I head to Settings–> Forums to change the root from /forums to /custom_forum (where my shortcode is placed), I lose all the styling.
I reset the permalinks as suggested above to no avail. I know it’s been over 7 years this has been reported and I hope anyone out who’s found a solution can assist me. Thanks in advance for your support.
In reply to: Please make replies not viewable to non-users.It’s all good, Robin. Got it. Just know that I’m still very grateful for your assistance and your time.
You have a great start of week.
Cheers,
HIn reply to: Please make replies not viewable to non-users.Wow, oh wow, Robin! I don’t know what to say. The timing of it is just…wow
I thought you had given up on me. So thanks so much for getting back to me with this solution. I’ll try it too.
I do want to say, however, that in my desperation for a solution, I hired a “developer” on Fiverr to resolve it. Well, it ended quite disappointingly. That guy couldn’t do a single task from adding css to even bothering looking at the php function I posted here earlier. Wasted 2 days and he admitted he’s not familiar with WP. Wait what? We’re now in the Resolution Center as I’ve asked for a full refund.
So again in desperation, just before receiving your fix, here’s what I did myself with some clunky conditional Logged in/ Logged out css tweaks + the initial php code I posted (the one with all the replies still showing but with a generic message): Post before solution | working CSS solution using initial php function and the css I laboriously came up with.
/* adding replies message */ body:not(.logged-in) li.bbp-body > ul > li:nth-child(2) > div.loop-item--1 > div.bbp-reply-content { border: 1px solid #ffa07a; background: antiquewhite; padding: 4px!important; } /* Remove content replies */ body:not(.logged-in) li.bbp-body > ul > li:not(:nth-child(1)):not(:nth-child(2)) > div.loop-item--1 > div.bbp-reply-content{ display:none; } /*Remove author replies except child 1 and 2 */ body:not(.logged-in) li.bbp-body > ul > li:not(:nth-child(1)):not(:nth-child(2)) > div.loop-item--1 > div.bbp-reply-author{ display:none; } /*Remove header replies for all but child 1 and 2 */ body:not(.logged-in) li.bbp-body > ul > li:not(:nth-child(1)):not(:nth-child(2)) > div.loop-item--1 > div.bbp-reply-header { display:none; } /*Remove headers except child (1 & 2) */ body:not(.logged-in) li.bbp-body > ul > li:not(:nth-child(1)):not(:nth-child(2)) > div.bbp-reply-header{ display:none; } /*Remove nested replies */ body:not(.logged-in) li.bbp-body > ul > li:nth-child(2) > ul > li:nth-child(n+1) > div.loop-item--1 > div.bbp-reply-content{ display:none; } /* Remove author part of nest replies */ body:not(.logged-in) li.bbp-body > ul > li:nth-child(2) > ul > li:nth-child(n+1) > div.loop-item--1 > div.bbp-reply-author{ display:none; } /*remove header of nested replies body:not(.logged-in) #topic-67506-replies > li.bbp-body > ul > li:nth-child(2) > ul{ display:none; }*/ body:not(.logged-in) li.bbp-body > ul > li > ul.bbp-threaded-replies{ display:none; }
It’s quite ugly but did the job, to my own surprise. I was leaving my desk now, and signing off Gmail when I saw your reply. I will give a try and update you. Just a quick question, would you say then that with your fix, it’s still possible for someone to peek at the hidden replies if they know what they’re doing? It’s 2:19AM, i’m fried! So grateful for the assistance. I’ll let you know as soon as I place your solution in my child theme.
Take care, and ttyl.
HIn reply to: Please make replies not viewable to non-users.Hello Robin,
Thanks for the tip. I checked section 3 of the documentation you suggested. I’ve found the loop-single-reply.php in my theme. I can certainly insert similar file in the child theme.
Now, thought I get the “what” of your answer, the “How” still eludes me. I’ve been staring at that file for an hour, and I’ve got no clue as to where to place the cursor and what to write if you showed me where to place that cursor in the file.
The code pasted above in my original post was copied and pasted as is in my Child Theme’s function.php, hoping that it would at least replace actual replies with the generic statement, which it did.
Will you be so kind as to look at the loop-single-reply.php file below and instruct me how to change the file so that I get the intend result across the forum (for anonymous users, removing/hiding all replies except the first one + original post, and with the 1st reply showing “generic statement + Login | Register” urls)?
<?php /** * Replies Loop - Single Reply * * @package bbPress * @subpackage Theme */ // Exit if accessed directly defined( 'ABSPATH' ) || exit; ?> <div id="post-<?php bbp_reply_id(); ?>" class="bbp-reply-header"> <div class="bbp-meta"> <span class="bbp-reply-post-date"><?php bbp_reply_post_date(); ?></span> <?php if ( bbp_is_single_user_replies() ) : ?> <span class="bbp-header"> <?php esc_html_e( 'in reply to: ', 'bbpress' ); ?> <a class="bbp-topic-permalink" href="<?php bbp_topic_permalink( bbp_get_reply_topic_id() ); ?>"><?php bbp_topic_title( bbp_get_reply_topic_id() ); ?></a> </span> <?php endif; ?> <a href="<?php bbp_reply_url(); ?>" class="bbp-reply-permalink">#<?php bbp_reply_id(); ?></a> <?php do_action( 'bbp_theme_before_reply_admin_links' ); ?> <?php bbp_reply_admin_links(); ?> <?php do_action( 'bbp_theme_after_reply_admin_links' ); ?> </div><!-- .bbp-meta --> </div><!-- #post-<?php bbp_reply_id(); ?> --> <div <?php bbp_reply_class(); ?>> <div class="bbp-reply-author"> <?php do_action( 'bbp_theme_before_reply_author_details' ); ?> <?php bbp_reply_author_link( array( 'show_role' => true ) ); ?> <?php if ( current_user_can( 'moderate', bbp_get_reply_id() ) ) : ?> <?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?> <div class="bbp-reply-ip"><?php bbp_author_ip( bbp_get_reply_id() ); ?></div> <?php do_action( 'bbp_theme_after_reply_author_admin_details' ); ?> <?php endif; ?> <?php do_action( 'bbp_theme_after_reply_author_details' ); ?> </div><!-- .bbp-reply-author --> <div class="bbp-reply-content"> <?php do_action( 'bbp_theme_before_reply_content' ); ?> <?php bbp_reply_content(); ?> <?php do_action( 'bbp_theme_after_reply_content' ); ?> </div><!-- .bbp-reply-content --> </div><!-- .reply -->
On a separate note, have you developed any BBpress plugin having an upload function not restricted to the media library / where files are retrieved from the user’s local machines directly?
Thanks in advance for your continued support.
H