Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,501 through 2,525 (of 32,492 total)
  • Author
    Search Results
  • #213423
    kriskl
    Participant

    Hi Robin,

    thanks for the suggestion, of course I was looking at the code in the plugin before.. but it had overwhelmed me :))

    so, after your tip, here is what I ended up with,

    add_action ( 'bbp_template_before_single_forum', 'new_topic_button' ) ;
    
    function new_topic_button () {
    	if ( bbp_current_user_can_access_create_topic_form() && !bbp_is_forum_category() ) {
    	$text=__('Create New Topic') ;
    	$href = apply_filters ('new_topic_button' , '#new-post' ) ;
    	echo '<a class="new_topic_button" href ="'.$href.'">'.$text.'</a>' ;
    	}
    }
    

    probably there is a more elegant solution.. as the button didn’t want to go to a line below the breadcrumbs.. had to use css

    .new_topic_button {
    background-color: #0066CC;
    border: 0;
    border-radius: 5px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 15px 30px;
    text-decoration: none;
    width: auto;
    display: block;
    width: 200px;
    margin-top: 30px;
    }
    #213419
    Chuckie
    Participant

    An alternative is to use the dedicated shortcode on a page:

    [bbp-topic-form]

    This is the best way I have found to allow a logged in user to create a topic. Then, you just link to this page from wherever.

    #213417
    Robin W
    Moderator

    if you can do some basic editing and understand a bit of php, then this with some work shouldbe what you are after

    add_action ( 'bbp_template_before_single_forum', 'bsp_display_buttons' ) ;
    
    function bsp_new_topic_button () {
    	global $bsp_style_settings_buttons;
    	if (!empty ($bsp_style_settings_buttons['new_topic_description'] )) $text=$bsp_style_settings_buttons['new_topic_description'] ;
    	else $text=__('Create New Topic', 'bbp-style-pack') ;
    	if ($bsp_style_settings_buttons['button_type'] == 2)  $class=$bsp_style_settings_buttons['Buttonclass'] ;
    	else $class='bsp_button1' ;
    	if ( bbp_current_user_can_access_create_topic_form() && !bbp_is_forum_category() ) {
    	$href = apply_filters ('bsp_new_topic_button' , '#new-post' ) ;
    	echo '<a class="'.$class.'" href ="'.$href.'">'.$text.'</a>' ;
    	}
    }
    
    function bsp_create_new_topicb () {
    	echo '<div><a class="bsptopic" name="bsptopic"></a></div>' ;
    	}
    add_action( 'bbp_theme_before_topic_form', 'bsp_create_new_topicb' ) ;
    #213414
    Robin W
    Moderator

    sorry, that’s how it works, and how all plugins that I have known use custom fields work. As far as I can see that’s how it worked under 2.5.x – no code change I can see.

    I’m just a user who helps out here, so if you really feel strongly about it, I suggest you log a bug at

    https://bbpress.trac.wordpress.org/

    #213407

    In reply to: Login URL

    Robin W
    Moderator

    or use code snippets !!

    #213403
    Oleksandr
    Participant

    I made a video. Maybe something we do in different ways.
    https://u.pcloud.link/publink/show?code=XZYoN3kZ17ImJFqXr2mS1lR5VYbO481A3dVy

    #213401

    In reply to: Login URL

    Robin W
    Moderator

    if you update to bbp-style-pack 4.5.9 and then

    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

    add_action ('bsp_form_topic_login' , 'rew_redirect' ) ;
    add_action ('bsp_form_reply_login' , 'rew_redirect' ) ;
    
    function rew_redirect () {
    	if ( ! is_user_logged_in() ) {
    		echo '<ul><li><a href="http://www.mysite.com/login">Click here to log in</a></li></ul>' ;
    	}
    }

    amending the url to what you want, and amend the text as well if you want to

    #213394
    Oleksandr
    Participant
    #213389
    Robin W
    Moderator

    just did a completely new site – no plugins except bbpress and your code, twentyseventeen theme, works fine.

    when you say ‘save topic as draft’ – what exactly do you mean?

    #213388
    Robin W
    Moderator

    GDPR does not require the user to be able to do this, merely that the site admins can do it if demanded.

    I’m sure that someone could code this, but nothing I know of

    choiyugi67
    Participant

    Hello,

    I have 0 knowledge about making website and such… but please help!
    I want to make it like this –
    1. Forum name clicked
    2. Goes to Single Forum Layout page with corresponding forum ID (Edited with Elementor).
    3. When posted Topic is clicked, It’ll show the post, reply threads and reply form.

    I’m using Elementor’s bbpress widget and has bbp Style Pack (My WordPress theme is twenty-ninteen).

    First, I made a page with Forum Index, and created a Forum. I created a Forum from WordPress dashboard “Forum”.

    Second, When I click this Title of the Forum, it takes me to a WordPress Theme without “Edit with Elementor” gives me Content missing error. I’m having a trouble with this too, it seems like I have to add: the_content (); code or <?php the_content(); ?> on somewhere in the Theme Edit on dashboard. None of the Google search matched what I see on my css and php code list.

    Third, I created 3 different sub-pages to Forum Index page to put in Elementor’s Bbpress widget, changed layout to Single Forum and input ID of the forum that I found from the Dashboard’s Forum section.

    Problem is here, I can’t connect when the Forum name is clicked, direct to the Single Forum page.

    I noticed that Breadcrumb of the Single Forum page is Home > Forums > Forum > Videos.
    “Home” is Home, I don’t have a page name “Forums”-where is this coming from?
    The name of the page with Bbpress widget (Forum Index) is “Forum”.

    From seeing this error, It seems like I have to edit directly onto the Dashboard’s Forums section. but with these Forum page I don’t have access to Edit with Elementor.

    I appreciate anyone’s suggestions and help! If you need any more information or need to clarify anything, please let me know.

    Thank you.

    #213364

    In reply to: Adding style to forum

    Robin W
    Moderator

    the bbpress displays are built using templates.

    I’d start with looking at this

    bbp style pack

    which will let you do many things.

    to put your stats at the bottom, you’d need to look at creating a page for your forums and using

    
    [bbp-forum-index]

    then you can use gutenburg blocks or whatever editor you have to add the stats widget at the bottom

    #213359
    Robin W
    Moderator

    ok, I don’t think it is a css problem.

    cab you tell me which method you are using in no. 8 in here

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

    #213353
    malinky
    Participant

    Yes I did, but after running the php code snipped, the replies page is blank. Sometimes I get a Server is not available message when going to replies, but not every time.

    #213350

    In reply to: Login URL

    Robin W
    Moderator

    given that you don’t understand code, then the best I can offer is to remove the bbpress login from the topic and reply forms.

    This can be done by installing

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Topic/Reply Form and activate item 15

    #213345

    In reply to: Login URL

    Robin W
    Moderator

    sorry, bbpress uses the standard wordpress login api, so it is code if you want to do something different

    #213342

    In reply to: Login URL

    Mushlih Almubarak
    Participant

    Sorry, I don’t really understand code, is there another way? Or can you simplify your explanation?
    Thank you very much

    #213339
    Robin W
    Moderator

    hmm – I just added that code to my test site, and it works fine with 2.6.5

    #213338
    Oleksandr
    Participant

    I use the next code in functions.php

    add_filter('bbp_get_topic_post_type_supports', 'register_bbpress_topic_type_supports');
    function register_bbpress_topic_type_supports( $args ) {
    	$args[] = 'excerpt';
    	$args[] = 'thumbnail';
    	$args[] = 'custom-fields';
    	return $args ;
    }
    #213332
    Robin W
    Moderator

    ok I suspect you are talking about wordpress post custom fields.

    if so, bbpress has never natively supported these, so I suspect you have code or an additional plugin such as acf or a bbpress plugin that is doing this.

    #213326
    Robin W
    Moderator

    sorry neither ‘standard custom field’ or the image means anything to me – perhaps you could say whether this is code a plugin or where you are seeing this or what you are trying to do etc.

    #213322
    Robin W
    Moderator

    ok, can you start by saying what you mean by ‘custom field’ – is this some code, a plugin or what ?

    Oleksandr
    Participant

    Custom Field doesn’t work with bbpress 2.6 and above
    I use custom fields for bbpress topics.
    I tried to turn off all plugins and change the theme to default but always receive next javascript error in the console:

    load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse&ver=5.3.1:4 POST https://test.3d-kstudio.com/wp-admin/admin-ajax.php 400
    send @ load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse&ver=5.3.1:4
    ajax @ load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse&ver=5.3.1:4
    ajaxAdd @ load-scripts.php?c=0&load[chunk_0]=hoverIntent,common,hoverintent-js,admin-bar,wp-ajax-response,jquery-color,wp-lists,jquery-ui-sortable,postbox,jquery-ui-position&load[chunk_1]=,jquery-ui-menu,jquery-ui-autocomplete,tags-suggest,tags-box,word-count,wp-sanitize,post,editor-expand,thickbox,shortcode,backbo&load[chunk_2]=ne,wp-util,wp-backbone,media-models,wp-plupload&ver=5.3.1:9
    i.wpList.<computed> @ load-scripts.php?c=0&load[chunk_0]=hoverIntent,common,hoverintent-js,admin-bar,wp-ajax-response,jquery-color,wp-lists,jquery-ui-sortable,postbox,jquery-ui-position&load[chunk_1]=,jquery-ui-menu,jquery-ui-autocomplete,tags-suggest,tags-box,word-count,wp-sanitize,post,editor-expand,thickbox,shortcode,backbo&load[chunk_2]=ne,wp-util,wp-backbone,media-models,wp-plupload&ver=5.3.1:9
    (anonymous) @ load-scripts.php?c=0&load[chunk_0]=hoverIntent,common,hoverintent-js,admin-bar,wp-ajax-response,jquery-color,wp-lists,jquery-ui-sortable,postbox,jquery-ui-position&load[chunk_1]=,jquery-ui-menu,jquery-ui-autocomplete,tags-suggest,tags-box,word-count,wp-sanitize,post,editor-expand,thickbox,shortcode,backbo&load[chunk_2]=ne,wp-util,wp-backbone,media-models,wp-plupload&ver=5.3.1:9
    dispatch @ load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse&ver=5.3.1:3
    r.handle @ load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse&ver=5.3.1:3
    #213314
    bobwhallz
    Participant

    Hi
    I have a transparent header built with Astra theme and Elementor page builder. I am also using BuddyPress on my site.

    I would like to change all the bbpress forum pages header to a different background color, none white, so the header menu can display properly.

    What css codes should i use?
    Bbpre Version 2.6.5 on latest WordPress installation
    Thank you

    #213311

    In reply to: Login URL

    Robin W
    Moderator

    so what should the url be ?

    I’ll then give you some code

Viewing 25 results - 2,501 through 2,525 (of 32,492 total)
Skip to toolbar