Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 17,251 through 17,275 (of 32,500 total)
  • Author
    Search Results
  • #40454
    Anointed
    Participant

    I’m looking for something like is_bbpress(), but one that only fires if on the forum homepage. Is there such a conditional?

    i.e.

    if is_bbpress_forum_home() …. will allow me to add/subtract functionality from the forum homepage no matter where it is located.

    Trying to do something like:

    <?php if ( $page = bbp_get_page_by_path( $bbp->root_slug ) ) : ?>

    <?php _e( 'Forums', 'bbpress' ); ?>

    <?php else : ?>

    <?php bbp_forum_title(); ?>

    <?php endif; ?>

    #40455

    I figured since I was asking for help on something here:

    http://bbpress.org/forums/topic/function-calls

    I would at least give a little something that I believe some people may find useful. I may not explain this well so please feel free to ask questions and I’ll do my best to help you.

    I needed to create a whole new sidebar for my forum page and after some research and using the old noggin I came up with the following. Please note that this should be a good common usage for most themes but your situation may be unique. Adjust as needed.

    First, open your functions.php file and copy the following in there:

    // Forum Sidebar Widget Area. Empty by default.
    register_sidebar( array(
    'name' => __( 'Forum Widget Area', 'twentyten' ),
    'id' => 'forum-widget-area',
    'description' => __( 'The Forum Widget Area', 'twentyten' ),
    'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    'after_widget' => '',
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );

    Again, each case may be different but generally this will work. What this will do is create a new Widgetized sidebar area (located under Appearances >> Widgets)

    Alternatively, You can copy your existing widget code in functions.php for widgets but be sure to rename the areas, especially id, as I have above (forum-widget-area was originally sidebar-widget-area).

    Take note, as well of the class= and id= I have. Those are useful for my blog but you may be using different tags for yours. Adjust as needed.


    Then Create a new file and name it anything you want, for our testing purposes we’re going to use forum-sidebar.php

    Copy and paste your code from sidebar.php into your new forum-sidebar.php file.

    My original looks like this:

    // A Sidebar for widgets
    if ( is_active_sidebar( 'sidebar-widget-area' ) ) : ?>

    <div id="sidebar" class="widget-area" role="complementary">
    <ul class="xoxo">
    <?php dynamic_sidebar( 'sidebar-widget-area' ); ?>

    </div>

    As you can see, I have two spaces calling the sidebar-widget-area that was previously declared in functions.php. Yours should be very similar to this or at least easy enough to figure out.

    What you need to do is rename the two fields within the () areas to what you declared when setting up your code in functions.php, mine is

    // A Sidebar for widgets
    if ( is_active_sidebar( 'forum-widget-area' ) ) : ?>

    <div id="sidebar" class="widget-area" role="complementary">
    <ul class="xoxo">
    <?php dynamic_sidebar( 'forum-widget-area' ); ?>

    </div>

    Notice how I changed sidebar-widget-area to forum-widget-area ?

    We do this so that when your forum page is called, it shows the widgets you’ll setup later.


    Now, Open your Page Template and find:

    <?php get_sidebar(); ?>

    Or something similar. generally this is at the bottom of the code.

    Replace that with:

    <?php
    $uri = $_SERVER['REQUEST_URI'];
    if ( strpos($uri,'YOUR-FORUM-BASE') !== false ) {

    include(TEMPLATEPATH . '/forum-sidebar.php');

    } else {

    get_sidebar();

    }
    ?>

    “forum-sidebar.php” is the file you created earlier and YOUR-FORUM-BASE is the “Forums base” you have defined for your forums settings (in Settings >> Forums). Also please note the / before the file name. With this code you’ll need it.

    What this does is calls your primary URL http://yoursite.com and then attempts to detect if it’s on THIS URL or ANOTHER.

    So if yoursite.com/YOUR-FORUM-BASE then SHOW THIS else SHOW THAT.

    Using this code you can have an entirely seperate widget area for your forum page so you can make better use of the bbPress widgets without overdoing it with your current sidebar setup.

    Someone may have a better or more elegant way of achieving this but this has worked for me and it works well. I hope anyone finds it useful.

    #40447
    highexistence
    Participant

    I’m trying to show a logged-in user’s favorite topics on a single page like the page-front-topics.php template that’s included in the bbpress default theme. I used the exact same syntax as in that file but instead called in another template I created, content-archive-favorites.php, which contains the exact code (minus the containing div) from the user-favorites.php file.

    It just shows that the user has no favorites.

    Any help would be greatly appreciated!

    svedman
    Member

    In bbpress.pot, the original strings are:

    This forum contains %1$s and %2$s.

    This category contains %1$s and %2$s.

    With bbPress 2.0-rc-2 fully translated, these phrases seem to use hard-coded English for the words topic/topics and reply/replies.

    Translated to Norwegian, the finished phrases will thus be:

    Dette forumet inneholder 0 topics og 0 replies.

    Denne kategorien inneholder 0 topics og 0 replies.

    When they should be:

    Dette forumet inneholder 0 tråder og 0 svar.

    Denne kategorien inneholder 0 tråder og 0 svar.

    #110018
    jez101
    Member

    @Gautam Fair point.

    @anointed I hope so, perhaps the new version might have better out of the box support

    @letheos I think I will have another go with bbcodes, this does now seem like the best option. I’ll post back if I have any luck.

    Thanks for the replies.

    #109950
    sharonlevi80
    Member

    i would love to get answer to that too.

    really love the new version by the way…

    cheers !!

    sharon


    ‫‪‫superenalotto

    #110016
    letheos
    Member

    You can use shortcodes and just add some custom css styling.

    #110030
    letheos
    Member

    Dario,

    1. Create a page.

    2. Make it a homepage.

    3. Add the right shortcodes.

    4. Add proper styling.

    highexistence
    Participant

    Hmm so there’s no way to code this in until it’s released? I would LOVE to be able to have favorites/subscriptions in the BP profile. I need the functionality of both!

    Additionally, it would be great to also have a list of ‘Mine’ discussions on the profile too.

    #110004
    pagal
    Participant

    I found a solution somewhere to disable functions when you are calling post-form to septate files: LIKE

    <?php post_form( array( 'last_page_only' => false ) ); ?>

    I hope, with that kind of code we can disable attachments on replies.

    — Anyone?

    #110002
    pagal
    Participant

    Bump! Bump!

    Hello, Zaerl, Ben L.

    Are you listening to me?

    I think _ck_ has gone again :-/

    #110043
    Anointed
    Participant

    Odds are pretty good that it has something to do with the css files. I’d ask the theme author what he is doing to cause this issue.

    I read through the code that I can see but have no idea what is wrong. I do see the style.css being called twice in your header, but that would not cause this problem.

    Honestly, this one is so weird, that I’d love to hear what the fix ends up being so if you do find out, please do share….

    #109797
    amirsaam
    Member

    Yep, but something else you can use if you want that play like Twitter to reply game (Got my mean? Like @OAEErra) on topics you can use this: Easy Mentions

    Note: The code I gave you is for StandAlone vr. not the bbPlugin

    #109796
    OAEErra
    Member

    That’s perfect 7i7GRiFFiN i’ll play with this later, thanks!

    I assume that takes them to the post form area on the forum page itself?

    I could do that with a ‘Reply’ button on each post too.

    Much thanks :)

    #110015
    Anointed
    Participant

    As bbPress follows all WordPress code standards, I am going to assume it is something to do with thesis.

    Chris is a great coder so I am certain that he would have no problem coming up with a fix for thesis.

    Anointed
    Participant

    Actually it was quite easy to do:

    Modify archive forum:

    <div id="forum-front" class="bbp-forum-front">
    <div class="entry-content">

    <?php bbp_get_template_part( 'bbpress/content', 'archive-forum' ); ?>
    <br><br>
    <h3>Recent Topics:</h3>
    <?php bbp_get_template_part( 'bbpress/content', 'archive-topic' ); ?>

    </div>
    </div><!-- #forum-front -->

    Notice I am simply calling the content-archive-topic template.

    **Obviously there is more to it than simply modding a core file which is not good. I am going to assume that you are using a custom theme/child-theme and modifying the templates from there.

    #109836
    Anointed
    Participant

    @Gautam

    Yes I read through your code prior to posting this and used it as an example of how to add options to the page.

    It was because of reading your code that I was asking about using tabs. My reason for this is that it would give the users a clear distinction between ‘core’ and ‘custom’ options while still maintaining all options in the same page.

    Just thought it would be unique, cool, and provide yet another level of organization to bbPress.

    #109876
    antonchanz
    Member

    The latest versions now have admin settings in the dashboard that allow the admin to create additional whitelists of supported tags. It also detects Viper’s Video Quicktags and allows all those tags to be added to the whitelist via a single checkbox.

    I’ve implemented a means by which other shortcode plugin developers can make their plugins get automatically detected by the whitelist, declaring which safe shortcodes they support, and giving them the same single checkbox ‘add to whitelist’ functionality that I’ve currently done with my bbPress BBCode plugin and Viper’s Video Quicktags.

    Gautam Gupta
    Participant

    You would actually need to modify theme files, particularly the forum loop and CSS files to do that. It involves a bit of time and no one has tried to do it yet. I’ll see to it when I get time. :)

    #110014
    Gautam Gupta
    Participant

    Thesis is a paid theme and we can’t say anything about it unless we have access to its source. :)

    #106124
    ddlg2007
    Member

    Hi I have a question. How can I edit style.css without affecting my theme. So use the firebug to make changes but when I inspect objects the style is wp-content/themes/mytheme/style.css and i dont wanna edit my style of theme, only style of bbpress.

    I try this:

    Copy Files

    If this is not a custom theme under your control (meaning you are not the author) you’ll want to copy the entire “/bbpress/bbp-themes/bbp-twentyten” folder into your “wp-content/themes/%YOURTHEMENAME%” folder, and modify your style.css to make it a custom Child Theme of whatever your current theme is. This is so theme updates don’t wipe

    Add Theme Support

    Now that you’ve got the files copied over, you’ll need to tell bbPress that you are in control of the theme situation. You do this by adding this to your functions.php file:

    add_theme_support( ‘bbpress’ );out all your hard work later.


    But dont work good because some subforums disappear and change the order. I like to stay like this with bbp-TwentyTen and modify aspects of my theme style.css without affecting primary.

    #40393
    jez101
    Member

    Has anyone been able to get bbPress 2.0 and the Thesis theme to work together?

    I have tried a number of things but I just can’t get it to work.

    If I do nothing and rely on the default theme the forum is totally unusable. Not only is there no styling but none of the functionality works (no links appear for a start!).

    I have tried creating a child theme as per instructions on this forum, tried using shortcodes and I have also tried copying the relevant parts of the default theme over to the thesis theme folder.

    This seems to get slightly better results in the sense that I get the forum functionality, but there is no styling. You can see my current attempt here:

    http://www.jezza101.co.uk/forums

    It seems to me like part of the theme’s framework is somehow breaking bbPress, there must be some fundamental incompatibility in there somewhere – but I really don’t know enough to debug this.

    I have asked over at the Thesis support forum but there seems to be little understanding of what’s going on over there. Is there anyone over here who has any suggestions?

    #109795
    amirsaam
    Member

    jus’ add a link to where you need and make the url to the div of the new topic/reply form. I used this one for myself to new topic in the forum page:

    <?php if(bb_get_forum_is_category() != bb_is_user_logged_in()) { echo "— <a href='#post-form' class='jAdd'>Add new »</a>"; } ?>

    The a class is for a jQuery thing I used, you don’t need that.

    #40391
    silverks
    Member

    Hi,

    I’m currently implementing bbPress compatibility support for my theme (Graphene). I chose to go the route of using the default theme that comes with bbPress 2.0, and just add additional styles to make bbPress compatible with my theme.

    Since I’m not using the add_theme_support( 'bbpress' ) switch in my theme, bbPress displays a persistent nag in the Appearance section of WP Admin:

    Your active theme does not include bbPress template files. Your forums are using the default styling included with bbPress.

    How can I disable this nag? It doesn’t matter that the forums are using the default styling included with bbPress, since the additional custom stylesheet I implemented in the theme takes care of integrating the styling into my theme’s styles.

    Thanks!

    #109148
    David
    Member

    I’d rather do it with a template tag but I did realize that I can use the shortcode and do_shortcode to pull topics by forum on the forums index:

    <?php echo do_shortcode('[bbp-single-forum id=$forum_id]') ?>

    For those who are interested but not completely clear, a forum’s id can be found easily by viewing the source code in your browser and looking for the id or class of a forum listing’s containing element (for example: id=”bbp-forum-2536″ or class=”post-2536″).

Viewing 25 results - 17,251 through 17,275 (of 32,500 total)
Skip to toolbar