Search Results for 'code'
-
AuthorSearch Results
-
November 19, 2019 at 3:04 pm #205964
In reply to: Any way to remove moderation ?
Chuckie
ParticipantThanks for the suggestion. I have added the code, and got into private browser mode. And the same results sadly.
November 19, 2019 at 2:59 pm #205963In reply to: Any way to remove moderation ?
Robin W
Moderatorok, so it is not that function.
you could try just adding this to your child theme functions file
remove_filter( 'bbp_new_reply_pre_content', 'bbp_filter_kses', 40 );let me know if that works
November 19, 2019 at 2:18 pm #205953In reply to: Footer issues
Robin W
Moderatorit is theme related
the non forum pages have
.social-navigation a { border-radius: 40px; display: inline-block; height: 40px; margin: 0 1em 0.5em 0; text-align: center; width: 40px; }the forum pages have an additional css class of .no-svg
.no-svg .social-navigation a { height: auto; width: auto; }this needs removing, but I cannot say what you need to do to remove it – maybe a page thing
November 19, 2019 at 2:10 pm #205952In reply to: Any way to remove moderation ?
Chuckie
ParticipantThis is the full function:
add_filter( 'bbp_kses_allowed_tags', 'ntwb_bbpress_custom_kses_allowed_tags' ); function ntwb_bbpress_custom_kses_allowed_tags() { return array( // Links 'a' => array( 'class' => true, 'href' => true, 'title' => true, 'rel' => true, 'class' => true, 'target' => true, ), // Quotes 'blockquote' => array( 'cite' => true, ), // Div 'div' => array( 'class' => true, ), // Span 'span' => array( 'class' => true, 'style' => true, ), // Paragraph 'p' => array( 'dir' => true, 'style' => true, ), // Code 'code' => array(), 'pre' => array( 'class' => true, ), // Formatting 'em' => array(), 'strong' => array(), 'del' => array( 'datetime' => true, ), // Lists 'ul' => array(), 'ol' => array( 'start' => true, ), 'li' => array(), // Images 'img' => array( 'class' => true, 'src' => true, 'border' => true, 'alt' => true, 'height' => true, 'width' => true, ), // Tables 'table' => array( 'align' => true, 'bgcolor' => true, 'border' => true, ), 'tbody' => array( 'align' => true, 'valign' => true, ), 'td' => array( 'align' => true, 'valign' => true, ), 'tfoot' => array( 'align' => true, 'valign' => true, ), 'th' => array( 'align' => true, 'valign' => true, ), 'thead' => array( 'align' => true, 'valign' => true, ), 'tr' => array( 'align' => true, 'valign' => true, ), 'video' => array( 'controls' => true, 'width' => true, 'height' => true, 'source' => array( 'src' => true, 'type' => true ) ) ); }if I introduce source into the top level then the source inside the video tag gets stripped completely from the output. So I can’t do that. I think bbPress needs tweaking to stop escaping the video tag content. Some how. For not admin.
November 19, 2019 at 2:00 pm #205950In reply to: Any way to remove moderation ?
Robin W
Moderatorok, so path wise it counts.
on the <source> issue, less certain how to resolve. the code above looks like it should work, but you might need to add source as a top level as well
if you need help with that, give me the entire function above
November 19, 2019 at 1:38 pm #205948In reply to: Count replies ant get last activity link
Robin W
Moderatorlast active time on a topic would pick up if there had been replies.
I loaded your code onto my site, and it worked fine.
I’m not sure what other help you want
1. topic will do what you want, it is saying that there are new topics within the period
2. I don’t understand this question, works fine on my test site]
3. yes it is counting any new topics or topics where there have been new replies – is that nit what you want?November 19, 2019 at 1:36 pm #205947In reply to: Any way to remove moderation ?
Chuckie
ParticipantI am using the TinyMCE Insert Video plugin. I paste the URL into that. It works fine for admin. It is only non-admin.
My functions.php has some tags added to the array defined in here:
add_filter( 'bbp_kses_allowed_tags', 'ntwb_bbpress_custom_kses_allowed_tags' );Snippet:
'video' => array( 'controls' => true, 'width' => true, 'height' => true, 'source' => array( 'src' => true, 'type' => true ) )There must be a way for me to allow those without escaping for non-admin.
The path begins https.
November 19, 2019 at 1:23 pm #205945In reply to: Any way to remove moderation ?
Chuckie
ParticipantI am struggling with your other request. Something isn’t right. I have moderation still switched ON …
If I try to insert a video (only one video) as a non-admin and hit enter the video won’t play. When I edit the post the content looks like this:
<video controls="controls" width="300" height="150"> **source src="pathtovideo/pts-test-video.mp4" type="video/mp4" /**</video>bbPress has escaped the < and > symbols.
If I log back in as admin and perform the same task. I get a functional video link:
<video controls="controls" width="300" height="150"> <source src="pathtovideo/pts-test-video.mp4" type="video/mp4" /></video>I know it is a side issue but I don’t understand how to fix that and until I do I can’t complete the testing you wanted.
November 19, 2019 at 1:09 pm #205942In reply to: Any way to remove moderation ?
Chuckie
Participant@robin-w I can confirm that:
add_filter( 'bbp_bypass_check_for_moderation', '__return_true' );switches off moderating because I was able to insert 5 images as a normal user. So that is one item ticked off the list – how to switch off moderation.
I will now check the other.
November 19, 2019 at 12:36 pm #205939In reply to: Any way to remove moderation ?
thierrytregaro
ParticipantThanks for the time/code but closed bbpress this morning and moved to discourse. Lost the perfect integration with wordpress but this is a way more convenient way for me to handle a community maybe too big for bbpress
November 19, 2019 at 12:33 pm #205938In reply to: Any way to remove moderation ?
Robin W
ModeratorIf you want to remove moderation, I think this will do it
add_filter( 'bbp_bypass_check_for_moderation', '__return_true' );Put this in your child theme’s function file – or use
If someone could test and report back, that would be useful. I have no time availability to do this đ
November 19, 2019 at 12:21 pm #205937In reply to: Any way to remove moderation ?
Robin W
ModeratorI’m just looking at that code are to try and understand it.
Yes, admins and moderators skip the moderation rules.
Thanks for the useful testing of the first part – ie the links.
Images and videos are just links as far as I can see, so should obey the same rules as above and be included in the count.
so 1 links, I video and 1 image = 3 links.
can you retest based on that and see if just 1 image is going into pending, or if it is the combination.
November 19, 2019 at 10:48 am #205935Topic: Count replies ant get last activity link
in forum Troubleshootingrederis
ParticipantHi, I am trying to grab all replies and count them (7 days old only)
Then I want to put on my nav menu message “There is new posts in formum ( 4hours 21mins ago )
1. Problem post_type Reply doesn’t work
2. Can’t access bbp functions in main-theme
3. It counts and renews only new TOPICSfunction count_new_forum_posts() { $today = date("Y-m-d"); $date2 = date("Y-m-d", strtotime($today . "-7 Day")); $args = array( 'post_type' => 'topic', 'meta_query' => array( array( 'key' => '_bbp_last_active_time', 'value' => $date2, 'type' => 'DATE', 'compare' => '>=' ), ) ); $posts_query = new WP_Query($args); $the_count = $posts_query->post_count; return $the_count; } add_filter('wp_nav_menu_items', 'new_forums_notice_to_menu', 10, 2); function new_forums_notice_to_menu($items, $args) { if(count_new_forum_posts() > 0){ if( $args->theme_location == 'primary' ) $items .= '<li><a href="http://apygarda/forums/" text-transform="lowercase" text-shadow="2px 1px 2px black"><font color="red">Ĺ ios savaitÄs naujos ĹžinutÄs forume: <span>'.count_new_forum_posts().' ('.bbp_forum_freshness_link().')</span></font></a></li>'; return $items; }else{ if( $args->theme_location == 'primary' ) $items .= '<li><a href="http://apygarda/forums/" text-transform="lowercase" text-shadow="2px 1px 2px black"><font color="gray">Ĺ iÄ savaitÄ forume dar niekas nepasisakÄ</span></font></a></li>'; return $items; } }November 18, 2019 at 9:22 pm #205899In reply to: Any way to remove moderation ?
thierrytregaro
Participantsorry to disagree. This is not a 3rd party plugin issue but a feature from bbpress that should be optional. Or, at least, that admin should be able to not use.
You do not fight spam with manual approve. I got days with over a thousands spams, GL doing it one by one LOL. Spamming is anti-spam business, not forum job (using server anti-spam + CleanTalk, maybe I had to remove one post this whole year. Out of 300k posts).
Today, I had to approve over 350 posts. Some of wich I had no clue why any piece of code could think of it as spam. And that included topics I, as admin, moved from one forum to another.
Whatever, migrating to Discourse is on its way and should be up tomorrow (it is but not public). There’s no way I can use a manually validating forum anymore. Those 5 years with bbpress were fun (in spite of some epic crashes).
November 18, 2019 at 8:45 pm #205897In reply to: Any way to remove moderation ?
John James Jacoby
KeymasterSince the problem appears to be with a third party plugin, you’re unlikely to get a lot of support from the bbPress development team here for code that isn’t theirs.
In addition, you have not clearly stated what the actual problem is. You have clearly stated your complaints and how you feel about them, but you haven’t included instructions on how to replicate your problem.
Naturally, these forums are using bbPress, and we aren’t having the same moderation issues that you are. That doesn’t mean there isn’t something wrong, simply that no one knows where to look unless you can show them.
November 18, 2019 at 4:05 pm #205891Chuckie
ParticipantI can confirm that a basic post with no attachments (reply) is going to pending. It did not before and would like this resolved please. I wish I could help.
Tied very closely to this is my other discussion where I have shown the code that displays moderation feedback to the user for new topics but the same code is missing for replies. It needs to be there. The user must be told there post has gone to the moderation queue. We have the code and phrases in the files. We just got to drop them into the replies mechanics (except it should go after the post and before the edit control.
Tied very closely with this is that by design the admin staff should be sent an email if a post goes to moderation without the need for external plugins. Atleast an option to do so.
Great plugin!
November 18, 2019 at 2:22 pm #205887In reply to: In mobile view the new topic text area is too narrow
Robin W
Moderatorthis is related to your theme
you could put this in your theme custom css area
@media only screen and (max-width: 600px) { .bbp-topic-content p{ margin : 0 0 0 0 ; line-height : 1.2 ; } }November 18, 2019 at 1:22 pm #205884Topic: Widget display problems
in forum Troubleshootingcj74
Participantwordpress 5.3
bbpress 2.6.1Hello,
I am noticing in the last few days and that is even prior to upgrading to wordpress 5.3 the bbpreply widget which lists the recent replies does not list the replies CLEARLY as it used to.After the listing there is line now added next to all new replies that saysâ<span class=âdashicons dashicons-visibility wvrbbp-fav-subâ style=âfont-size:80%;vertical-align:middle;â></span>â.
This added line obviously is taking away the clean clear quality of the webpage making it look ugly like a coded page. Please advise. Any help is appreciated. Thank you.
November 18, 2019 at 6:32 am #205869Chuckie
ParticipantSorted my issue. I forgot to add styling for
bbp-topic-contentclasses! Doh!November 18, 2019 at 3:43 am #205858In reply to: Link WordPress user role with bbpress user role
willysbd
ParticipantI tried to make a custom plugin with this code, but it didn’t work so…Any solution?
Thanks!November 17, 2019 at 3:17 pm #205842In reply to: Help with reply topics header
Robin W
Moderatortry this
#bbpress-forums li.bbp-header .bbp-reply-author { display : none ; }November 17, 2019 at 12:11 pm #205839In reply to: Help with reply topics header
Robin W
Moderatorok change
<div class="bbp-reply-content"><?php bbp_show_lead_topic() ? esc_html_e( 'Replies', 'bbpress' ) : esc_html_e( 'Posts', 'bbpress' ); ?></div><!-- .bbp-reply-content -->to
<div class="bbp-reply-content"><?php bbp_show_lead_topic() ? esc_html_e( 'Replies', 'bbpress' ) : _e( â<div align=âcenterâ style =âcolor:#ff0000âł>Please check out all the replies below,<br> if you find a post helpful please vote using the arrows</div>â, âbbpressâ ); ?></div><!-- .bbp-reply-content -->You should really put this file into a child theme if you have one
so you would do the following
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
then upload the new file to this directory so you end up with
wp-content/themes/%your-theme-name%/bbpress/loop-replies.php
bbPress will now use this template instead of the originalNovember 17, 2019 at 6:36 am #205832In reply to: Notify user when a reply goes into moderation
Chuckie
ParticipantIn the template.php file it has the following code:
// Get the topic status switch ( $topic_status ) { // Spam notice case bbp_get_spam_status_id() : $notice_text = esc_html__( 'This topic is marked as spam.', 'bbpress' ); break; // Trashed notice case bbp_get_trash_status_id() : $notice_text = esc_html__( 'This topic is in the trash.', 'bbpress' ); break; // Pending notice case bbp_get_pending_status_id() : $notice_text = esc_html__( 'This topic is pending moderation.', 'bbpress' ); break; // Standard status default : $notice_text = ''; break; }As you can see, it has specific notices for feedback to the user.
The above work when it is a “topic” they are creating. What we now need is exactly the same code, but for “replies”. In addition though, this warning needs to be placed just above the empty editor and just after the previous reply.
It is this code that is lacking for replies. So IMHO your comments don’t apply here. It is not about redirection or anything. It is about consistency with informing the user just like it does for a new topic.
I hope this helps you in resolving this issue and thank you so much for your time in looking into this.
The above begins on line 3029:
/** * Displays topic notices * * @since 2.0.0 bbPress (r2744) */ function bbp_topic_notices() {November 16, 2019 at 7:00 pm #205815In reply to: Help with reply topics header
Robin W
Moderatorok, the message in red show what I think is fine on my browser – can you say if you still have an issue with that part.
On the mobile, you could have
@media only screen and (max-width: 600px) { #bbpress-forums .bbp-reply-author { display : none ; } }which would take the author part out for mobiles
November 16, 2019 at 1:53 pm #205807Topic: Notify user when a reply goes into moderation
in forum TroubleshootingChuckie
ParticipantI had a look at the code in 2.6.1.
Lines 618 – 622 in functions.php in replies folder:
/** Reply Bad Words *******************************************************/ if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content, true ) ) { bbp_add_error( 'bbp_reply_moderation', __( '<strong>ERROR</strong>: Your reply cannot be edited at this time.', 'bbpress' ) ); }Notice that it makes use of the
bbp_add_errorcall to notify the user? Well, look at lines 624 – 636:/** Reply Status **********************************************************/
// Maybe put into moderation if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) { // Set post status to pending if public if ( bbp_get_public_status_id() === $reply->post_status ) { $reply_status = bbp_get_pending_status_id(); } // Use existing post_status } else { $reply_status = $reply->post_status; }There does not appear to be any code to flag the user. Either way, if a “reply” is flagged as pending (for example, I insert 3 images) it just vanishes with no feedback to the user. This also happens here in this forum.
I confess I don’t know the code enough and could be barking up the wrong tree.
-
AuthorSearch Results