Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,976 through 3,000 (of 32,517 total)
  • Author
    Search Results
  • #209993
    Robin W
    Moderator

    find
    wp-content/plugins/bbpress/templates/default/bbpress/form-topic.php

    FTP transfer this to your pc and edit

    find starting from line 254

    <?php if ( ! is_user_logged_in() ) : ?>
    
    			<?php bbp_get_template_part( 'form', 'user-login' ); ?>
    
    		<?php endif; ?>

    and delete these lines

    and save

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

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

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/form-topic.php

    bbPress will now use this template instead of the original

    #209971
    canvasstudio
    Participant

    So the issue with topic going into pending, is that the topic or reply most likely has invalid formatted code. Example: User type is a URL and hit submit, it is gone. Well, no, it is pending. because https://domain.com/something is not allowed. And the app does tell the user of the error.

    #209969

    In reply to: Topic is pending

    canvasstudio
    Participant

    So maybe long in coming, but just started working on a new bbpress BuddyPress forum.

    Basically if a topic contains an invalid code such as a url (not and image url link), once submit it goes into draft mode. There maybe other reasons, but invalid code in topic is one.

    I am currently working on a fix, short of making the tag available global. Biggest issue is link spamming.

    #209968
    Robin W
    Moderator

    can you try this in your child theme function file or snippets

    function rew_get_topic_split_link( $retval, $r, $args ) {
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'id'          => 0,
    			'link_before' => '',
    			'link_after'  => '',
    			'split_text'  => esc_html__( 'Split',                           'bbpress' ),
    			'split_title' => esc_attr__( 'Split the topic from this reply', 'bbpress' )
    		), 'get_topic_split_link' );
    
    		// Get IDs
    		$reply_id = bbp_get_reply_id( $r['id'] );
    		$topic_id = bbp_get_reply_topic_id( $reply_id );
    
    		// Bail if no reply/topic ID, or user cannot moderate
    		if ( empty( $reply_id ) || empty( $topic_id ) || ! current_user_can( 'moderate', $topic_id ) ) {
    			return;
    		}
    
    		$uri = add_query_arg( array(
    			'action'   => 'bbp-split-topic',
    			'reply_id' => $reply_id
    		), bbp_get_topic_edit_url( $topic_id ) );
    
    		$retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" title="' . $r['split_title'] . '" class="bbp-topic-split-link">' . $r['split_text'] . '</a>' . $r['link_after'];
    
    		// Filter & return
    		return apply_filters( 'rew_get_topic_split_link', $retval, $r, $args );
    	}
    
    add_filter ('bbp_get_topic_split_link', 'rew_get_topic_split_link' , 10 , 3) ;
    
    function rew_is_topic_split() {
    
    	// Assume false
    	$retval = false;
    
    	// Check topic edit and GET params
    	if ( bbp_is_topic_edit() && ! empty( $_GET['action'] ) && ( 'bbp-split-topic' === $_GET['action'] ) ) {
    		$retval = true;
    	}
    
    	// Filter & return
    	return (bool) apply_filters( 'rew_is_topic_split', $retval );
    }
    
    add_filter ('bbp_is_topic_split' , 'rew_is_topic_split' ) ;
    #209962
    Chuckie
    Participant

    I had this reply @robin-w:

    I’d suggest filing a bug report with bbPress.

    The issue is that TML registers ‘action’ as a public query variable with WP. WP has a check in WP::parse_request(), which ensures that all GET and POST values of public query variables match. If they don’t, it dies with the error message you are seeing.

    For whatever reason, bbPress uses a different action key depending on GET/POST context. In this specific instance, the GET value of ‘action’ is ‘split’. However, the POST value (set via hidden field in the form) is ‘bbp-split-topic’. This difference is causing the condition described above.

    In code:

    $_GET['action'] = 'split';
    $_POST['action'] = 'bbp-split-topic';
    
    if ( isset( $_GET[ 'action' ] ) && isset( $_POST[ 'action' ] ) && $_GET[ 'action' ] !== $_POST[ 'action ] ) {
    	wp_die( __( 'A variable mismatch has been detected.' ), __( 'Sorry, you are not allowed to view this item.' ), 400 ); }
    Robin W
    Moderator

    ok, I’d do this

    go back to

    When I do a static page and add the bbCode shortcode [bbp-forum-index] it works fine and as expected.

    and use developer told to scrape the code from the presented page.

    then you should be able to construct the page without using shortcodes

    too much work for me to really help further for free – sorry

    joerga
    Participant

    Here’s the whole template right now:

    if (have_posts()) { ?>
        <?php while ( have_posts() ) : the_post(); ?>
    
            <div class="td-main-content-wrap td-main-page-wrap td-container-wrap">
                <div class="<?php if (!td_util::tdc_is_installed()) { echo 'td-container '; } ?>tdc-content-wrap">
                     <?php
    
                    echo do_shortcode('[tdc_zone type="tdc_content"]');
                    echo do_shortcode('[vc_row full_width="stretch_row_1400 td-stretch-content"]');
                    echo do_shortcode('[vc_column]');
                    echo do_shortcode('[vc_row_inner]');
    
    echo do_shortcode('[vc_column_inner width="1/3" tdc_css="eyJhbGwiOnsid2lkdGgiOiIyMCUiLCJjb250ZW50LWgtYWxpZ24iOiJjb250ZW50LWhvcml6LWxlZnQiLCJkaXNwbGF5IjoiIn19" is_sticky="yes"]');
                    echo do_shortcode('[td_block_list_menu menu_id="14949"]');
                    echo do_shortcode('[/vc_column_inner]');
                    echo do_shortcode('[vc_column_inner width="1/3" tdc_css="eyJhbGwiOnsid2lkdGgiOiI2MCUiLCJkaXNwbGF5IjoiIn19"]');
                    echo do_shortcode('[vc_column_text]');
                    echo do_shortcode('[bbp-forum-index]');
                       // the_content();
    
                    echo do_shortcode('[/vc_column_text]');
                    echo do_shortcode('[/vc_column_inner]');
                    echo do_shortcode('[vc_column_inner width="1/3" tdc_css="eyJhbGwiOnsid2lkdGgiOiIyMCUiLCJkaXNwbGF5IjoiIn19" is_sticky="yes"]');
                    echo do_shortcode('[vc_column_text]');
    
                    echo do_shortcode('[rs_my_reward_points]');
    
                    echo do_shortcode('[/vc_column_text]');
                    echo do_shortcode('[vc_column_text]');
    
                    echo do_shortcode('[userpro template=activity]');
    
                    echo do_shortcode('[/vc_column_text]');
                    echo do_shortcode('[/vc_column_inner]'); 
                    echo do_shortcode('[/vc_row_inner]'); 
                    echo do_shortcode('[/vc_column]');
                    echo do_shortcode('[/vc_row]');
                    echo do_shortcode('[/tdc_zone]'); 
    
                    ?>
    
                    <?php 
                    echo do_shortcode('[tdc_zone type="tdc_content"][vc_row full_width="stretch_row_1400 td-stretch-content"][vc_column][vc_row_inner][vc_column_inner width="1/3"][td_block_list_menu menu_id="14949"][/vc_column_inner][vc_column_inner width="2/3"][vc_column_text]bbPress FORUM SHOULD BE HERE![/vc_column_text][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row][/tdc_zone]');
                    ?>
                </div>
            </div> <!-- /.td-main-content-wrap -->
    
        <?php endwhile; ?>
    <?php 
        }
    joerga
    Participant

    Unfortunately this doesn’t work. The function gets then confused with the open and closing tags of the shortcod and echos some of them so the overall layout is broken.

    Any other ideas how to fix this or achieve on another way?

    Here you can see the problem: https://prime-surfing.de/prime-surfing-forum/forum/prime-surfing/

    Edit: I added a second section below this one with this code:

    echo do_shortcode('[tdc_zone type="tdc_content"][vc_row full_width="stretch_row_1400 td-stretch-content"][vc_column][vc_row_inner][vc_column_inner width="1/3"][td_block_list_menu menu_id="14949"][/vc_column_inner][vc_column_inner width="2/3"][vc_column_text]bbPress FORUM SHOULD BE HERE![/vc_column_text][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row][/tdc_zone]');

    This works fine so this tells me that the do_shortcode function interprets all the shortcodes right but something in the injsection of bbPress is not working along with the way I am trying to solve this.

    #209910
    thetoolman123
    Participant

    Hi,

    Many thanks for the code, that worked perfectly 😀

    #209903
    webcreations907
    Participant

    Try adding the below to your theme’s functions.php file.

    
    
    function quick_target_blank_link_content($content){
    	$content = str_replace('<a', '<a target="_blank"',$content);
    	return $content;
    }
    
    add_filter( 'bbp_get_topic_content', 'quick_target_blank_link_content', 60 );
    add_filter( 'bbp_get_reply_content', 'quick_target_blank_link_content', 60 );
    
    
    #209901
    thetoolman123
    Participant

    Thanks. but I want to add it to the code so every link opens in a new window, even if other users post and don’t use <a href… tags

    Robin W
    Moderator

    as a quick guess, I suspect you are trying multiple shortcodes

    so

    
    <?php echo do_shortcode('[tdc_zone type="tdc_content"][vc_row full_width="stretch_row_1400 td-stretch-content"][vc_column][vc_row_inner][vc_column_inner width="1/3"][td_block_list_menu menu_id="14949"][/vc_column_inner][vc_column_inner width="2/3"][vc_column_text]

    might need to be

    <?php echo do_shortcode('[tdc_zone type="tdc_content"]') ;
    <?php echo do_shortcode('[vc_row full_width="stretch_row_1400 td-stretch-content"]') ;
    etc.
    joerga
    Participant

    Hey everyone,

    I am currently setting up a new bbPress Forum and I made a custom template page which works fine but I can’t figure out why the forum injects in the wrong place (or if it works like this at all).

    I have the tagdiv Newspaper Theme installed and I usually layout my pages with the tagdiv composer.
    For the custom page template I took the code from the page.php from the tagdiv Composer directory adjusted it for my needs and then saved it to plugin-bbpress.php inside the Template root directory.

    I also created a page with tagdiv Composer with a layout with three columns, bbPress is supposed to be in the middle one. When I do a static page and add the bbCode shortcode [bbp-forum-index] it works fine and as expected. I have three colums with different content to the left and right and the bbPress forum in the middle.

    What I tried now is to use the same shortcodes from the tagdiv composer to create a custom template for the whole bbPress forum (in. So my code in the plugin-bbpress.php file looks like this:


    if (have_posts()) { ?>
    <?php while ( have_posts() ) : the_post(); ?>

    <div class="td-main-content-wrap td-main-page-wrap td-container-wrap">
    <div class="<?php if (!td_util::tdc_is_installed()) { echo 'td-container '; } ?>tdc-content-wrap">
    <?php echo do_shortcode('[tdc_zone type="tdc_content"][vc_row full_width="stretch_row_1400 td-stretch-content"][vc_column][vc_row_inner][vc_column_inner width="1/3"][td_block_list_menu menu_id="14949"][/vc_column_inner][vc_column_inner width="2/3"][vc_column_text]

    '.the_content().'

    [/vc_column_text][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row][/tdc_zone]'); ?>
    </div>

    </div> <!-- /.td-main-content-wrap -->

    <?php endwhile; ?>
    <?php
    }

    On the frontend the shortcodes are renderd fine by the tagdiv Composer but bbPress injects over or before the columns and not in the middle one as I want it to (and where the the_content() function should place it).

    Any ideas how I can get this to work or any other ideas how to achieve this?

    Thanks!

    Newspaper Version 10.1
    bbPress Version 2.6.4

    Here’s the link to the static page: https://prime-surfing.de/profile-copy/
    And here’s one with the custom page template: https://prime-surfing.de/prime-surfing-forum/forum/prime-surfing/

    P.S.: Please don’t mind the mess with the other pages, still under consutruction.

    #209876
    Milan Petrovic
    Participant

    My GD bbPress Toolbox Pro plugin implements a shortcode for syntax highlighting in the forum topics and replies: https://support.dev4press.com/kb/article/bbcodes-source-code-scode/.

    Milan

    #209875
    ibexy
    Participant

    Is there any code highlighter that works from the front end on forums (bbpress). I have installed a couple but they only work for the admin from within “Posts”. I cannot access the same functionality form creating forum posts or replying to forum post from the front end.

    #209860
    Jay Holtslander
    Participant

    If you arrived here from a search for “bbpress breadcrumbs missing” like I did…

    turn off Yoast’s breadcrumbs at:
    /wp-admin/admin.php?page=wpseo_titles#top#breadcrumbs

    #209858

    In reply to: Managing too long URL

    webcreations907
    Participant

    Maybe you don’t have those selectors / class names on your theme? Not sure what theme you’re using, but when I test on this forum, in Chrome & Safari adding the above fixes the overflow issue, Firefox didn’t seem to have a issue.

    Try the below, you might have to refresh your browser so it loads the changes.

    
    .bbp-reply-content a, 
    .bbp-topic-content a{
    	word-wrap: break-word;
    	word-break: break-word;
    }
    
    
    #209836
    smhlew
    Participant

    same question. Can we put in a standard bold, italic underline toolset, and not shot enduser code at all?

    #209814
    Robin W
    Moderator
    #209806
    fimir
    Participant

    Neither one of the 2 things. Without plugins forum page is empty. More I’ve tried to add an image with this bbp code into same the page, the page is blank.

    #209805
    thetoolman123
    Participant

    Hi there,

    Is there a shortcode that displays a list with links to all forums?

    Also, is there a shortcode that will display the number of threads? I’m wanting to create a list of links to my forums and also display the number of threads/posts next to each link.

    Thanks!

    #209800
    fimir
    Participant

    In my site only [bbp-topic-index] code not working, register and login code work in the pages.
    I use Generatepress theme if this could be the problem. It is someone to help me, please?
    My site: https://firsttelling.com
    Thank you
    Mircea

    #209794
    danielshalar
    Participant

    So I just Installed bbPress for my first time because I want to create my little forum.

    I’ve been using wordpress for a while and I’m in love with it.

    Now bbpress, for what I see comes default or similar to the Theme from what I read.

    this is currently how it looks The picture of my forum site

    So my questions is there any good plugins out there to really design the buttons like the search button or the log out and the bbPress forum itself?
    Or I mustly need to do this manually by editing code and css?

    I’m really noob, I learend a little bit html,css but no more then that, any help will be very respected <3

    #209779
    Robin W
    Moderator

    so what shortcodes has it got ?

    #209777
    Robin W
    Moderator

    is this an actual WordPress page with shortcodes in it?

Viewing 25 results - 2,976 through 3,000 (of 32,517 total)
Skip to toolbar