Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 1,001 through 1,025 (of 32,458 total)
  • Author
    Search Results
  • #232142
    Robin W
    Moderator

    I presume you have ‘anyone can register’ ticked in :

    dashboard>settings>general>membership – that will let anyone join, and at that stage you cannot know if they are real or not, so no automatic way to prevent.

    I’d suggest you move to a closed registration, so that you can manually join people.

    as for getting rid of those in there – you would need some code which would look for all users who have not made a forum post, but this might delete genuine users, so without a forumla to work out who is real or not, it would be hard to code/

    #232133
    Robin W
    Moderator

    you could add this to change the wording

    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'You cannot reply to this topic.' ) {
    	//set limit
    	$limit = 5 ;
    	//get replies for today
    	$user_id = get_current_user_id() ;
    	$reply=bbp_get_reply_post_type() ;
    	$today = getdate();
    	$args = array(
    		'post_type'=> $reply,
    		'order'    => 'ASC',
    		'orderby' => 'ID',
    		'post_status' => 'publish',
    		'posts_per_page' => -1,
    		'post_author' => $user_id,
    		'date_query' => array(
    		array(
    			'year'  => $today['year'],
    			'month' => $today['mon'],
    			'day'   => $today['mday'],
    		),
    		),
    		
    		);              
    
    	$the_query = new WP_Query( $args );
    	$count = $the_query->found_posts;
    	if ($count>=$limit) $translated_text = 'You have exceeded the number of replies you can post in a day' ;
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );
    #232132
    Robin W
    Moderator

    Just written this – should work

    add_filter ('bbp_current_user_can_access_create_reply_form' , 'rew_limit_replies') ;
    
    function rew_limit_replies ($retval) {
    	//set limit
    	$limit = 5 ;
    	//get replies for today
    	$user_id = get_current_user_id() ;
    	$reply=bbp_get_reply_post_type() ;
    	$today = getdate();
    	$args = array(
    		'post_type'=> $reply,
    		'order'    => 'ASC',
    		'orderby' => 'ID',
    		'post_status' => 'publish',
    		'posts_per_page' => -1,
    		'post_author' => $user_id,
    		'date_query' => array(
    		array(
    			'year'  => $today['year'],
    			'month' => $today['mon'],
    			'day'   => $today['mday'],
    		),
    		),
    		
    		);              
    
    	$the_query = new WP_Query( $args );
    	$count = $the_query->found_posts;
    	if ($count>=$limit) $retval = 0 ;
    return $retval ;
    }

    Just amend the line ‘$limit = 5 ;’ to whatever number you want

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    #232086
    wujackwu
    Participant

    Based on my recent trouble-shooting, your issue could be caused by two potential reasons:

    1. Your CDN service provider altered the link to your video file. You might want try turning it off, so that the address of your video would change back to something like https://yourdomain.com/wp-content/uploads/2022/10/cute_dog.mp4?time=1664812918, which is the actual location of your file. You may also check the source code of our pole line hardware website, on which we encountered a similar issue a few months ago. (We bought Godaddy’s WP plan, and its default CDN setting was turned on. We now use Cloudflare. A much better CDN. )
    2. Or, it may be caused by conflicting plugins installed on your website. Which means the embed function cannot work properly. You could try disable them all and flush your server cache to find the culprit.

    Personally, if you are code-savvy, I would recommend employing a method called lite youtube embed for videos. Simply put, it reduces page loading time by serving your video only after the viewer hit PLAY, which drastically reduces the amount of data transferred on page load.

    That’s all I can come up with based on your information. Best of luck!!

    #232083

    In reply to: Forum has blank pages

    Robin W
    Moderator

    ok, if this is a block theme then come back, otherwise take a look at

    Step by step guide to setting up a bbPress forum – Part 1

    section 8 and look at this link which gives a template

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    #232077
    Robin W
    Moderator

    or you could just display the bbpress breadcrumb by by changing the css file, or putting this in the custom css

    .bbp-breadcrumb {
    	display: block !important;
    	padding-top: 20px;
    }
    #232076
    Robin W
    Moderator

    your theme is hiding the bbpress breadcrumbs in

    https://renaloo.com/wp-content/themes/digiqole-child/assets/css/custom.css line 2281

    This function will add a reference to the breadcrumb

    add_action ('bbp_template_before_single_topic' , 'rew_forum') ;
    
    function rew_forum () {
    	echo '<div class="rew_forum">' ;
    	$topic_id = bbp_get_reply_topic_id() ;
    	$forum_id = bbp_get_topic_forum_id() ;
    	echo '<a href="' . esc_url( bbp_get_forum_permalink( $forum_id ) ) . '" class="bbp-breadcrumb-forum">' . bbp_get_forum_title( $forum_id ).'</a>' ;
    	echo '</div>' ;
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    #232055
    seangowans
    Participant

    Im using BBpress Version 2.6.9 and WordPress version: 5.9.3 and i’m working on my localhost.
    I have followed the documentation (method 2) and I keep ending up with the same issue. The Forum page has the [bbp-forum-index] shortcode which works fine, but when I click on the forum I created it returns a blank page.

    URL structure that returns blank page:
    mysite/forums/forum/test-forum/

    I have removed every plugin except BBPress and tested this on the 2022 WordPress theme and still no luck, any advice you could give me would be greatly appreciated.

    #232052

    In reply to: Order of search result

    quigli
    Participant

    Hello,
    yep, i have access to the code, children-theme installed (‘excellent’)
    Bye, Rainer

    #232038

    In reply to: Order of search result

    samsanatco
    Participant

    Hello
    Can you change the theme codes yourself?

    #232018
    erossini
    Participant

    I have an issue with bbPress. In the settings, I checked under /options-general.php?page=bbpress the option Auto-embed links.

    When I upload a video in the forum, the result is the link to the video instead of a player to play the video.

    How can I fix it?

    #232017
    erossini
    Participant

    In my WordPress website, I added bbPress. When you are in the forum in the section _Support_ and you open a topic, you see this

    In my point of view, the user experience is not great because the user doesn’t know where he or she is. I like to add a full breadcrumb like

    > Forum > Support > Test video

    How can I add this?

    #231983
    Robin W
    Moderator

    following closure of the ‘bbPress – Moderation Tools’ plugin, I added this code to my style pack plugin

    bbp style pack

    once activated you’ll find the moderation tools in

    dashboard>settings>forums

    #231875
    Robin W
    Moderator

    thanks,

    The best I can do is

    .cnt article ul li:before {
     display: none !important ;
    }

    but this will I think take bullet points out everywhere, including your main site.

    #231873
    Robin W
    Moderator

    is that code still in ?

    #231872
    dillonleo
    Participant

    I had a feeling my theme was causing it. I tried inserting that code into my site’s custom css, but unfortunately the bullets are still showing up.

    #231870
    Robin W
    Moderator

    your trheme is adding this – try

    #bbpress article ul li:before {
     display: none;
    }
    #231867
    dillonleo
    Participant

    The page on my forum is full of list bullets. (https://www.turtleholic.com/forums/forum/turtle-questions/)

    Does anyone know how to fix this? I was able to add the following CSS code to the main Forum page (https://www.turtleholic.com/turtleholic-forum/), which removed the bullets from that page. But on the specific forum pages I don’t know how to add custom CSS.

    ul ul li:before {
    display: none;
    }

    ul li:before {
    display: none;
    }

    #231866
    Devcr3
    Participant

    @robin-w I installed the plugin, then I entered the code (mentioned above) in the code php section of the plugin .. in the end I saved. Now I wait 1 hour and see if it works

    #231859
    Robin W
    Moderator

    that’s basically the code which can be added to a functions file, or using

    Code Snippets

    #231847
    Mike Witt
    Participant

    I tried the code on a test site and it appeared to work.
    I updated the Track ticket.

    #231829
    Mike Witt
    Participant

    Hi@dimitri333

    Take a look at:

    identify user with @

    Regarding the (unofficial) code:

    bbp Mentions Suggest

    However, I think that you would have to add BuddyPress to your site to get this working. So it might not help you. I don’t think there’s anything you can do with bbPress alone.

    #231828
    Devcr3
    Participant

    I only use bbpress and no buddypress, is there a code or plugin for bbpress? TY❤️‍🔥

    #231827
    Devcr3
    Participant

    register_activation_hook(FILE, ‘bbpress_topic_scheduler’);

    add_action(‘bbpress_daily_event’, ‘bbpress_close_old_topics’);

    function bbpress_topic_scheduler() {
    wp_schedule_event(time(), ‘daily’, ‘bbpress_daily_event’);
    }

    function bbpress_close_old_topics() {
    // Auto close old topics
    $topics_query = array(
    ‘author’ => 0,
    ‘show_stickies’ => false,
    ‘parent_forum’ => ‘any’,
    ‘post_status’ => ‘publish’,
    ‘posts_per_page’ => -1
    );
    if ( bbp_has_topics( $topics_query ) )
    while( bbp_topics() ) {
    bbp_the_topic();
    $topic_id = bbp_get_topic_id();
    $topic_date = strtotime( get_post( $topic_id, ‘post_date’, true ) );
    $forum_id = bbp_get_topic_forum_id($topic_id);
    if ($topic_date < strtotime( ‘-5 hours’) && $forum_id == 9547 )
    bbp_close_topic( $topic_id );
    }
    }

    Ps: code add to functions.php

    #231801
    Robin W
    Moderator

    the code above should still be fine, I presume you have changed the

    && $forum_id == 1276

    to the correct forum number?

Viewing 25 results - 1,001 through 1,025 (of 32,458 total)
Skip to toolbar