Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,851 through 6,875 (of 32,505 total)
  • Author
    Search Results
  • #172179
    Tenebral
    Participant

    Thank you @netweb .

    I just added the permalink, title and change the size from thumbnail to 80×80:

    add_action( 'widgets_init', 'rkk_widgets_init' );
    
    add_post_type_support('forum', array('thumbnail'));
    function ks_forum_icons() {
    	if ( 'forum' == get_post_type() ) {
    		global $post;
    	    if ( has_post_thumbnail($post->ID) )
    			echo '<a href="' . get_permalink( $_post->ID ) . '" title="' . get_the_title( $_post->ID ) . '">';
    	    	echo get_the_post_thumbnail($post->ID,array(80,80),array('class' => 'alignleft forum-icon'));
    			echo '</a>';
    	 }
    }
    add_action('bbp_theme_before_forum_title','ks_forum_icons');

    🙂

    #172176
    bimmerime
    Participant

    Where does that code goes exactly?!! also wouldn’t you want to nonindex the “users subscriptions”, “favorites”, and “topics started” as well ??

    siparker
    Participant

    yep. its a shame no one seems to be interested
    even with payment for the cause ? i suppose we need to try and find a freelancer who can submit to the core code after making a plugin perhaps?

    #172165
    chackem
    Participant

    I have looked at the function. I even found it in the source code (which of course is the same as above).

    I’m just curious why I’m not getting an array back, as the source code says:

    (array|bool) bbp_get_user_topics_started( $user_id = 0 );

    When I send it 1 for user_id, which I know has created 2 topics, (and those topics are shown on the bbpress profile page), I can only get an boolean back. Is there something I need to do to get an array of topics a user started other than this? Am I using the function wrong?

    Sorry. Still confused.

    Thanks.

    #172148
    Robkk
    Moderator

    @rono2 mostly focus on this guide below.

    https://codex.wordpress.org/Child_Themes

    #172146
    Pascal Casier
    Moderator
    #172142
    Pascal Casier
    Moderator
    #172131
    wselwood
    Participant

    Thanks Pascal – I’m assuming the best code is:

    function login_redirect( $redirect_to, $request, $user ){
    return home_url(‘forums’);
    }
    add_filter( ‘login_redirect’, ‘login_redirect’, 10, 3 );

    But to use registration (or register) instead of login?

    #172130
    Pascal Casier
    Moderator

    I’ve pasted code into functions.php files, almost anywhere I can

    There is only 1 (one) functions.php where you should paste it and that’s the one in your (child) theme.

    all the solutions offered take me nowhere

    I have put all the code that I have on https://bbpress.org/forums/topic/setup-login-for-private-forum/. If you only go for the code, then make sure to deactivate any other redirection and/or security plugins (at least for the test).

    the site is at tec.selwood.me

    You are missing the ‘Email’ label under the forgot your passsword on the log-in page

    Pascal.

    #172129
    wselwood
    Participant

    Ok, so I’m setting up my new bbPress forum and have come across a problem that I just can’t fix. It’s the redirection to the wp-login screen after registration. I’ve scoured these forums and all the solutions offered take me nowhere. I’ve installed 3rd party plugins (like Pete’s) but there is just no changing the redirect. I’ve pasted code into functions.php files, almost anywhere I can, but all it’s doing is going back to the damn wp-login page!

    I am going insane here trying to make this work.

    Latest WP version, latest Lincoln Education WP theme, latest bbPress version and the site is at tec.selwood.me

    #172125
    Ronald Mutsikwi
    Participant

    How can i display best rated forum post on my forum
    and recent replies post, any plugin or code to do this… thanks in advance for help

    #172111
    RLsARc
    Participant

    @robkk kindly pls help me 🙂

    change Administrator to an image.

    bbp_get_keymaster_role() => array(
    			'name'         => 'Administrator',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
    		),

    found some code in the net but i don’t know where to insert it.

    #172105

    In reply to: Hiding Sub-parents

    Robin W
    Moderator

    Ok, you need to amend some templates and put these into your child theme

    https://codex.bbpress.org/functions-files-and-child-themes-explained/

    Sub-forum removal

    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

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-forum.php
    bbPress will now use this template instead of the original
    and you can amend this to remove the sub forums

    line 44 says <?php bbp_list_forums(); ?>

    delete this line and the sub forums will go !

    forum posts

    do the same as above, but for content-single-forum

    and then take out line 26 that says

    <?php bbp_single_forum_description(); ?>
    
    
    #172100
    Robin W
    Moderator

    https://en-gb.wordpress.org/plugins/global-admin-bar-hide-or-remove/

    or if you know code

    add_filter('show_admin_bar', '__return_false');

    #172087
    _az_
    Participant

    Thanks for pointing that out. I think i should make more use of bbp_parse_args().

    bbp_create_initial_content() seems to be a good idea for deploying initial content, but i needed something more flexible, which can be used in the Dashboard. E.g. for deploying a default structure, given in said JSON File to a newly created Forum.

    #172086
    Robin W
    Moderator

    The code isn’t better, but I wanted to be sure that code itself wasn’t an issue. obviously posting the exact code works, although it doesn’t preform what you wish.

    So back to the gallery plugin author for his help

    I don’t know what giving throttle capability does the dics only discuss the setting

    Throttle posting every
    Set this to the minimum time (in seconds) between posting new replies in bbPress forums. This is useful to help stop spamming or other attempts to interrupt the normal flow of the forum.

    #172085
    awal16
    Participant

    I copied and paste the code again, and now I don’t get the warnings. So, why is this code better :)?

    Besides, what does throttle mean, in the capabilitie?

    #172081
    Robin W
    Moderator

    so did you copy/paste it – exactly as per my code and what exact errors did you get?

    #172078
    Pascal Casier
    Moderator

    Code can go in functions.php of your (child) theme: https://codex.bbpress.org/functions-files-and-child-themes-explained/

    Pascal.

    #172076
    Pascal Casier
    Moderator

    Hi @brad3n,
    When there is a mention of functions.php to add code, it’s always referring to the functions.php of your (child) theme, never inside a plugin.

    https://codex.bbpress.org/functions-files-and-child-themes-explained/

    Pascal.

    #172065
    RONO2
    Participant

    Pascal, so where exactly would I put those particular 3 codes at in the wordpress? or actually in the css section of the theme editor?

    #172063
    Robin W
    Moderator

    Whilst I can see some of your concerns, there are no security concerns that bbpress will let your users access your wordpress site backend – none of us would use bbpress if it had backdoors like that.

    You core issue seem to stem from

    I had to install some bbPress code in my functions file to stop non-administrator profiles from seeing the WordPress main menu at the top of the forum.

    Please explain further? or give us the code you used.

    With that, in having to add code such as this I subsequently shut down my entire site due to adding code the functions.php file that it didn’t like. Not a good situation for me.

    That is a wordpress issue, and if you are not good at coding you should not be editing files ion a live site. You really need a test site

    https://codex.bbpress.org/getting-started/testing-your-bbpress-installation/creating-a-test-site/

    Yes you can set up a separate domain/sub-domain with wordpress and bbpress running, and just show bbpress in this site. BUT you can’t have this administered by the other wordpress site (well at least not at any level of understanding that you would have – you are not ready for multisite 🙂 )

    So either you run one site or two sites. 1 site will not give you security issues if set up correctly in wordpress. 2 sites will mean lots of duplication of usernames, double updating, and more room for error.

    I’d suggest you look strongly at the test site route – this will force you to learn about how a wordpress site is put together, which will allow you to do changes with confidence of more technical knowledge and no risk to live

    Good luck, and do come back and let us know how you get on

    #172062
    awal16
    Participant

    Yes, I tried your other code, in an earlier post of yours. But then I get the warnings again.

    #172058
    Robin W
    Moderator

    All plugin writers write code to try and not interfere with each other – but occasionally we fail.

    I’d suggest you post a thread on their support forum to see if they can help.

    Did you try my shorter code – there is a reason for this question !

    #172057

    In reply to: bbPress & tinyMCE

    mateomrqz
    Participant

    Hi!

    Thank you for the reply. I just want to edit the wp_editor that displays when I click
    “Topics” > “New Topic”.

    I want to remove a couple of buttons of that editor, but I don’t want the change to be global, as I have a lot of other editors with specific parameters. This function works:

    function my_format_TinyMCE( $in ) {
        //styles for the editor to provide better visual representation.
        $in['content_css'] = get_template_directory_uri() . "/build/styles/tiny-mce-editor.css";
        $in['block_formats'] = "Paragraph=p; Heading 1=h1; Heading 2=h2";
        $in['toolbar1'] = 'formatselect,bold,italic,underline,superscript,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,spellchecker';
        $in['toolbar2'] = '';
        $in['toolbar3'] = '';
        $in['toolbar4'] = '';
        return $in;
    }
    add_filter( 'tiny_mce_before_init', 'my_format_TinyMCE' );

    BUT! It will affect and overwrite parameters to my other editors.
    The Hooks/Filters in the documentation of bbpress work, but they seem to only affect when creating a topic/forum not from the wp-admin but from the actual bbpress page.

    Any ideas? Thank you!

Viewing 25 results - 6,851 through 6,875 (of 32,505 total)
Skip to toolbar