viktora (@viktora)

Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hi, did you get the fix?

    OMG! :-(( You still can not see the right code.:-( This bbpress is filtering some strings… I will spell the strings in “”, you should write the code without spaces.

    $content = str_replace(“& l t ;”,”<“,$content);
    $content = str_replace(“& g t ;”,”>”,$content);

    Hopefully I will succeed this (and last) time.:-)

    What the hell! This row is still being removed by the local bbpress… grrrr.
    $content = str_replace(“>”,”>”,$content);

    Add it in front of the “return” row.

    I do not know whar is happening… the right code again, trying it without “code” formatting…

    add_filter(“bbp_get_reply_content”, “ps_bbp_get_reply_content”);
    function ps_bbp_get_reply_content ($content) {
    $content = str_replace(“<“,””,$content);
    return $content;
    }

    Sorry, for some reason, one row was removed from the code. Here is the complete code. Additionally, the characters which were replaced by bbconvertor were replaced by the bbpress.org/forums reply content as well…:-) But you can see from the code what was replaced with what.:-)

    add_filter("bbp_get_reply_content", "ps_bbp_get_reply_content");
    function ps_bbp_get_reply_content ($content) {
    $content = str_replace("&lt;","",$content);
    return $content;
    }
    
    In reply to: Index page

    Another observation + summary to the topic “bbpress is ignoring my customized index page file page-front-forums.php in my template directory”…

    Default setup for forum base slug is “forums”. With this setup page-front-forums.php is being ignored. After change to “discussions”, the /discussion/ URL still ignores the template file BUT /forums/ URL is still working and it is working fine! (no shortcode usage).

    BUT only for logged in users.:-)) Other users are redirected to web index page.

    Anyway, I am happy to have at least some progress here.:-))

    I have found the problem. bbConverter has imported all the first topic posts from my old forum to bbpress 2 with small modification: all “” characters were replaced with “<” and “>” (probably to remove HTML tags). I have resolved the issue by following code in my bbpress-functions.php file:

    add_filter("bbp_get_reply_content", "ps_bbp_get_reply_content");
    function ps_bbp_get_reply_content ($content) {
    $content = str_replace("&lt;","",$content);
    return $content;
    }
    

    Thanks a lot! I put bbp_list_forums to sidebar to show all forums like here. So what is the right way to do that? It would be nice if i could download template files for the theme used here. At least for the sidebar. 🙂

    In reply to: Index page

    No John.:-) I was using multiple methods for displaying my forum just for testing purpose. Now, the status is that I do NOT have any page with shortcode. I just modified the Forum base slug to /discussion/. Suddenly the historical /forums/ forum base slug started to work in the way I expected and the new slug /discussion/ works in the same wrong way as /forums/ did before.

    Couple of questions:
    Why is the /forums/ slug working after it was modified in the admin area (forum base slug)? It should not be visible at all.
    Why is the new /discussion/ forum base slug ignoring page-front-forums.php file? Compared to the /forums/ slug which accepts whe template file ok.

    In reply to: Index page

    One more strange observation. In admin area I have modified the Forum base slug to different than /forums/, te us say to /discussion/. What is the bbpress doing?

    If the old (and theoretically not existing) page /forums/ is called, the customized file page-front-forums.php is shown OK.

    But if you call the new /discussion/, page-front-forums.php is ignored.

    Really strange. Isnt it a bug?

    In reply to: Index page

    Hi John, this is what I did when using the shortcode in my page created with slug /forums-test/. It worked well. But what if I do not want to use the shortcodes? The /forums/ page is ignoring my customized page-front-forums.php. I tried to edit the page slug from /forums-test/ to /forums/ but the system is insisting on slug /forums-2/ (created automatically by the system). How should I make the bbpress to use my customized page-front-forums.php file on /forums/? Ideally without shortcodes?

    I tried to change the slug for

    Hi all, let me report on my progess.:-) I started with copying the “page-front-forums.php” from /extras to wp-content/MYTHEME directory and this decision was probably wrong. Reason? Other files are working fine in MYTHEME directory so far but page-front-forums.php is not working. I do not know why but I have found that someone had similar issue before: https://bbpress.org/forums/topic/bbpress-does-not-show-list-of-all-forums-2/. But I do not like the solution presented.

    It looks like this is my solo topic.:-) So I continue contributing. Here is my progress in resolving the isue described above.

    I have created bbpress-extras directory in MYTHEME directory. All files from /wp-content/plugins/bbpress/bbp-theme-compat/extras were copied into this directory. Than I edited bbpress-functions.php (copied to MYTHEME directory). Following code looks to be promising

    function bbpress_custom_template() {
    if ( is_bbpress() ) {
    require_once ( 'bbpress-extras/page-front-forums.php');
    exit;   
    }
    }
    add_action('template_redirect', 'bbpress_custom_template');
    

    This is the result: http://poradci-sobe.cz/forums/

    This looks like this is the way how my custom template files can be stopped to be ignored by bbpress. At least the first file I am testing – page-front-forums.php. I will try to make the condition more precize and to create special condition for each template file I want to use.

    Does anybody know, why this approach creates as many forum lists as the number of forum is?? Each forum lists is the same except forum name is different. I would expect there will be only one forum lists without any name.

    I am looking for JJJs answer saying “this is a very poor solution”. I am trying my best. Sorry for that.:-)

    • This reply was modified 11 years, 9 months ago by viktora.

    Hi Syndicate, the troubles are not things pushed together (will be resolved later by styling). Trouble is that the root template files from /wp-content/plugins/bbpress/bbp-theme-compat/extras are ignored moved into wp-content/themes/MYTHEME/. This bahaviour was tested on page-front-forums.php file. Compared to file bbpress-functions.php which is not ignored if moved to wp-content/themes/MYTHEME/. Than, it is not clear to me what to do with directories /css and /js from bbp-theme-compat if I want to use them in my custom theme.

    Not sure what you are meaning… I have custom WP template written from scratch. And I would like to add bbpress 2.1 template to it. I did what I described above just to see if any result outcomes. I expected to see header-body-footer forum screen (based on my knowledge of template packed in bbp-theme-compat directory). My custom WP template uses header – left sidebar – body – right sidebar – footer. So the difference should be visible (there should not be any sidebars). But I saw just the forum inside my custom theme (with left and right sidebars). In the target design, I would like to have the bbpress designed like here on bbpress.org (with left sidebar).

    My custom WP template looks like this: http://poradci-sobe.cz/
    My old bbpress forum (1.1) looks like this: http://poradci-sobe.cz/diskutujeme/ (I would like to have the new bbpress 2.1 designed in this way)
    And here is how the new bbpress 2.1 forum looks like now: http://poradci-sobe.cz/forums/ (this is not wanted, the “1.1” design is desired but I am not able to theme the default bbpress template in bbp-template-compat root directory

Viewing 15 replies - 1 through 15 (of 15 total)