Skip to:

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1586 closed task (blessed) (fixed)

bbp-twentyten should use tableless layout

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by:
Milestone: 2.1 Priority: normal
Severity: normal Version:
Component: Appearance - Theme Compatibility Keywords: needs-ui reporter-feedback dev-feedback has-patch
Cc: lgedeon, mercime


In the interest of making theme compatibility fast and easy, I opted to use tables for the forum/topic/reply loop templates. This should be switched to being tableless eventually, and sooner than later is best.

This will require testing in twentyten, twentyeleven, and bp-default to confirm correct fitment into the most popular parent theme use cases.

Attachments (1)

1586-01.patch (19.1 KB) - added by mercime 12 years ago.

Download all attachments as: .zip

Change History (13)

#2 @anointed
12 years ago


Last edited 12 years ago by anointed (previous) (diff)

#3 @johnjamesjacoby
12 years ago

Any takers on this? Running out of time to fit this into 2.0.

#4 @johnjamesjacoby
12 years ago

  • Milestone changed from 2.0 to 2.1

Punting to 2.1.

#5 @lgedeon
12 years ago

  • Cc lgedeon added

#6 @mercime
12 years ago

  • Cc mercime added

JJJ, I'd like to help out. Do you have any preferences re markup? I was thinking markup could look like this for forum loop:

<div id="table-forum-loop" class="table bbp-forums">

	<div class="thead">
		<div class="tr">
			<span class="th col1 bbp-forum-info"><?php _e( 'Forum', 'bbpress' ); ?></span>
			<span class="th col2 bbp-forum-topic-count"><?php _e( 'Topics', 'bbpress' ); ?></span>
			<span class="th col3 bbp-forum-reply-count"><?php bbp_show_lead_topic() ? _e( 'Replies', 'bbpress' ) : _e( 'Posts', 'bbpress' ); ?></span>
			<span class="th col4 bbp-forum-freshness"><?php _e( 'Freshness', 'bbpress' ); ?></span> 
		</div><!-- /tr -->
	</div><!-- /thead -->

	<div class="tfoot">
		<div class="tr">
			<span class="td colspan4">&nbsp;</span>
		</div><!-- /tr -->
	</div><!-- /tfoot -->

	<div class="tbody">
		<?php while ( bbp_forums() ) : bbp_the_forum(); ?>
			<?php bbp_get_template_part( 'bbpress/loop', 'single-forum' ); ?>
		<?php endwhile; ?>
	</div><!-- /tbody -->

</div><!-- /table-forum-loop -->

What do you think?

#7 @valendesigns
12 years ago

How about some HTML 5?


<?php do_action( 'bbp_template_before_forums_loop' ); ?>

<section class="bbp-forums">

			<li class="bbp-forum-info"><?php _e( 'Forum', 'bbpress' ); ?></li>
			<li class="bbp-forum-topic-count"><?php _e( 'Topics', 'bbpress' ); ?></li>
			<li class="bbp-forum-reply-count"><?php bbp_show_lead_topic() ? _e( 'Replies', 'bbpress' ) : _e( 'Posts', 'bbpress' ); ?></li>
			<li class="bbp-forum-freshness"><?php _e( 'Freshness', 'bbpress' ); ?></li>

	<?php while ( bbp_forums() ) : bbp_the_forum(); ?>

		<?php bbp_get_template_part( 'bbpress/loop', 'single-forum' ); ?>

	<?php endwhile; ?>


<?php do_action( 'bbp_template_after_forums_loop' ); ?>


<article id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class(); ?>>


		<li class="bbp-forum-info">

			<?php do_action( 'bbp_theme_before_forum_title' ); ?>

			<a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>"><?php bbp_forum_title(); ?></a>

			<?php do_action( 'bbp_theme_after_forum_title' ); ?>

			<?php do_action( 'bbp_theme_before_forum_sub_forums' ); ?>

			<?php bbp_list_forums(); ?>

			<?php do_action( 'bbp_theme_after_forum_sub_forums' ); ?>

			<?php do_action( 'bbp_theme_before_forum_description' ); ?>

			<div class="bbp-forum-description"><?php the_content(); ?></div>

			<?php do_action( 'bbp_theme_after_forum_description' ); ?>


		<li class="bbp-forum-topic-count"><?php bbp_forum_topic_count(); ?></li>

		<li class="bbp-forum-reply-count"><?php bbp_show_lead_topic() ? bbp_forum_reply_count() : bbp_forum_post_count(); ?></li>

		<li class="bbp-forum-freshness">

			<?php do_action( 'bbp_theme_before_forum_freshness_link' ); ?>

			<?php bbp_forum_freshness_link(); ?>

			<?php do_action( 'bbp_theme_after_forum_freshness_link' ); ?>

			<p class="bbp-topic-meta">

				<?php do_action( 'bbp_theme_before_topic_author' ); ?>

				<span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 14 ) ); ?></span>

				<?php do_action( 'bbp_theme_after_topic_author' ); ?>



</article><!-- bbp-forum-<?php bbp_forum_id(); ?> -->

#8 @johnjamesjacoby
12 years ago

  • Keywords reporter-feedback dev-feedback added
  • Type changed from defect to task

Either way is fine by me. Whatever is easiest to get the job done. :)

#9 @mercime
12 years ago

  • Keywords has-patch added

Belated Happy Thanksgiving Day!

Decided to go with transforming forum tables to unordered lists ala WP's comments list and BuddyPress activity streams without the indentations of course :-)

  • Default styles from forum Tables were ported to the new forums UL's.
  • General layout tested in Firefox, Safari, Chrome and IE 7/8
  • Tested in Twenty Ten, Twenty Eleven, and BuddyPress bp-default theme


  • In Twenty Ten: noticed a couple of style fixes to reply topic font and need to center-align forum footer Author text
  • Sure to find many more fixes needed :-)

Attached is first try at transformation. Cheers.

Last edited 12 years ago by mercime (previous) (diff)

12 years ago

#10 @johnjamesjacoby
12 years ago

Spectacular work. Reviewing it now and will be committing shortly.

#11 @johnjamesjacoby
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3634]) Theme Compatibility Updates:

  • Tableless layout, fixes #1586, props mercime
  • Introduce content-single-reply and content-topic-tag-edit templates
  • Update shortcodes to use content templates
  • Update theme compatibility to include single reply shortcode
  • @todo CSS audit, RTL audit, shortcode audit

#12 @mercime
12 years ago

Thank you JJJ. It was cool to see the forum UL's at :-)

Note: See TracTickets for help on using tickets.