Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,276 through 5,300 (of 32,522 total)
  • Author
    Search Results
  • #183610
    lalit73545
    Participant

    Hi, is this possible we can display forum details like , suppose we have two forum, name called forum1 & forum2, Forum1 has 5 topics & forum2 has 10 topic. so is This possible on bbpress we can display first Forum1 then their associate topic 5 then later on forum2 then their associate topic 10. Please do the needful for me. Thanks i am waiting for your reply….

    #183605
    akira010203
    Participant

    Hello!

    I’ve added a new custom forum main page with some bb-codes instead of the default main page and I get a little disapointment, I can’t find out how to change the forums root page which redirect to mysite/forums instead of mysite/mynewmainforumpage.

    Is it possible to do it?

    Thanks!

    #183559

    In reply to: Hide links in posts

    virusek89
    Participant

    Is there anyone who can help me?

    I found this code but he does not want to work

    <?php
    function hide_links($post_content) {
     if ( in_category( array( 'YOUR CAT ID', 'YOUR CAT ID') )) {
    	global $wpdb;
    
    		return ($post_content = !is_user_logged_in()?preg_replace('/<a(.*?)>(.*?)<\/a>/m', '<div style="color:red;font-size:12px;"> YOUR TEXT</div>',$post_content):$post_content);
    	 }	
    
     }
      add_filter('the_content', 'hide_links')
    
    ?>
    #183546
    panda666uk
    Participant

    Are there any free tools/files/code out there to migrate a Kunena forum on a joomla site over to bbpress on a wordpress site ?

    Thanks

    #183543

    In reply to: content filter

    Col_Blimp
    Participant

    If you post a hyperlink using the link button then it matters not if it’s http or https as it’s just a reference on the page that does not download anything but if you use the img button then if your site is SSL and the image comes from a source that’s not then the certificate throws warnings.

    I don’t want to change all links to https as that overkill so I’m looking for the best way to just change links using the <img/> tag to https as using this does not work:

    <img src="i.imgur.com/V6sg3f0.png" alt="" />

    but does outside of WordPress ie in MYBB that is how you avoid certificate issues.

    #183541

    In reply to: content filter

    Col_Blimp
    Participant

    Hi Robin, you know images from my own site are all SSL so WordPress works in this instance but its with BBPress when the user makes a post and uses the insert image button to link an image from another site that the problems occour ie:



    <img src="https://i.imgur.com/V6sg3f0.png" alt="" />
    <img src="https://i.imgur.com/V6sg3f0.png" alt="" />
    <img src="i.imgur.com/V6sg3f0.png" alt="" />

    but this site here is changing the http to https in all links so the demonstration is a bit of a fail 🙂

    But a non https url will not break a certificate as that only happens if the link is embedding something in the post.

    #183539

    In reply to: content filter

    Robin W
    Moderator

    WordPress doesn’t seem to like it when you do that and wont show any image.

    wordpress will quite happily show images with no domain name just the directory & file

    eg

    change

    http://www.mysite.com/uploads/2017/march/pic.jpg  
    

    to

    /uploads/2017/march/pic.jpg

    #183524
    Pascal Casier
    Moderator

    Hi Steve,

    As Robin answered, you could look into his coding for the bbP Style Pack to see how it works.

    There is also https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#8-add-edit-profile-to-a-wordpress-menu that might give you a hint.

    Pascal.

    #183519
    KurzBaginski
    Participant

    The Code is available at https://github.com/georgemichaelis/bbpress-forced-subscription too.

    Regards
    Jörg

    #183518
    dominikb
    Participant

    @robin-w
    I moved the code to the functions.php file now, still no reaction.


    @casiepa

    Yes, i followed the procedure for adding new names with existing capabilities, but they are not appearing.
    Is it possible, that you cant add an existing capability to multiple roles?

    #183515
    Pascal Casier
    Moderator

    Hi @fabianno0572,

    The best way to put extra functions is in a functions.php in a child theme.

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

    #183513
    Pascal Casier
    Moderator

    Hi @sallyruchman,

    There is a standard widget for bbPress, you can find info here: https://codex.bbpress.org/features/widgets/

    You could also check this page https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#21-show-5-recent-topics-after-forum-index and e.g. topic 21 or so for different ideas.

    Pascal.

    #183511
    sally
    Participant

    Hello Pascal,

    Found the css code to adapt the image size.

    bbp-reply-content img {
    width:20%;
    }

    I dont use a plugin for this. Its just when people share images via links.

    Thx
    Sally

    #183508
    Pascal Casier
    Moderator

    @dominikb-1,

    Did you read till the end of the codex page ?

    Custom Capabilities

    #183507

    In reply to: No toolbar available

    Pascal Casier
    Moderator

    @adiek84,
    If you don’t know where to put the above code, you could also activate it in my ‘bbP Toolkit’ plugin. But if this is the only function you need, then copy the above in your child theme’s functions.php

    #183506

    In reply to: No toolbar available

    Robin W
    Moderator

    the code

    function bbp_enable_visual_editor( $args = array() ) {
        $args['tinymce'] = true;
        return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );

    in most themes should work fine. the wp-footer part was specific to the other poster.

    The code goes in your child theme’s functions file

    Functions files and child themes – explained !

    #183504
    Robin W
    Moderator

    sorry, I can’t write bespoke code for everyone, so it’s in the pack.

    #183493
    Steve
    Participant

    OK. I know this exist. I see people talking about it, but I have no idea how to create the link to it.

    Where is the member profile page? How do I add a link to my menu for people to access their profile an update it.

    I don’t see shortcode, I don’t see it as a menu link… I just don’t see it.

    But do see I can click the name of someone who post to the forum and see their profile. So it does exist.

    I just can’t find any documentation on how to add a link to a members profile page to the menu.

    Please help. Thanks.

    #183491
    Martin
    Participant

    Hi!, I need to do this in my wordpress. I’ver already installed rpb-chessboard and bbpress-do-short-codes plugins, but i don’t know where i have to call function
    add_filter (‘pw_bbp_parse_shortcodes_cap’ , ‘publish_topics’ ) ;

    When I active bb-press-do-shot-codes [pgn] and [fen] sections were disappeard.

    Thanks!

    #183487

    In reply to:

    blasterspike
    Participant

    I have tried again from a dump of a phpBB 3.1.9 and I’m back at the

    Error establishing a database connection

    error. Every time I have to do a test, I’m sure I use the “Reset Forums” function (tools.php?page=bbp-reset) and at the import I select both
    “Start a fresh conversion from the beginning”
    “Purge all information from a previously attempted import”

    #183485
    Robin W
    Moderator

    where did you put that code?

    #183471

    In reply to: No toolbar available

    adiek84
    Participant

    Hi guys,

    I have the same problem, and I’d really love to solve this by using your solution, but I’m not very good in coding etc. Can you tell me where you put the
    <?php wp_footer(); ?>

    Thanks!

    #183461
    Robin W
    Moderator

    This in your css should take it away

    .topic .entry-meta {
      display: none;
    }
    

    Please confirm or come back

    tweichart
    Participant

    Hey guys,

    just stumbled over a small 500 error in the functions file:

    
    AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: [] operator not supported for strings in /var/www/vhosts/mydomain/wp-content/plugins/bbpress/includes/forums/functions.php:1854
    Stack trace:
    #0 /var/www/vhosts/mydomain/wp-includes/class-wp-hook.php(298): bbp_pre_get_posts_normalize_forum_visibility(Object(WP_Query))
    #1 /var/www/vhosts/mydomain/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
    #2 /var/www/vhosts/mydomain/wp-includes/plugin.php(515): WP_Hook->do_action(Array)
    #3 /var/www/vhosts/mydomain/wp-includes/class-wp-query.php(1681): do_action_ref_array('pre_get_posts', Array)
    #4 /var/www/vhosts/mydomain/wp-includes/class-wp-query.php(3238): WP_Query->get_posts()
    #5 /var/www/vhosts/mydomain/wp-includes/class-wp-query.php(3347): WP_Query->query(Array)
    #6 /var/www/vhosts/mydomain/wp-conten...
    

    Should be fixeable, ln 1850-1854 is in the bbp_pre_get_posts_normalize_forum_visibility function and looks like this:

    
    // Get any existing meta queries
    $meta_query   = $posts_query->get( 'meta_query' );
    
    // Add our meta query to existing
    $meta_query[] = $forum_ids;
    

    adding an array check to ln 1850 should suffice (i do actually not know what one’s trying to achieve here, so this is just a quickfix):

    
    $meta_query   = is_array( $posts_query->get( 'meta_query' ) ) ? $posts_query->get( 'meta_query' ) : array( $posts_query->get( 'meta_query' ) );
    

    side-note: wp version 4.7.3, bbpress version 2.5.12, php version 7.1.3

    Cheers,
    Toby

    #183437
    Col_Blimp
    Participant

    Looking to filter/replace all instances of <img src="http:// with <img src="https:// is there any hooks that allow this to happen on topic/reply creation and edit?

Viewing 25 results - 5,276 through 5,300 (of 32,522 total)
Skip to toolbar