Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Partial support for the new bbPress plugin

  • Loading branch information...
commit 6ab1d35266db610d207e8bff2105c754f0ae1694 1 parent 2200902
@jayj authored
View
2  archive.php
@@ -20,7 +20,7 @@
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
- <?php get_template_part( 'loop', 'archive' ); // Could be awesome to use hybrid_get_context() but get_template_part() doesn't accept arrays ?>
+ <?php get_template_part( 'loop', get_post_format() ); // Could be awesome to use hybrid_get_context() but get_template_part() doesn't accept arrays ?>
<?php endwhile; ?>
View
615 css/bbpress.css
@@ -0,0 +1,615 @@
+/**
+ * bbPress specific CSS for Cakifo
+ * This stylesheet is loaded if the bbPress plugin is active
+ *
+ * @package bbPress
+ * @subpackage Cakifo
+ */
+
+/* =bbPress Style
+-------------------------------------------------------------- */
+
+#entry-author-info {
+ margin: 25px 0;
+}
+
+#content table.bbp-topics,
+#content table.bbp-forums,
+#content table.bbp-replies,
+
+#container table.bbp-topics,
+#container table.bbp-forums,
+#container table.bbp-replies,
+
+#main table.bbp-topics,
+#main table.bbp-forums,
+#main table.bbp-replies {
+ clear: left;
+}
+
+/* =Breadcrumb and Tags
+-------------------------------------------------------------- */
+
+div.bbp-breadcrumb {
+ float: left;
+
+}
+
+div.bbp-breadcrumb,
+div.bbp-topic-tags {
+ font-size: 12px;
+}
+
+#content div.bbp-breadcrumb p,
+#content div.bbp-topic-tags p {
+ margin-bottom: 10px
+}
+
+div.bbp-topic-tags {
+ float: right;
+}
+
+/* =Tables
+-------------------------------------------------------------- */
+
+#content table tbody tr.even td {
+ background-color: #fff;
+}
+
+#content table tbody tr.status-trash.even td,
+#content table tbody tr.status-spam.even td {
+ background-color: #fee;
+}
+#content table tbody tr.status-trash.odd td,
+#content table tbody tr.status-spam.odd td {
+ background-color: #fdd;
+}
+
+#content table.bbp-topics tbody tr.status-closed td,
+#content table.bbp-topics tbody tr.status-closed td a {
+ color: #ccc;
+}
+
+table.bbp-topic tbody tr td,
+table.bbp-replies tbody tr td {
+ background-color: #fff;
+}
+
+table.bbp-forums th, table.bbp-topics th,
+table.bbp-topic th, table.bbp-replies th {
+ font: bold 14px 'PT Serif', Georgia, serif;
+}
+
+table.bbp-forums tfoot th, table.bbp-topics tfoot th,
+table.bbp-topic tfoot th, table.bbp-replies tfoot th {
+ font-size: 12px;
+}
+
+
+table.bbp-forums th span, table.bbp-topics th span,
+table.bbp-topic th span, table.bbp-replies th span {
+ font-size: 12px;
+ font-weight: normal;
+ float: right;
+ padding-top: 1px;
+}
+#content th.bbp-topic-author,
+#content th.bbp-reply-author {
+ text-align: center;
+}
+#content th.bbp-topic-content,
+#content th.bbp-reply-content {
+ text-align: left;
+ padding: 9px 10px 9px 15px;
+}
+#content table.bbp-forums tfoot td, #content table.bbp-topics tfoot td,
+#content table.bbp-topic tfoot td, #content table.bbp-replies tfoot td,
+#content table.bbp-replies tr.bbp-reply-header td,
+#content table.bbp-topic tr.bbp-topic-header td {
+ background-color: #fafafa;
+ color: #888;
+ font: bold 12px Arial, Helvetica, sans-serif;
+ padding: 10px;
+}
+
+span.bbp-author-ip {
+ font: bold 11px Arial, Helvetica, sans-serif;
+ color: #aaa;
+}
+
+#content .bbp-forum-topic-count,
+#content .bbp-forum-reply-count,
+#content .bbp-topic-reply-count,
+#content .bbp-topic-voice-count,
+#content .bbp-topic-action {
+ width: 10%;
+ text-align: center;
+ padding: 6px 0px;
+}
+#content td.bbp-topic-author,
+#content td.bbp-reply-author {
+ padding: 20px 0 20px 8px;
+ width: 90px;
+ text-align: center;
+ vertical-align: top;
+}
+.bbp-topic-freshness,
+.bbp-forum-freshness {
+ text-align: center;
+ width: 20%;
+}
+
+#content tbody .bbp-topic-content,
+#content tbody .bbp-reply-content {
+ vertical-align: top;
+ padding: 15px 10px 10px 15px;
+}
+
+#content .bbp-topic-content img,
+#content .bbp-reply-content img {
+ max-width: 100%;
+}
+
+/* =Admin Links
+-------------------------------------------------------------- */
+
+span.bbp-admin-links {
+ float: right;
+ color: #ddd;
+}
+span.bbp-admin-links a {
+ color: #bbb;
+ font-weight: normal;
+ font-size: 10px;
+ text-transform: uppercase;
+ text-decoration: none;
+}
+fieldset span.bbp-admin-links {
+ float: left;
+}
+tr td span.bbp-admin-links a:hover {
+ color: #ff4b33;
+}
+td.bbp-topic-admin-links,
+td.bbp-topic-counts {
+ width: 50%;
+}
+
+a.bbp-topic-permalink,
+a.bbp-reply-permalink {
+ float: right;
+ margin-left: 10px;
+ color: #ccc;
+}
+
+/* =Toggles
+-------------------------------------------------------------- */
+
+.bbp-topic-action #favorite-toggle a {
+ text-decoration: none;
+ padding: 0px 3px 1px;
+ color: #7c7;
+ border: 1px solid #aca;
+ background-color: #dfd;
+ font-weight: bold;
+ font-size: 13px;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ }
+ .bbp-topic-action #favorite-toggle a:hover {
+ color: #5a5;
+ border-color: #7c7;
+ background-color: #beb;
+ }
+ .bbp-topic-action #favorite-toggle span.is-favorite a {
+ color: #faa;
+ border: 1px solid #faa;
+ background-color: #fee;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ }
+ .bbp-topic-action #favorite-toggle span.is-favorite a:hover {
+ color: #c88;
+ border-color: #c88;
+ background-color: #fdd;
+ }
+
+.bbp-topic-action #subscription-toggle a {
+ text-decoration: none;
+ padding: 0px 3px 1px;
+ color: #7c7;
+ border: 1px solid #aca;
+ background-color: #dfd;
+ font-weight: bold;
+ font-size: 13px;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ }
+ .bbp-topic-action #subscription-toggle a:hover {
+ color: #5a5;
+ border-color: #7c7;
+ background-color: #beb;
+ }
+ .bbp-topic-action #subscription-toggle span.is-subscribed a {
+ color: #faa;
+ border: 1px solid #faa;
+ background-color: #fee;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ }
+ .bbp-topic-action #subscription-toggle span.is-subscribed a:hover {
+ color: #c88;
+ border-color: #c88;
+ background-color: #fdd;
+ }
+
+#content p.bbp-topic-meta {
+ margin-bottom: 0;
+ font-size: 11px;
+}
+
+#content p.bbp-topic-meta span {
+ white-space: nowrap;
+}
+
+/* =Forums
+-------------------------------------------------------------- */
+
+#content table tbody tr .bbp-forum-description p {
+ margin-bottom: 0;
+ font-size: 13px;
+ font-style: italic;
+}
+#content table tbody tr ul.bbp-forums {
+ list-style: none;
+ font-size: 12px;
+ margin: 0 0 0 10px;
+ padding: 0 0 0 10px;
+ border-left: 1px solid #aaa;
+}
+#content table tbody tr ul.bbp-forums li {
+ display: inline;
+}
+
+/* =Pagination
+-------------------------------------------------------------- */
+
+.bbp-pagination-count {
+ font: 14px 'PT Serif', Georgia, serif;
+ float: left;
+}
+.bbp-pagination-links {
+ float: right;
+}
+.bbp-pagination {
+ float: left;
+ width: 100%;
+ margin-bottom: 20px;
+}
+
+.bbp-topic-pagination {
+ display: inline-block;
+ margin-left: 5px;
+ margin-bottom: 2px;
+ }
+ .bbp-topic-pagination a {
+ font-size: 10px;
+ line-height: 10px;
+ padding: 1px 3px;
+ border: 1px solid #ddd;
+ text-decoration: none;
+ }
+
+/* =Forms
+-------------------------------------------------------------- */
+#content fieldset.bbp-form,
+#container fieldset.bbp-form,
+#wrapper fieldset.bbp-form {
+ clear: left;
+}
+
+#content fieldset.bbp-form,
+#container fieldset.bbp-form,
+#wrapper fieldset.bbp-form {
+ border: 1px solid #eee;
+ padding: 10px 20px;
+}
+
+#content fieldset.bbp-form legend,
+#container fieldset.bbp-form legend,
+#wrapper fieldset.bbp-form legend {
+ padding: 5px;
+}
+
+#content fieldset.bbp-form label,
+#container fieldset.bbp-form label,
+#wrapper fieldset.bbp-form label {
+ width: 250px;
+ display: inline-block;
+}
+
+#bbp-edit-topic-tag.bbp-form fieldset.bbp-form label,
+#bbp-login fieldset label,
+#bbp-register fieldset label,
+#bbp-lost-pass fieldset label {
+ width: 100px;
+}
+
+#content fieldset.bbp-form p,
+#container fieldset.bbp-form p,
+#wrapper fieldset.bbp-form p,
+#content fieldset.bbp-form textarea,
+#container fieldset.bbp-form textarea,
+#wrapper fieldset.bbp-form textarea,
+#content fieldset.bbp-form select,
+#container fieldset.bbp-form select,
+#wrapper fieldset.bbp-form select,
+#content fieldset.bbp-form input,
+#container fieldset.bbp-form input,
+#wrapper fieldset.bbp-form input {
+ margin: 0px 0px 10px;
+}
+
+.bbp-topic-form,
+.bbp-reply-form,
+.bbp-topic-tag-form {
+ clear: left;
+}
+
+body.page .bbp-reply-form code,
+body.page .bbp-topic-form code,
+body.single-topic .bbp-reply-form code,
+body.single-forum .bbp-topic-form code,
+body.topic-edit .bbp-topic-form code,
+body.reply-edit .bbp-reply-form code {
+ font-size: 10px;
+ background-color: #f0fff8;
+ border: 1px solid #CEEFE1;
+ display: block;
+ padding: 8px;
+ margin-top: 5px;
+ width: 369px;
+}
+
+#merge_tag,
+#delete_tag {
+ display: inline;
+}
+
+div.bbp-submit-wrapper {
+ margin: 15px 0;
+}
+
+p.form-allowed-tags {
+ width: 462px;
+}
+
+input[type="password"] {
+ background: #f9f9f9;
+ border: 1px solid #ccc;
+ box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
+ -moz-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
+ -webkit-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
+ padding: 2px;
+}
+
+/* =Edit User
+-------------------------------------------------------------- */
+
+#bbp-your-profile fieldset {
+ margin-top: 20px;
+ padding: 20px 20px 0 20px;
+}
+ #bbp-your-profile fieldset div {
+ margin-bottom: 20px;
+ float: left;
+ width: 100%;
+ clear: left;
+ }
+ #bbp-your-profile fieldset select {
+ margin-bottom: 0;
+ }
+ #bbp-your-profile fieldset input,
+ #bbp-your-profile fieldset textarea {
+ margin-bottom: 0;
+ width: 400px;
+ background: #f9f9f9;
+ border: 1px solid #ccc;
+ box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
+ -moz-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
+ -webkit-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
+ padding: 2px;
+ }
+ #bbp-your-profile fieldset legend {
+ display: none;
+ }
+ #content #bbp-your-profile fieldset label,
+ #container #bbp-your-profile fieldset label {
+ float: left;
+ width: 150px;
+ padding-right: 20px;
+ text-align: right;
+ }
+ #bbp-your-profile fieldset span.description {
+ margin: 5px 0 0 170px;
+ font-size: 12px;
+ font-style: italic;
+ float: left;
+ clear: left;
+ width: 383px;
+ padding: 5px 10px;
+ border: #cee1ef 1px solid;
+ background-color: #f0f8ff;
+ }
+
+ #content #bbp-your-profile fieldset fieldset,
+ #container #bbp-your-profile fieldset fieldset {
+ margin: 0;
+ width: 260px;
+ border: none;
+ padding: 0;
+ clear: none;
+ float: none;
+ }
+ #bbp-your-profile fieldset fieldset span.description {
+ margin-left: 0;
+ margin-bottom: 20px;
+ }
+
+ #bbp-your-profile fieldset.submit button {
+ float: right;
+ }
+
+/* =Notices
+-------------------------------------------------------------- */
+
+div.bbp-template-notice {
+ border-width: 1px;
+ border-style: solid;
+ padding: 10px;
+ margin: 5px 0 15px;
+ border-radius: 3px;
+ background-color: #ffffe0;
+ border-color: #e6db55;
+ color: #000;
+ clear: both;
+}
+
+div.bbp-template-notice a {
+ color: #555;
+ text-decoration: none;
+}
+ div.bbp-template-notice a:hover {
+ color: #000;
+ }
+ div.bbp-template-notice.info {
+ border: #cee1ef 1px solid;
+ background-color: #f0f8ff;
+ }
+ div.bbp-template-notice.important {
+ border: #e6db55 1px solid;
+ background-color: #fffbcc;
+ }
+ div.bbp-template-notice.error,
+ div.bbp-template-notice.warning {
+ background-color: #ffebe8;
+ border-color: #c00;
+ }
+ div.bbp-template-notice.error a,
+ div.bbp-template-notice.warning a {
+ color: #c00;
+ }
+ div.bbp-template-notice p {
+ margin: 0.5em 0 6px 0 !important;
+ padding: 2px;
+ font-size: 12px;
+ line-height: 140%;
+ }
+
+/* =Stickies
+-------------------------------------------------------------- */
+
+.bbp-topics-front tr.super-sticky td,
+.bbp-topics tr.super-sticky td,
+.bbp-topics tr.sticky td,
+.bbp-forum-info tr.sticky td {
+ background-color: #ffffe0 !important;
+ font-size: 1.1em;
+}
+
+/* =Revisions
+-------------------------------------------------------------- */
+#content .bbp-topic-revision-log,
+#content .bbp-reply-revision-log,
+
+#main .bbp-topic-revision-log,
+#main .bbp-reply-revision-log,
+
+#container .bbp-topic-revision-log,
+#container .bbp-reply-revision-log {
+ border-top: 1px dotted #ddd;
+ list-style: none;
+ width: 100%;
+ margin: 0;
+ padding: 8px 0 0 0;
+ font-size: 11px;
+ color: #aaa;
+}
+
+/* =Widgets
+-------------------------------------------------------------- */
+
+.widget-area .bbp-login-form fieldset legend {
+ display: none;
+}
+
+.widget-area .bbp-login-form .bbp-username label,
+.widget-area .bbp-login-form .bbp-password label {
+ width: 70px;
+ display: inline-block;
+}
+.widget-area .bbp-login-form .bbp-username,
+.widget-area .bbp-login-form .bbp-password,
+.widget-area .bbp-login-form .bbp-remember-me,
+.widget-area .bbp-login-form .bbp-submit-wrapper {
+ margin-top: 10px;
+}
+
+.widget-area .bbp-login-form .bbp-remember-me {
+ float: left;
+}
+
+.widget-area .bbp-login-form .bbp-submit-wrapper {
+ float: right;
+}
+
+.widget-area .bbp-logged-in img.avatar {
+ float: left;
+ margin-right: 15px;
+}
+
+.widget-area .bbp-logged-in h4 {
+ font-weight: bold;
+ font-size: 1.3em;
+ display: inline;
+ clear: none;
+}
+
+.widget-area .bbp-logged-in a.logout-link {
+ display: block;
+}
+
+/* =Avatars
+-------------------------------------------------------------- */
+
+#content p.bbp-topic-meta img.avatar,
+#content ul.bbp-reply-revision-log img.avatar,
+#content ul.bbp-topic-revision-log img.avatar,
+#content div.bbp-template-notice img.avatar,
+#content .widget_display_topics img.avatar,
+#content .widget_display_replies img.avatar,
+#content p.bbp-topic-meta img.avatar,
+
+#main ul.bbp-reply-revision-log img.avatar,
+#main ul.bbp-topic-revision-log img.avatar,
+#main div.bbp-template-notice img.avatar,
+#main .widget_display_topics img.avatar,
+#main .widget_display_replies img.avatar,
+#main p.bbp-topic-meta img.avatar,
+
+#container ul.bbp-reply-revision-log img.avatar,
+#container ul.bbp-topic-revision-log img.avatar,
+#container div.bbp-template-notice img.avatar,
+#container .widget_display_topics img.avatar,
+#container .widget_display_replies img.avatar {
+ float: none;
+ margin: 0 5px -7px 0;
+}
+
+fieldset div.avatar {
+ float: right;
+ padding: 0;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
View
21 functions.php
@@ -154,6 +154,9 @@ function cakifo_theme_setup() {
/* Get the Image arguments */
add_filter( 'get_the_image_args', 'cakifo_get_the_image_arguments' );
+
+ /* wp_list_comments() arguments */
+ add_filter( "{$prefix}_list_comments_args" , 'cakifo_change_list_comments_args' );
/* Theme update check */
add_action( 'admin_notices', 'cakifo_update_notice' );
@@ -240,6 +243,12 @@ function cakifo_enqueue_script() {
*/
function cakifo_enqueue_style() {
wp_enqueue_style( 'PT-Serif', 'http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' );
+
+ // Add a new bbPress stylesheet, if the plugin is active
+ if ( class_exists( 'bbPress' ) ) :
+ wp_dequeue_style( 'bbpress-style' );
+ wp_enqueue_style( 'bbp-cakifo-bbpress', THEME_URI . '/css/bbpress.css', array(), '1.3', 'screen' );
+ endif;
}
/**
@@ -354,6 +363,18 @@ function cakifo_get_the_image_arguments( $args ) {
}
/**
+ * Change the arguments of wp_list_comments()
+ * Change avatar size to 48
+ *
+ * @since 1.3
+ */
+function cakifo_change_list_comments_args( $args ) {
+ $args['avatar_size'] = 48;
+
+ return $args;
+}
+
+/**
* New excerpt function with the length as a parameter
* The ideal solution would be to change the excerpt_length filter but we need different excerpt lengths
* Props: http://wordpress.stackexchange.com/questions/6310/howto-control-manual-excerpt-length#answer-6316
View
2  loop-meta.php
@@ -131,7 +131,7 @@
</div> <!-- .loop-meta -->
-<?php elseif ( is_post_type_archive() ) : ?>
+<?php elseif ( is_post_type_archive() && ! is_post_type_archive( 'forum' ) ) : ?>
<?php $post_type = get_post_type_object( get_query_var( 'post_type' ) ); ?>
View
6 loop.php
@@ -41,7 +41,8 @@
if ( false === $format )
$format = 'standard';
- echo apply_atomic_shortcode( "byline_{$format}", '<div class="byline">' . __( 'By [entry-author] on [entry-published] [entry-edit-link before=" | "]', hybrid_get_textdomain() ) . '</div>' );
+ if ( 'post' == get_post_type() )
+ echo apply_atomic_shortcode( "byline_{$format}", '<div class="byline">' . __( 'By [entry-author] on [entry-published] [entry-edit-link before=" | "]', hybrid_get_textdomain() ) . '</div>' );
?>
</header> <!-- .entry-header -->
@@ -89,7 +90,8 @@
<?php
/* Entry meta */
- echo apply_atomic_shortcode( "entry_meta_{$format}", '<footer class="entry-meta">' . __( '[entry-terms taxonomy="category" before="Posted in "] [entry-terms before="| Tagged "] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', hybrid_get_textdomain() ) . '</footer>' );
+ if ( 'post' == get_post_type() )
+ echo apply_atomic_shortcode( "entry_meta_{$format}", '<footer class="entry-meta">' . __( '[entry-terms taxonomy="category" before="Posted in "] [entry-terms before="| Tagged "] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', hybrid_get_textdomain() ) . '</footer>' );
?>
<div class="clear"></div>
View
2  search.php
@@ -21,7 +21,7 @@
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
- <?php get_template_part( 'loop', 'search' ); ?>
+ <?php get_template_part( 'loop', get_post_format() ); ?>
<?php endwhile; ?>
View
8 style.dev.css
@@ -925,7 +925,7 @@ img.alignright {
.avatar {
background: #fff;
float: left;
- width: 48px; height: 48px;
+ /*width: 48px; height: 48px;*/
margin: 0 15px 15px 0;
padding: 3px;
border-radius: 5px;
@@ -1604,7 +1604,8 @@ input[type="search"]::-webkit-search-decoration {
/* Submit button */
input[type="submit"],
-input[type="button"] {
+input[type="button"],
+button {
background: #464646;
border: none;
color: #fff;
@@ -1615,7 +1616,8 @@ input[type="button"] {
}
input[type="submit"]:hover,
-input[type="button"]:hover {
+input[type="button"]:hover,
+button:hover {
background: #d54e21;
cursor: pointer;
text-shadow: 1px 1px 0 #b92b00;
Please sign in to comment.
Something went wrong with that request. Please try again.