Adam Harley (Kawauso) (@kawauso)

Forum Replies Created

Viewing 10 replies - 276 through 285 (of 285 total)
  • @kawauso

    Member

    Hmm… as far as I can work out, (at least with pretty links on) a forum link redirects to forum.php which invokes post_form() towards the end of the page. That’s found in functions.bb-template.php (under bb-includes) and as well as running the respective pre/during/post actions, it loads the post-form.php template from the theme’s directory.

    Could you post your theme’s post-form.php here?

    In reply to: highlight first post

    @kawauso

    Member

    Put <?php if (get_post_position() == 1) { continue; } ?> after the foreach ($posts as $bb_post) line in topics.php to stop the first post appearing in the loop.

    To get the first post separately, you could use <?php $bb_post = bb_get_first_post(); bb_post_template(); ?> or <?php $bb_post = bb_get_first_post(); ?> and use the same functions as in post.php in your HTML.

    No idea on modifying the number of posts for the first page though :) probably a plugin for that

    @kawauso

    Member

    There’s not necessarily a ‘correct’ way to map users across, it just depends what you want your WordPress users to be capable of in bbPress.

    The bbPress Key Master is the equivalent of a WordPress Admin: it gives full control over all options for bbPress.

    bbPress Admins can edit forums and users, but not access options.

    bbPress Moderators can see the user list and edit topics, but not mess with forums or users.

    Members can post and edit their own posts.

    Inactive users can view topics, but not post… and blocked users can’t do anything at all.

    @kawauso

    Member

    You could use bbPages (https://bbpress.org/plugins/topic/bbpages/) for pages. You’ll probably need to edit some code yourself though if existing plugins don’t do what you want and possibly write some of your own as well. WordPress is really more geared towards this sort of thing with regards to WYSIWIG and image management, to even allow images on bbPress you need to install a plugin and BBcode is probably the closest to WYSIWYG.

    I’m sure with a lot of coding, you could get bbPress to behave like a portal, but why not just use WordPress and integrated bbPress?

    In reply to: highlight first post

    @kawauso

    Member

    Blergh. No idea why they’re using the post_id() instead, but okay. Try putting this <?php if (bb_is_first(get_post_id())) : ?> style="background-color:#FFFF99;"<?php endif; ?> after class="typo" (no need for a space). You can change the style to a class or whatever obviously, but I think that should work.

    In reply to: highlight first post

    @kawauso

    Member

    The ID of the entire first post (including the poster’s details) would depend on your theme’s code, but in Kakumei it’d be div#position-1. If it’s anything else, it’d be under post.php, but you could just use Mozilla Firefox’s DOM Inspector or Google Chrome’s Inspect Element to check the ID on the page anyway.

    Again in the case of Kakumei, the post itself is .threadpost, so you could use something like <style>div#position-1 .threadpost {background-color:#FFFF99;}</style> to change the background colour.

    Hope that’s some help

    @kawauso

    Member

    The new post template is stored under post-form.php. register.php and bb-login.php are seperate pages that only include header.php and footer.php, so you’d need to include the sidebar either manually or in the header or footer respectively. Hope that helps!

    @kawauso

    Member

    Apparently topic_time is timezone-shifted, so the previous code is wrong :P told you it was rough! This will take the time from the opening time :)

    <?php if ( (current_time('timestamp') - 24*60*60) < strtotime($topic->topic_start_time) ) : ?>*NEW* <?php endif; ?>

    @kawauso

    Member

    <?php if ( (time() - 24*60*60) < strtotime($topic->topic_time) ) : ?>*NEW* <?php endif; ?>

    A very rough way of doing it there, but if you put that in forum.php before say, <?php topic_title(); ?> if you want it in the topic title, it should work. Change 24*60*60 to the number of seconds you want to include topics from.

    In reply to: jquery @ global header

    @kawauso

    Member

    jQuery is already bundled with bbPress (and WordPress), so you can just use

    <?php bb_enqueue_script('jquery'); ?>

    in your theme’s functions.php and it’ll automatically be included in your header.

    Same applies for WordPress, but using wp_enqueue_script instead…

    But to answer your original question :P use <?php bb_active_theme_uri(); ?> to output the template directory or <?php get_bb_active_theme_uri(); ?> to return it as a variable.

Viewing 10 replies - 276 through 285 (of 285 total)