Forum Replies Created
-
In reply to: Need to fix a couple of things in theme
Hmm… as far as I can work out, (at least with pretty links on) a forum link redirects to
forum.php
which invokespost_form()
towards the end of the page. That’s found infunctions.bb-template.php
(underbb-includes
) and as well as running the respective pre/during/post actions, it loads thepost-form.php
template from the theme’s directory.Could you post your theme’s
post-form.php
here?In reply to: highlight first postPut
<?php if (get_post_position() == 1) { continue; } ?>
after theforeach ($posts as $bb_post)
line intopics.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 inpost.php
in your HTML.No idea on modifying the number of posts for the first page though probably a plugin for that
In reply to: How to set the User Role MapThere’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.
In reply to: Using bbpress as my "blog"… adding a header navbarYou 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 postBlergh. 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; ?>
afterclass="typo"
(no need for a space). You can change thestyle
to aclass
or whatever obviously, but I think that should work.In reply to: highlight first postThe 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 underpost.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
In reply to: Need to fix a couple of things in themeThe new post template is stored under
post-form.php
.register.php
andbb-login.php
are seperate pages that only includeheader.php
andfooter.php
, so you’d need to include the sidebar either manually or in the header or footer respectively. Hope that helps!In reply to: How to Add Status Update *NEW* into Your TitleApparently
topic_time
is timezone-shifted, so the previous code is wrong 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; ?>
In reply to: How to Add Status Update *NEW* into Your Title<?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. Change24*60*60
to the number of seconds you want to include topics from.In reply to: jquery @ global headerjQuery 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 use
<?php bb_active_theme_uri(); ?>
to output the template directory or<?php get_bb_active_theme_uri(); ?>
to return it as a variable.