koendb (@koendb)

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 34 total)
  • @koendb

    Participant

    I got in contact with @shanhard but basically copied most of my code from wp-content/plugins/bbpress/includes/common/widgets.php

    @koendb

    Participant

    I had to read better. It was in the Codex is_page() function reference.

    Had to reset the query after the loop:
    wp_reset_query(); // and after that:
    if(is_page()){ // etc.

    @koendb

    Participant

    Thanks, but it needs to give different results for the SAME topic on different ‘pages’. When it displays below an article vs it’s own page.

    In reply to: Displaying Adsense ads

    @koendb

    Participant

    Very quick response, think this or something like this would work:

    Create a child theme, copy loop-replies.php and change this part:

    <?php while ( bbp_replies() ) : bbp_the_reply(); ?>
    		<?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
    <?php endwhile; ?>

    into:

    <?php $i=1; 
    while ( bbp_replies() ) : bbp_the_reply(); ?>
                    <?php if(1==$i or 3==$i) { echo '#adsense code#'; } ?>
                    <?php $i++; ?>
    		<?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
    <?php endwhile; ?>

    @koendb

    Participant

    Great!

    You should read something about responsive webdesign. Easiest way to make a mobile site is to adjust the way users view the page with css.

    @koendb

    Participant

    You can add all sorts of changes to your theme or bbpress from the general wordpress functions.php file. You can find this file here:
    /wp-content/themes/%theme name%/functions.php

    But if you update your theme your changes to this file will be overwritten, that’s why you should make a child theme with your own functions.php file. It’s not that hard and after you’ve made your child theme it’s easy to tweak other things as well.

    @koendb

    Participant

    You could just put it in your functions.php file.

    If it’s empty put this on the first line:

    
    <?php 

    General information about adjusting your theme (and functions.php): Making a child theme

    @koendb

    Participant
    In reply to: Forum root

    @koendb

    Participant

    I read a lot of questions about what to do with the forum root, so I figured I post something other might use as well. My workaround:

    – I made a page with all my forum categories, like I described above.
    – The forum root uses the bbpress.php template and in that file I made an if statement to check if the template is serving the forum-root. If that happens the template shows the last 25 active topics.
    – Both pages have a header like this:
    —————
    Forum
    | Sorted on category | Active topics |
    —————
    That way it’s very obvious how to go to the counter-page.

    Breadcrumbs now direct to the last active topics page, while the ‘forum’ link in my top navigation directs to the forum page (sorted on subject). Not perfect, but it’s the best I could think of.

    Any further help / suggestion are appreciated!

    Results:
    http://www.24baby.nl/community/ (last active)
    http://www.24baby.nl/forum/ (on category)

    @koendb

    Participant

    Ah, sorry @shmoo or @macpress: forgot to add the filters:

    add_filter( 'bbp_get_time_since', 'short_freshness_time' );
    add_filter('bp_core_time_since', 'short_freshness_time');

    @koendb

    Participant

    You could change your forum lay-out with a template and let your other pages stay the same. It’s going to be though to achieve this result without ANY coding languages. Even when you use other’s code you’ll need to change the .css to change the colors etc.

    If you however decide to try it yourself, you should start reading here.

    @koendb

    Participant

    Thanks Shmoo!
    I added this filter, don’t remember where I found it:

    function short_freshness_time( $output) {
    $output = preg_replace( '/, .*[^ago]/', ' ', $output );
    return $output;
    }
    
    add_filter( 'bbp_get_time_since', 'short_freshness_time' );
    add_filter('bp_core_time_since', 'short_freshness_time');

    Shall we leave this thread to Mycelus now? Feel free to PM me or open your own.

    @koendb

    Participant

    I would show a little more appreciation for the people making all of this possible.

    That being said, this is my bbpress forum: 24Baby (dutch). Looks exactly like the two you linked to. I would be happy to provide some code, but before I put any effort into it, please make sure bbpress is the forum software of your choice.

    In reply to: Forum root

    @koendb

    Participant

    Hmm this looks like a bug. I just posted this topic, but it’s not in the recent topics list and on my profile it has a freshness of 1 year and 6 months. Think it’s the slug. So BUMP 😉

    In reply to: Duplicate Page Titles

    @koendb

    Participant

    edit, nevermind. Should have posted on Buddypress forum

    In reply to: Remove default css

    @koendb

    Participant

    Thanks a lot!

    In reply to: layout changes

    @koendb

    Participant

    It’s all quite easy once you understand the structure. Don’t expect to click some buttons though, if you want to make real changes to the default layout you’ll need some basic knowledge of HTML and php.

    @koendb

    Participant

    This should get you started: bbp_get_reply_post_date on sourcexref

    I feel the same way. It’s great how much work is being put into this plugin, but the support isn’t great. And finding out what information is still valid for the current bbpress version is sometimes difficult.

    But in general: you could google every function and after a few days you’re used to and can guess the very logical named function names.

    Good luck. (and keep me updated)

    @koendb

    Participant

    To me it seems it all works perfectly. Just add
    .two_third { width: 100%; }

    to your .css file

    @koendb

    Participant

    Hey.

    If you haven’t created a child theme, start with doing that.

    Create the file bbpress.php in your child theme.
    Copy the content of your page.php file into this new file.
    Remove the line

    <?php get_sidebar(); ?>

    You’ve removed the sidebar 🙂

    Now you only need to change / add some classes / ID’s and adjust your CSS file to give the forum a 100% width.

    Keep me updated 🙂

    @koendb

    Participant

    This might help you.

    In reply to: bbp_rel_nofollow

    @koendb

    Participant

    I only know a little php, and I think this way the function searches through ALL the links in a reply/topic and adds target_blank to all of them when at least one of them is external. That’s not what you want.

    You need to
    1) explode the content
    2) loop through all link tags
    3) Test if it’s external or internal
    4) if external: use the function above to add the target=_blank
    5) if internal: remove nofollow
    6) implode and return the new reply/topic content.

    It would probably take me a few hours to google this together, maybe you could try this yourself or somebody whit a little more php knowledge could help.

    In reply to: bbp_rel_nofollow

    @koendb

    Participant

    Using bbp_rel_nofollow as a starting point is obviously better 😉

    In reply to: bbp_rel_nofollow

    @koendb

    Participant

    You don’t have to change the bbp_rel_nofollow filter, just add another filter like this in your functions.php:

    <?php
    add_filter( ‘bbp_get_reply_content’,’links_blank_follow’, 90 );
    add_filter( ‘bbp_get_topic_content’,’links_blank_follow’, 90 );

    function links_blank_follow() {
    // add nofollow or target blank to links
    }
    ?>

    As for the function itself, I wouldn’t know how to do that, but you should be able to put it together, could start here.

    Let me know!

    @koendb

    Participant

    I haven’t got a clue what that problem might be, I’m sorry. Did you upload a valid functions.php in between your different tries (with/without <?php ?>) ?

    (and yes, I see my code could be a little shorter, feel free to optimize this :))

Viewing 25 replies - 1 through 25 (of 34 total)