diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2e28fb1..570ce5c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,10 @@ ****************************** DRUPAL 6 - 2.x BRANCH ******************************** +March 2, 2011 +------------- +#720118 by Michelle: Redid forum listing page to handle subcontainers and forums better. This required CSS changes that led to more changes and so there's more here than is strictly related to the issue including re-parenting Blue Lagoon to Naked. + February 18, 2011 ----------------- #291084 by WorldFallz: Made collapsible containers work with core jquery version. diff --git a/advanced_forum.module b/advanced_forum.module index 8f02af4..9a4deb4 100644 --- a/advanced_forum.module +++ b/advanced_forum.module @@ -136,6 +136,12 @@ function advanced_forum_theme() { 'subforum_list' => NULL, ) ); + + $items['advanced_forum_subcontainer_list'] = array( + 'arguments' => array( + 'subcontainer_list' => NULL, + ) + ); $items['advanced_forum_simple_author_pane'] = array( 'arguments' => array( @@ -938,8 +944,7 @@ function advanced_forum_reply_num_new($nid, $timestamp = 0) { */ function advanced_forum_last_post_in_topic($nid) { $node = node_load($nid); - $comment_type = module_invoke('nodecomment', 'get_comment_type', $node->type); - if (isset($comment_type)) { + if (module_exists('nodecomment') && nodecomment_get_comment_type($node->type)) { // Nodecomment module version $query = 'SELECT nc.cid FROM {node_comments} nc diff --git a/includes/advanced_forum_preprocess_forum_list.inc b/includes/advanced_forum_preprocess_forum_list.inc index cbecf28..1ba87dd 100644 --- a/includes/advanced_forum_preprocess_forum_list.inc +++ b/includes/advanced_forum_preprocess_forum_list.inc @@ -7,181 +7,323 @@ */ function _advanced_forum_preprocess_forum_list(&$variables) { +//dsm($variables); + // Tell Drupal to use our forum list template file. + advanced_forum_add_template_suggestions("forum-list", $variables['template_files']); + + // Add needed items for the collapsible containers. $variables['collapsible'] = variable_get('advanced_forum_collapsible_containers', 'toggle'); if ($variables['collapsible'] != 'none') { drupal_add_js(drupal_get_path('module', 'advanced_forum') . '/js/advanced_forum.js','module'); drupal_add_js(array('advanced_forum' => array('effect' => $variables['collapsible'])), 'setting'); } - advanced_forum_add_template_suggestions("forum-list", $variables['template_files']); - // Determine if we want to use taxonomy image here so we don't need to keep - // checking while in the main loop. - $variables['use_taxonomy_image'] = (function_exists('taxonomy_image_display') && variable_get('advanced_forum_use_taxonomy_image', TRUE)); - // The tid is the ID of the container or forum we are in. Assign it to // $parent_id for easy reference, assign it to the forum_id template variable // to give it a nice name for themers, then get rid of the original variable. $parent_id = isset($variables['tid']) ? $variables['tid'] : 0; $variables['forum_id'] = $parent_id; - unset($variables['tid']); + unset($variables['tid']); - /* Deal with creating fake containers as necessary. */ - - if (empty($parent_id)) { - // At the root /forum listing. Make sure all forums are in containers, - // creating fake ones if needed, so the table structure works properly. - $main_forum_page = TRUE; - $root_forums = FALSE; - $fake_container = FALSE; - $containers = FALSE; - $tids = array(); - foreach ($variables['forums'] as $id => $forum) { - // If uncontained forums come after an existing container, they'll - // be put into that container due to the ordering in the template. - // So don't bother with a fake container if there won't be anything - // in it. - if (!empty($forum->container) && !$fake_container) { - $containers = TRUE; - } + // Add a variable showning if we are using taxonomy image for easier theming. + $variables['use_taxonomy_image'] = (function_exists('taxonomy_image_display') && variable_get('advanced_forum_use_taxonomy_image', TRUE)); - if (empty($forum->container) && $forum->parents == array(0 => 0)) { - // This is a forum, not a container, and it has no parents. ie: forum - // at the root outside of any containers. - $root_forums = TRUE; - if (!$containers) { - // No containers come before this forum, even at the same level, - // so we need to make a fake container to hold it. - $fake_container = TRUE; - } - $variables['forums'][$id]->depth++; - $tids[$forum->tid] = $forum->tid; - } - - // @TODO: Figure out what this does. - if ($root_forums && !empty($tids[$forum->parents[0]])) { - $variables['forums'][$id]->depth++; - $tids[$forum->tid] = $forum->tid; - } + // Process the containers and forums and move them to a new variable. + $items = array(); + $lowest_depth = 0; + foreach ($variables['forums'] as $id => $forum) { + if (empty($forum->container)) { + $items[$id] = advanced_forum_process_forum($forum); + } + else { + $items[$id] = advanced_forum_process_container($forum); } - if ($fake_container) { - // Create the fake container and stick it at the top. - $container = taxonomy_vocabulary_load(variable_get('forum_nav_vocabulary', '')); - $container->tid = 0; - $container->container = TRUE; - $container->num_topics = 0; - $variables['forums'] = array(0 => $container) + $variables['forums']; + // Figure out how deep the hierarchy goes for the next step. + if ($forum->depth > $lowest_depth) { + $lowest_depth = $forum->depth; } } - else { - // On a container or forum page. - - $main_forum_page = FALSE; - // We want to add in the container or use the parent forum as a container. - $container = taxonomy_get_term($parent_id); - $container->container = TRUE; - $container->num_topics = 0; - - // Add in the "container" at the top and bump up the depth of everything - // underneath. Note that we can't use array_unshift to add the container - // to the top as that changes all the keys. - $orginal_forums = $variables['forums']; - $variables['forums'] = array(); - $variables['forums'][$parent_id] = $container; - $variables['forums'][$parent_id]->depth = 0; - foreach ($orginal_forums as $id => $forum) { - $variables['forums'][$id] = $forum; - $variables['forums'][$id]->depth++; + + for ($depth = $lowest_depth; $depth > 0; $depth--) + foreach ($items as $id => $item) { + if ($item->depth == $depth) { + $items[$item->parents['0']]->child_total_topics += $item->total_topics + $item->child_total_topics; + $items[$item->parents['0']]->child_new_topics += $item->new_topics + $item->child_new_topics; + $items[$item->parents['0']]->child_total_posts += $item->total_posts + $item->child_total_posts; + $items[$item->parents['0']]->child_new_posts += $item->new_posts + $item->child_new_posts; } } - - /* Organize all the forum data into the template variables */ - - global $user; - $row = 0; - // Sanitize each forum so that the template can safely print the data but skip the name of subforums. - foreach ($variables['forums'] as $id => $forum) { - $variables['forums'][$id]->description = !empty($forum->description) ? filter_xss_admin($forum->description) : ''; - $variables['forums'][$id]->link = url("forum/$forum->tid"); - $variables['forums'][$id]->name = empty($forum->parents[0]) ? check_plain($forum->name) : $forum->name; - $variables['forums'][$id]->is_container = !empty($forum->container); - $variables['forums'][$id]->zebra = $row % 2 == 0 ? 'odd' : 'even'; - $row++; - - $variables['forums'][$id]->new_text = ''; - $variables['forums'][$id]->new_url = ''; - $variables['forums'][$id]->new_topics = 0; - $variables['forums'][$id]->old_topics = $forum->num_topics; - if ($user->uid) { - $variables['forums'][$id]->new_topics = _forum_topics_unread($forum->tid, $user->uid); - if ($variables['forums'][$id]->new_topics) { - $variables['forums'][$id]->new_text = format_plural($variables['forums'][$id]->new_topics, '1 new', '@count new'); - $variables['forums'][$id]->new_url = url("forum/$forum->tid", array('fragment' => 'new')); - } - $variables['forums'][$id]->old_topics = $forum->num_topics - $variables['forums'][$id]->new_topics; + + // Loop through all the items and fill the $tables variable that will + // hold all the tables with the containers and forums organized, processed, + // and ready for the template. + + if ($parent_id) { + // On a container page. Fake the main table. + $table_counter = 1; + $tables[$table_counter]['table_info'] = advanced_forum_process_container($variables['parents'][0]); + } + else { + $table_counter = 0; + } + + foreach ($items as $id => $item) { + // Get a handle on the parent of this item. + if ($parent_id && $item->depth == 0) { + // If we are on a container page, the parent of root items is the main + // container that is being used for the table info. + $parent = $tables[$table_counter]['table_info']; } + elseif (!empty($variables['forums'][$item->parents[0]])) { + // For simplicity, we assume forums/containers have only one parent. + $parent = $variables['forums'][$item->parents[0]]; + } + // Intentional no "else" because only root items on the main page have + // no parent and we don't use the variable there. - // Avoid notices if there is no last post. - $forum->last_post = (empty($forum->last_post)) ? '' : $forum->last_post; - $variables['forums'][$id]->last_reply = theme('forum_submitted', $forum->last_post); + // If we aren't on the main forum page, we need to bump up the depth. + $item_depth = ($parent_id) ? $item->depth + 1 : $item->depth; - $variables['forums'][$id]->new_posts = 0; - $variables['forums'][$id]->new_text_posts = ''; - $variables['forums'][$id]->new_url_posts = ''; - $variables['forums'][$id]->old_posts = (empty($forum->num_posts)) ? '' : $forum->num_posts; + if (!empty($item->container)) { + // CONTAINERS. - if ($user->uid) { - // Show number of new posts as well as topics - if (variable_get('advanced_forum_get_new_comments', 0)) { - // This can cause performance issues, so allow it to be turned off - $variables['forums'][$id]->new_posts = advanced_forum_unread_replies_in_forum($forum->tid, $user->uid) + $variables['forums'][$id]->new_topics; + if ($item_depth == 0) { + // Top level container always starts a new table. + $table_counter++; + $tables[$table_counter]['table_info'] = $item; - if ($variables['forums'][$id]->new_posts) { - $variables['forums'][$id]->new_text_posts = format_plural($variables['forums'][$id]->new_posts, '1 new', '@count new'); - $variables['forums'][$id]->new_url_posts = url("forum/$forum->tid", array('fragment' => 'new')); - } + // Reset the striping. + advanced_forum_stripe(TRUE); + } + elseif ($item_depth == 1) { + // Subcontainer at top level is treated like a forum. - if (isset($forum->num_posts)) { - $variables['forums'][$id]->old_posts = $forum->num_posts - $variables['forums'][$id]->new_posts; + // We set the forum icon here, rather than in the process_forum + // function because we need to take into account new content + // in children. + if ($item->new_topics || $item->new_posts || $item->child_new_topics || $item->child_new_posts) { + $item->icon_classes = "forum-list-icon forum-list-icon-new-posts"; + $item->icon_text = t("New posts"); + } + else { + $item->icon_classes = "forum-list-icon forum-list-icon-default"; + $item->icon_text = t("No new"); } - } - } - // If there are new topics/posts, change the icon - if ($forum->new_topics || $forum->new_posts) { - $variables['forums'][$id]->icon_classes = "forum-list-icon forum-list-icon-new-posts"; - $variables['forums'][$id]->icon_text = t("New posts"); + // Set the variable to control the row striping. + $item->zebra = advanced_forum_stripe(); + + // Add the container info to the table's item list. + $tables[$table_counter]['items'][$id] = $item; + } + elseif ($item_depth == 2) { + // A container elsewhere gets added to the parent's subcontainer list. + $tables[$table_counter]['items'][$parent->tid]->subcontainer_list[$id] = $item; + } } else { - $variables['forums'][$id]->icon_classes = "forum-list-icon forum-list-icon-default"; - $variables['forums'][$id]->icon_text = t("No new"); - } + // FORUMS. - // Add in the taxonomy image, if any - if ($variables['use_taxonomy_image']) { - $variables['forums'][$id]->forum_image = taxonomy_image_display($forum->tid); + // We set the forum icon here, rather than in the process_forum + // function because we need to take into account new content + // in children. + if ($item->new_topics || $item->new_posts || $item->child_new_topics || $item->child_new_posts) { + $item->icon_classes = "forum-list-icon forum-list-icon-new-posts"; + $item->icon_text = t("New posts"); + } + else { + $item->icon_classes = "forum-list-icon forum-list-icon-default"; + $item->icon_text = t("No new"); + } + + if ($item_depth == 0) { + // This is a forum at the root. If it is the first or the first + // since the last container, make a new table. Otherwise, put it in + // the previous table. + if (empty($table_counter) || !empty($tables[$table_counter]['table_info']->container)) { + // This is the first root item or the current table belongs to a + // container. Start a new generic one. We need a tid so just grab + // the tid of the current forum for it. + $table_counter++; + $tables[$table_counter]['table_info']->name = t('Forums'); + $tables[$table_counter]['table_info']->description = ''; + $tables[$table_counter]['table_info']->tid = $item->tid; + + // Reset the striping. + advanced_forum_stripe(TRUE); + } + + // Set the variable to control the row striping. + $item->zebra = advanced_forum_stripe(); + + // Add the forum info to the table's item list. + $tables[$table_counter]['items'][$id] = $item; + } + elseif ($item_depth == 1) { + // Main forum. Add it to the item list. + if (empty($item->container)) { + $item->zebra = advanced_forum_stripe(); + } + + $tables[$table_counter]['items'][$id] = $item; + } + elseif ($item_depth == 2) { + // Subforum. + $tables[$table_counter]['items'][$parent->tid]->subforum_list[$id] = $item; + } } + } + + // Theme subcontainers, subforums and add post counts to parents. + foreach ($tables as $table_id => $table) { + foreach ($table['items'] as $item_id => $item) { + if (!empty($item->subforum_list)) { + $tables[$table_id]['items'][$item_id]->subforums = theme('advanced_forum_subforum_list', $item->subforum_list); + } - if ($variables['forums'][$id]->depth > 1) { - // This is a subforum. Add it to the list for the compact listing. - $parent_id = $id; - for ($count = $variables['forums'][$id]->depth; $count > 1; $count--) { - $parent_id = $variables['forums'][$parent_id]->parents['0']; + if (!empty($item->subcontainer_list)) { + $tables[$table_id]['items'][$item_id]->subcontainers = theme('advanced_forum_subcontainer_list', $item->subcontainer_list); } - $variables['forums'][$parent_id]->subforum_list[$id] = $variables['forums'][$id]; } } + + $variables['tables'] = $tables; - foreach ($variables['forums'] as $id => $forum) { - if (!empty($forum->subforum_list)) { - $variables['forums'][$id]->subforums = theme('advanced_forum_subforum_list', $forum->subforum_list); - unset($variables['forums'][$id]->subforum_list); + // Remove unneeded variables. + unset($variables['zebra']); + unset($variables['forums']); + + // dsm($variables); +} + + +function advanced_forum_stripe($reset = FALSE) { + static $stripe = 'odd'; + + if ($reset) { + $stripe = 'odd'; + } + else { + $stripe = ($stripe == 'odd') ? 'even' : 'odd'; + } + + return $stripe; +} + +/** + * Prepare an individual container for display. + */ +function advanced_forum_process_container($container) { + // Create the link to the container. + $container->link = url("forum/$container->tid"); + + // Sanitise the name and description so they can be safely printed. + $container->name = check_plain($container->name); + $container->description = !empty($container->description) ? filter_xss_admin($container->description) : ''; + + // Create a variable to check if the item is a container in the template. + $container->is_container = TRUE; + + // @TODO: Make the icon change if subforums have posts. + $container->icon_classes = "forum-list-icon forum-list-icon-default"; + $container->icon_text = t("No new"); + + // Add in the taxonomy image, if any. + if (function_exists('taxonomy_image_display') && variable_get('advanced_forum_use_taxonomy_image', TRUE)) { + $container->forum_image = taxonomy_image_display($container->tid); + } + + // Initialize these variables to avoid notices later. + $container->total_topics = 0; + $container->new_topics = 0; + $container->total_posts = 0; + $container->new_posts = 0; + $container->child_total_topics = 0; + $container->child_new_topics = 0; + $container->child_total_posts = 0; + $container->child_new_posts = 0; + + return $container; +} + +/** + * Prepare an individual forum for display. + */ +function advanced_forum_process_forum($forum) { + // Create a variable to check if the item is a container in the template. + $forum->is_container = FALSE; + + // Create the link to the forum. + $forum->link = url("forum/$forum->tid"); + + // Sanitise the name and description so they can be safely printed. + // We don't do this for subforum names because that is sent through l() + // in the theme function which runs it through check_plain(). + $forum->name = empty($forum->parents[0]) ? check_plain($forum->name) : $forum->name; + $forum->description = !empty($forum->description) ? filter_xss_admin($forum->description) : ''; + + // Initialize these variables to avoid notices later since not all forums + // have new content or even any content at all. + $forum->total_topics = 0; + $forum->child_total_topics = 0; + + $forum->new_topics = 0; + $forum->new_topics_text = ''; + $forum->new_topics_link = ''; + $forum->child_new_topics = 0; + + $forum->total_posts = 0; + $forum->child_total_posts = 0; + + $forum->new_posts = 0; + $forum->new_posts_text = ''; + $forum->new_posts_link = ''; + $forum->child_new_posts = 0; + + // Rename these to make them more descriptive. + if (isset($forum->num_topics)) { + $forum->total_topics = $forum->num_topics; + unset ($forum->num_topics); + } + + if (isset($forum->num_posts)) { + $forum->total_posts = $forum->num_posts; + unset ($forum->num_posts); + } + + // If the viewer is authenticated, check for new topics and posts. + global $user; + if ($user->uid) { + // New topics. + $forum->new_topics = _forum_topics_unread($forum->tid, $user->uid); + if ($forum->new_topics) { + $forum->new_topics_text = format_plural($forum->new_topics, '1 new', '@count new'); + $forum->new_topics_link = url("forum/$forum->tid", array('fragment' => 'new')); } - if(!empty($forum->parents[0])){ - // Sanitize the subforums. - $variables['forums'][$id]->name = check_plain($forum->name); + // New posts are optional because the query is slow. + if (variable_get('advanced_forum_get_new_comments', 0)) { + $forum->new_posts = advanced_forum_unread_replies_in_forum($forum->tid, $user->uid) + $forum->new_topics; + + if ($forum->new_posts) { + $forum->new_posts_text = format_plural($forum->new_posts, '1 new', '@count new'); + $forum->new_posts_link = url("forum/$forum->tid", array('fragment' => 'new')); + } } } + // Process the "last post" object into a printable string. + // Trying to copy the string back into the variable directly caused odd bugs + // so we move it to a temp variable then unset the original. + $last_post = (empty($forum->last_post)) ? '' : $forum->last_post; + unset($forum->last_post); + $forum->last_post = theme('forum_submitted', $last_post); + + // Add in the taxonomy image, if any + if (function_exists('taxonomy_image_display') && variable_get('advanced_forum_use_taxonomy_image', TRUE)) { + $forum->forum_image = taxonomy_image_display($forum->tid); + } + + return $forum; } diff --git a/includes/theme.inc b/includes/theme.inc index 8145ee4..405d33a 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -17,7 +17,8 @@ function theme_advanced_forum_l($text, $path, $options = array(), $button_class $current_classes = (empty($options['attributes']['class'])) ? '' : $options['attributes']['class']; $options['attributes']['class'] = "$current_classes af-button-$button_class"; $options['html'] = TRUE; - return l('' . $text . '', $path, $options); + $l = l('' . $text . '', $path, $options); + return $l; } else { // Standard link: just send it through l(). @@ -163,12 +164,56 @@ function theme_advanced_forum_shadow_topic($title, $nid, $new_forum) { function theme_advanced_forum_subforum_list($subforum_list) { $subforums = array(); foreach($subforum_list AS $tid => $subforum) { - $subforums[] = l($subforum->name, "forum/$tid"); + // Note: $subforum->name has not been run through check_plain because + // it ends up going through there when l() is called without the HTML + // option. If you change this to set HTML to TRUE, you must sanitize it. + $text = l($subforum->name, "forum/$tid"); + $text .= ' (' . $subforum->total_posts; + + if (empty($subforum->new_posts)) { + $text .= ')'; + } + else { + $text .= ' - ' . l($subforum->new_posts_text, $subforum->new_posts_link) . ')'; + } + + $subforums[] = $text; } return implode(', ', $subforums); } +/** + * Theme function to a formatted list of subcontainers. + * + * @param $subcontainer_list + * Array of subcontainers. + * @return + * Formatted list of subcontainers. + */ +function theme_advanced_forum_subcontainer_list($subcontainer_list) { + $subcontainers = array(); + foreach($subcontainer_list AS $tid => $subcontainer) { + // Note: $subcontainer->name has not been run through check_plain because + // it ends up going through there when l() is called without the HTML + // option. If you change this to set HTML to TRUE, you must sanitize it. + $text = l($subcontainer->name, "container/$tid"); + $text .= ' (' . $subcontainer->total_posts; + + if (empty($subcontainer->new_posts)) { + $text .= ')'; + } + else { + $text .= ' - ' . l($subforum->new_posts_text, $subforum->new_posts_link) . ')'; + } + + $subcontainers[] = $text; + } + + return implode(', ', $subcontainers); +} + + // TEMPLATE PREPROCESS ******************************************************/ /*** FORUM OVERVIEW & TOPIC LIST PAGES **************************************/ diff --git a/plugins/arguments/forum_id.inc b/plugins/arguments/forum_id.inc index fc0bba5..02c14ff 100644 --- a/plugins/arguments/forum_id.inc +++ b/plugins/arguments/forum_id.inc @@ -84,7 +84,7 @@ function advanced_forum_forum_id_breadcrumb($conf, $context) { $breadcrumb[] = l($vocabulary->name, 'forum'); } - if ($context->parents) { + if (isset($context->parents)) { $parents = array_reverse($context->parents); foreach ($parents as $p) { if ($p->tid != $context->data->tid) { diff --git a/plugins/content_types/forum_list.inc b/plugins/content_types/forum_list.inc index 4e86e8c..c41cf6d 100644 --- a/plugins/content_types/forum_list.inc +++ b/plugins/content_types/forum_list.inc @@ -39,7 +39,10 @@ function advanced_forum_forum_list_content_type_render($subtype, $conf, $panel_a $forums = advanced_forum_get_forums($tid); if ($forums) { - $block->content = theme('forum_list', $forums, $context->parents, $tid); + // No parents on the main forum page. + $parents = isset($context->parents) ? $context->parents : array(); + + $block->content = theme('forum_list', $forums, $parents, $tid); if (user_access('administer forums')) { $block->admin_links['administer_forums'] = array( diff --git a/styles/blue_lagoon/advanced_forum.blue_lagoon.images.css b/styles/blue_lagoon/advanced_forum.blue_lagoon.images.css index c0454af..862274e 100644 --- a/styles/blue_lagoon/advanced_forum.blue_lagoon.images.css +++ b/styles/blue_lagoon/advanced_forum.blue_lagoon.images.css @@ -5,7 +5,21 @@ background: #2587C4; background: -webkit-gradient(linear, left top, left bottom, from(#2587C4), to(#58B3ED)); background: -moz-linear-gradient(top, #2587C4, #58B3ED); + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0; + -moz-box-shadow: rgba(0,0,0,1) 0 1px 0; + box-shadow: rgba(0,0,0,1) 0 1px 0; + text-shadow: rgba(0,0,0,.4) 0 1px 0; color: #FFFFFF; + font-family: Helvetica, Arial, Sans-Serif; + text-decoration: none; + vertical-align: middle; + margin: 10px; + width: 50px; + height: 50px; + display: block; } tr.even td.forum-list-icon-default .forum-list-icon-wrapper span, @@ -20,6 +34,80 @@ tr.odd td.forum-list-icon-new-posts .forum-list-icon-wrapper span, background: transparent url(images/forum_list_new_posts.png) no-repeat center center; } +/* TOPIC LIST ICONS *********************************************************/ +span.topic-icon { + width: 24px; + height: 24px; + text-indent: -9999px; +} + +.topic-icon-default { + background: transparent url(images/topic_list_default.png) no-repeat center center; +} + +.topic-icon-new { + background: transparent url(images/topic_list_new.png) no-repeat center center; +} + +.topic-icon-hot { + background: transparent url(images/topic_list_hot.png) no-repeat center center; +} + +.topic-icon-hot-new { + background: transparent url(images/topic_list_hot_new.png) no-repeat center center; +} + +.topic-icon-sticky { + background: transparent url(images/topic_list_sticky.png) no-repeat center center; +} + +.topic-icon-closed { + background: transparent url(images/topic_list_closed.png) no-repeat center center; +} + +/* TOPIC LIST ICON LEGEND ***************************************************/ +.topic-icon-default { + background: transparent url(images/topic_list_default.png) no-repeat top left; +} + +.topic-icon-new { + background: transparent url(images/topic_list_new.png) no-repeat top left; +} + +.topic-icon-hot { + background: transparent url(images/topic_list_hot.png) no-repeat top left; +} + +.topic-icon-hot-new { + background: transparent url(images/topic_list_hot_new.png) no-repeat top left; +} + +.topic-icon-sticky { + background: transparent url(images/topic_list_sticky.png) no-repeat top left; +} + +.topic-icon-closed { + background: transparent url(images/topic_list_closed.png) no-repeat top left; +} + +/* AUTHOR PANE **************************************************************/ + +.forum-post-panel-sub .author-online { + background: transparent url(images/ap_user_online.png) no-repeat; + padding-left: 20px; + height: 20px; + width: 125px; + display: block; +} + +.forum-post-panel-sub .author-offline { + background: transparent url(images/ap_user_offline.png) no-repeat; + padding-left: 20px; + height: 20px; + width: 125px; + display: block; +} + /* BUTTONIZED LINKS - GENERAL ***********************************************/ /* Based on http://css-tricks.com/examples/ButtonMaker */ @@ -33,30 +121,149 @@ a.author-pane-link, a.author-pane-link:link, a.author-pane-link:visited { color: #FFFFFF; + text-decoration: none; } .af-button-large, .af-button-small, .author-pane-link { + display: block; border-top: 1px solid #1659AC; background: #2587C4; background: -webkit-gradient(linear, left top, left bottom, from(#2587C4), to(#58B3ED)); background: -moz-linear-gradient(top, #2587C4, #58B3ED); - color: #FFFFFF; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0; + -moz-box-shadow: rgba(0,0,0,1) 0 1px 0; + box-shadow: rgba(0,0,0,1) 0 1px 0; + text-shadow: rgba(0,0,0,.4) 0 1px 0; + color: #333333; + font-family: Helvetica, Arial, Sans-Serif; + text-decoration: none; + vertical-align: middle; } a.af-button-large:hover, a.af-button-small:hover, a.author-pane-link:hover { - background: #2587C4; - color: #333333; - border-top-color: #EFEFEF; + background: #2587C4; + color: #333333; + border-top-color: #EFEFEF; } - + a.af-button-large:active, a.af-button-small:active, a.author-pane-link:active { - background: #2587C4; - color: #333333; - border-top-color: #EFEFEF; + background: #2587C4; + color: #333333; + border-top-color: #EFEFEF; } + +.af-button-large span { + font-size: 14px; + padding: 2px 2px 2px 25px; /* Last number controls width for image */ + line-height: 30px; /* Approximate height of button */ + margin: 0 7px 0 7px; /* Left and right space outside text & image */ +} + +.af-button-small span { + font-size: 12px; + padding: 2px 2px 2px 20px; /* Last number controls width for image */ + line-height: 25px; /* Approximate height of button */ + margin: 0 7px 0 7px; /* Left and right space outside text & image */ +} + +.author-pane-link span { + font-size: 12px; + padding: 0 0 0 22px; /* Last number controls width for image */ + line-height: 22px; /* Approximate height of button */ + margin: 0 7px 0 7px; /* Left and right space outside text & image */ +} + +/* BUTTONIZED LINKS - INDIVIDUAL BUTTONS ************************************/ + +.forum-add-forum .af-button-large span { + background: url(images/add_topic.png) no-repeat; +} + +.forum-add-poll .af-button-large span { + background: url(images/add_poll.png) no-repeat; +} + +/*** Reply/Locked at the top and bottom of individual topics. ***/ + +/* Reply link */ +.topic-reply-allowed .af-button-large span { + background: url(images/topic_reply.png) no-repeat; +} + +/* Locked topic (not a link so an extra span is used instead of the "a". */ +.topic-reply-locked .af-button-large span { + background: url(images/topic_locked.png) no-repeat; +} + +/* Last post */ +.last-post-link .af-button-large span { + background: url(images/topic_last_post.png) no-repeat; +} + +/* First unread */ +.topic-new-post-link .af-button-large span { + background: url(images/topic_first_unread_post.png) no-repeat; +} + + +/*** Links on the individual posts (nodes and comments). ***/ + +/* General */ +.forum-post-links .af-button-small span { +} + +/* Reply */ +.comment_add .af-button-small span, +.comment_reply .af-button-small span { + background: url(images/post_reply.png) no-repeat; +} + +/* Quote */ +.quote .af-button-small span { + background: url(images/post_quote.png) no-repeat; +} + +/* Edit */ +.comment_edit .af-button-small span, +.post_edit .af-button-small span { + background: url(images/post_edit.png) no-repeat; +} + +/* Delete */ +.comment_delete .af-button-small span, +.post_delete .af-button-small span { + background: url(images/post_delete.png) no-repeat; +} + +/* Jump to top */ +.forum-jump-links .af-button-small span { + background: url(images/topic_top.png) no-repeat; +} + +/*** AUTHOR PANE ***/ + +.forum-post-panel-sub .author-contact .author-pane-link span { + background: transparent url(images/ap_email.png) no-repeat; +} + +.forum-post-panel-sub .author-privatemsg .author-pane-link span { + background: transparent url(images/ap_private_message.png) no-repeat; +} + +.forum-post-panel-sub .author-relationship-add-icon.author-pane-link span { + background: transparent url(images/ap_contact_add.png) no-repeat; +} + +.forum-post-panel-sub .author-relationship-remove-icon.author-pane-link { + background: transparent url(images/ap_contact_remove.png) no-repeat; +} + diff --git a/styles/blue_lagoon/advanced_forum.blue_lagoon.style.css b/styles/blue_lagoon/advanced_forum.blue_lagoon.style.css index 9996719..9d8da72 100755 --- a/styles/blue_lagoon/advanced_forum.blue_lagoon.style.css +++ b/styles/blue_lagoon/advanced_forum.blue_lagoon.style.css @@ -2,19 +2,21 @@ /* This file contains colors, graphics, and text effects. For structural markup, see advanced_forum-structure.css. - -Colors used: (copied from silver bells... need to update) - #C1C1C1 Borders, post seperator, avatar frame, statistics subheader. - #333333 Table header font color. - #F5F5F5 to #DDDDDD Gradient on table headers, post info, stats header, top - post footer, topic navigation. - #F5F5F5 to #EFEFEF Gradient on topic list background. - #F5F5F5 Stats section background. - #FAFAFA Text area on posts. */ /*** PAGER *******************************************************************/ +/* This is the pager on the topics in the list */ +.topic-pager { + font-style: italic; +} + +/* Other pagers in the forum */ +.forum-pager .pager a, +#forum-comments .pager a { + font-weight: bold; +} + .forum-pager .pager a:link, .forum-pager .pager a:visited, #forum-comments .pager a:link, @@ -44,41 +46,74 @@ Colors used: (copied from silver bells... need to update) /*** FORUM & TOPIC LIST ******************************************************/ -/* General */ +/* Forum list and topic list tables */ .forum-table { - border: 3px solid #1659AC; + border: 1px solid #2587C4; } -/* Headers */ -.forum-table thead tr { - border-top: 1px solid #1659AC; +/* Table name and description on forum list and table header on topic list */ +.forum-table-wrap .forum-table-superheader, +.forum-table-topics thead tr { + border-top: 1px solid #2587C4; background: #2587C4; background: -webkit-gradient(linear, left top, left bottom, from(#2587C4), to(#58B3ED)); background: -moz-linear-gradient(top, #2587C4, #58B3ED); + color: #EDF5FA;; +} + +/* Table name on forum list */ +.forum-table-superheader .forum-table-name, +.forum-table-superheader .forum-table-name a { color: #ffffff; - border-bottom: 1px solid #1659AC; + font-weight: bold; +} + +/* Table header on forum list */ +.forum-table-wrap thead tr { + background-color: #F5F5F5; + border: 1px solid #2587C4; } +/* Table header on forum list and topic list */ .forum-table thead tr a, .forum-table thead tr a:visited, .forum-table thead tr a:link { color: #ffffff; + font-weight: bold; +} + +/* Reset to avoid bleed-thru from theme */ +.forum-table thead th { + border-bottom: none; } -/* Containers & Forums */ +/* Rows on both tables */ .forum-table tr.even, .forum-table tr.odd { + border: none; /* reset */ border-top: 1px solid #FFFFFF; background: #EDF5FA; background: -webkit-gradient(linear, left top, left bottom, from(#CBE2F1), to(#EDF5FA)); background: -moz-linear-gradient(top, #CBE2F1, #EDF5FA); } -/* Topic listings */ +/* Active column on both tables - reset to prevent bleed thru from theme */ +.forum-table tr.even td.active, +.forum-table tr.odd td.active{ + background-color: transparent; +} + +/* Individual cells on both tables */ +.forum-table td { + border: none; +} + +/* Placeholder when there are no topics in the list */ .view-advanced-forum-topic-list .view-empty { - border: border: 3px solid #1659AC; + border: border: 3px solid #2587C4; } +/*** Sticky topics ***/ .forum-table tr.sticky { background-color: #E6EDEC; } @@ -98,66 +133,93 @@ Colors used: (copied from silver bells... need to update) } #forum-statistics-header { - border-top: 1px solid #1659AC; + border-top: 1px solid #2587C4; background: #2587C4; background: -webkit-gradient(linear, left top, left bottom, from(#2587C4), to(#58B3ED)); background: -moz-linear-gradient(top, #2587C4, #58B3ED); color: #ffffff; - border-bottom: 1px solid #1659AC; + font-weight: bold; + border-bottom: 1px solid #2587C4; } .forum-statistics-sub-header { background-color: #CBE2F1; + font-weight: bold; +} + +.forum-statistics-sub-body { + background-color: #F5F5F5; } + /*** FORUM TOPICS **********************************************************/ .forum-post { - border: 2px solid #1659AC; + border: 2px solid #2587C4; } /* Header at the top of each post */ .forum-post-info { - border-top: 1px solid #1659AC; + border-top: 1px solid #2587C4; background: #2587C4; background: -webkit-gradient(linear, left top, left bottom, from(#2587C4), to(#58B3ED)); background: -moz-linear-gradient(top, #2587C4, #58B3ED); color: #ffffff; - border-bottom: 1px solid #1659AC; + font-weight: bold; + border-bottom: 1px solid #2587C4; } -.forum-forum-post .new { - color: #ffffff; +.forum-posted-on { + font-weight: bold; } -.forum-post-title { - border-bottom: 1px solid #1659AC; +.forum-forum-post .new { + color: #ffffff; } .forum-post-number a { color: #ffffff !important; } -/* Wrap around author pane and comment */ +/* Wrapper around author pane and content */ .forum-post-wrapper { background-color: #EDF5FA; } +/* Author information pane */ +.forum-post-panel-sub .author-pane .author-name { + font-weight: bold; +} + +.forum-post-panel-sub .author-pane .picture img { + border: 1px solid #2587C4; + background-color: #FFFFFF; +} + +.forum-post-panel-sub .author-pane .author-pane-label { + font-weight: bold; +} + /* Post text area */ .forum-post-panel-main { background-color: #FFFFFF; - border-left: 1px solid #1659AC; + border-left: 1px solid #2587C4; +} + +.forum-post-title { + font-weight: bold; + border-bottom: 1px solid #2587C4; } /* Post footer */ .forum-post-footer { background-color: #FFFFFF; - border-top: 1px solid #1659AC; + border-top: 1px solid #2587C4; } /* Box under top post before first reply */ .forum-top-post-footer { - border: 2px solid #1659AC; + border: 2px solid #2587C4; background: #EDF5FA; background: -webkit-gradient(linear, left top, left bottom, from(#CBE2F1), to(#EDF5FA)); background: -moz-linear-gradient(top, #CBE2F1, #EDF5FA); @@ -165,7 +227,7 @@ Colors used: (copied from silver bells... need to update) /* Topic navigation */ .forum-topic-navigation { - border: 2px solid #1659AC; + border: 2px solid #2587C4; background: #EDF5FA; background: -webkit-gradient(linear, left top, left bottom, from(#CBE2F1), to(#EDF5FA)); background: -moz-linear-gradient(top, #CBE2F1, #EDF5FA); diff --git a/styles/blue_lagoon/blue_lagoon.info b/styles/blue_lagoon/blue_lagoon.info index b69df54..fa239f7 100644 --- a/styles/blue_lagoon/blue_lagoon.info +++ b/styles/blue_lagoon/blue_lagoon.info @@ -1,5 +1,5 @@ name = Blue Lagoon -description = Based on the Blue Lagoon colors of Garland, this theme is meant to be easily recolorable. +description = Based on the Blue Lagoon colors of Garland. version = 2.x -base style = silver_bells +base style = naked diff --git a/styles/blue_lagoon/images/add_poll.png b/styles/blue_lagoon/images/add_poll.png new file mode 100644 index 0000000..d0f0bf4 Binary files /dev/null and b/styles/blue_lagoon/images/add_poll.png differ diff --git a/styles/blue_lagoon/images/add_topic.png b/styles/blue_lagoon/images/add_topic.png new file mode 100644 index 0000000..fbb4ce0 Binary files /dev/null and b/styles/blue_lagoon/images/add_topic.png differ diff --git a/styles/blue_lagoon/images/ap_contact_add.png b/styles/blue_lagoon/images/ap_contact_add.png new file mode 100644 index 0000000..0c9ca48 Binary files /dev/null and b/styles/blue_lagoon/images/ap_contact_add.png differ diff --git a/styles/blue_lagoon/images/ap_contact_remove.png b/styles/blue_lagoon/images/ap_contact_remove.png new file mode 100644 index 0000000..1304c03 Binary files /dev/null and b/styles/blue_lagoon/images/ap_contact_remove.png differ diff --git a/styles/blue_lagoon/images/ap_email.png b/styles/blue_lagoon/images/ap_email.png new file mode 100644 index 0000000..6ff58cb Binary files /dev/null and b/styles/blue_lagoon/images/ap_email.png differ diff --git a/styles/blue_lagoon/images/ap_private_message.png b/styles/blue_lagoon/images/ap_private_message.png new file mode 100644 index 0000000..5dfcf6a Binary files /dev/null and b/styles/blue_lagoon/images/ap_private_message.png differ diff --git a/styles/blue_lagoon/images/ap_user_offline.png b/styles/blue_lagoon/images/ap_user_offline.png new file mode 100644 index 0000000..bdb53d4 Binary files /dev/null and b/styles/blue_lagoon/images/ap_user_offline.png differ diff --git a/styles/blue_lagoon/images/ap_user_online.png b/styles/blue_lagoon/images/ap_user_online.png new file mode 100644 index 0000000..08b9c9d Binary files /dev/null and b/styles/blue_lagoon/images/ap_user_online.png differ diff --git a/styles/blue_lagoon/images/pager_bg.png b/styles/blue_lagoon/images/pager_bg.png new file mode 100644 index 0000000..7ca1413 Binary files /dev/null and b/styles/blue_lagoon/images/pager_bg.png differ diff --git a/styles/blue_lagoon/images/post_delete.png b/styles/blue_lagoon/images/post_delete.png new file mode 100644 index 0000000..3f9406e Binary files /dev/null and b/styles/blue_lagoon/images/post_delete.png differ diff --git a/styles/blue_lagoon/images/post_edit.png b/styles/blue_lagoon/images/post_edit.png new file mode 100644 index 0000000..bf35d79 Binary files /dev/null and b/styles/blue_lagoon/images/post_edit.png differ diff --git a/styles/blue_lagoon/images/post_quote.png b/styles/blue_lagoon/images/post_quote.png new file mode 100644 index 0000000..a3c39f8 Binary files /dev/null and b/styles/blue_lagoon/images/post_quote.png differ diff --git a/styles/blue_lagoon/images/post_reply.png b/styles/blue_lagoon/images/post_reply.png new file mode 100644 index 0000000..ba2c9a6 Binary files /dev/null and b/styles/blue_lagoon/images/post_reply.png differ diff --git a/styles/blue_lagoon/images/topic_first_unread_post.png b/styles/blue_lagoon/images/topic_first_unread_post.png new file mode 100644 index 0000000..aa7cbb9 Binary files /dev/null and b/styles/blue_lagoon/images/topic_first_unread_post.png differ diff --git a/styles/blue_lagoon/images/topic_last_post.png b/styles/blue_lagoon/images/topic_last_post.png new file mode 100644 index 0000000..aa7cbb9 Binary files /dev/null and b/styles/blue_lagoon/images/topic_last_post.png differ diff --git a/styles/blue_lagoon/images/topic_list_closed.png b/styles/blue_lagoon/images/topic_list_closed.png new file mode 100644 index 0000000..26c4c1b Binary files /dev/null and b/styles/blue_lagoon/images/topic_list_closed.png differ diff --git a/styles/blue_lagoon/images/topic_list_default.png b/styles/blue_lagoon/images/topic_list_default.png new file mode 100644 index 0000000..d7cf853 Binary files /dev/null and b/styles/blue_lagoon/images/topic_list_default.png differ diff --git a/styles/blue_lagoon/images/topic_list_hot.png b/styles/blue_lagoon/images/topic_list_hot.png new file mode 100644 index 0000000..6f61d0c Binary files /dev/null and b/styles/blue_lagoon/images/topic_list_hot.png differ diff --git a/styles/blue_lagoon/images/topic_list_hot_new.png b/styles/blue_lagoon/images/topic_list_hot_new.png new file mode 100644 index 0000000..e31deae Binary files /dev/null and b/styles/blue_lagoon/images/topic_list_hot_new.png differ diff --git a/styles/blue_lagoon/images/topic_list_new.png b/styles/blue_lagoon/images/topic_list_new.png new file mode 100644 index 0000000..e7f93ea Binary files /dev/null and b/styles/blue_lagoon/images/topic_list_new.png differ diff --git a/styles/blue_lagoon/images/topic_list_sticky.png b/styles/blue_lagoon/images/topic_list_sticky.png new file mode 100644 index 0000000..9f9f0e6 Binary files /dev/null and b/styles/blue_lagoon/images/topic_list_sticky.png differ diff --git a/styles/blue_lagoon/images/topic_locked.png b/styles/blue_lagoon/images/topic_locked.png new file mode 100644 index 0000000..1a74108 Binary files /dev/null and b/styles/blue_lagoon/images/topic_locked.png differ diff --git a/styles/blue_lagoon/images/topic_reply.png b/styles/blue_lagoon/images/topic_reply.png new file mode 100644 index 0000000..fbb4ce0 Binary files /dev/null and b/styles/blue_lagoon/images/topic_reply.png differ diff --git a/styles/blue_lagoon/images/topic_top.png b/styles/blue_lagoon/images/topic_top.png new file mode 100644 index 0000000..b3d9cef Binary files /dev/null and b/styles/blue_lagoon/images/topic_top.png differ diff --git a/styles/cloudless_day/advanced_forum.cloudless_day.style.css b/styles/cloudless_day/advanced_forum.cloudless_day.style.css index 29ef71a..6a5f6ed 100644 --- a/styles/cloudless_day/advanced_forum.cloudless_day.style.css +++ b/styles/cloudless_day/advanced_forum.cloudless_day.style.css @@ -49,12 +49,14 @@ Colors used: background-color: white; } -.view-advanced-forum-topic-list .view-empty { - border: border: 3px solid #C8DBEA; +/* Main header on forum list */ +.forum-table-wrap .forum-table-superheader { + /* Background instead of background-color to reset from Silver Bells */ + background: #C8DBEA; + border: 1px solid #C8DBEA; } - -/* Headers */ +/* Table header on forum list and topic list*/ .forum-table thead tr { border-top: 1px solid #FFFFFF; background: #EDF5FA; @@ -80,14 +82,32 @@ Colors used: background: #E7F2F9; } +/* Active column on both tables - reset to prevent bleed thru from theme */ +.forum-table tr.even td.active, +.forum-table tr.odd td.active{ + background-color: transparent; +} + +/* Individual cells on both tables */ .forum-table td { + /* Structure here because this is unique to this style */ line-height: 1.5em; padding: 4px; border: none; } -td.forum-details .forum-name a { - font-size: 1em; +/* Placeholder when there are no topics in the list */ +.view-advanced-forum-topic-list .view-empty { + border: border: 3px solid #C8DBEA; +} + +/*** Sticky topics ***/ +.forum-table tr.forum-last-sticky { + border-bottom: 10px solid #C8DBEA; +} + +.forum-table .sticky-label { + font-weight: bold; } /*** FORUM STATISTICS *********************************************************/ @@ -129,7 +149,6 @@ td.forum-details .forum-name a { background: #EDF5FA; background: -webkit-gradient(linear, left top, left bottom, from(#EDF5FA), to(#C8DBEA)); background: -moz-linear-gradient(top, #EDF5FA, #C8DBEA); - color: #3C78A7; } .forum-post-info { @@ -150,6 +169,10 @@ td.forum-details .forum-name a { } /* Author information pane */ +.forum-post-panel-sub { + color: #3C78A7; +} + .forum-post-panel-sub .author-pane .picture img { border: 1px solid #C8DBEA; padding: 5px; @@ -168,11 +191,13 @@ td.forum-details .forum-name a { background-color: #EDF5FA; line-height: 225%; padding-bottom: 2px; + color: #3C78A7; } /* Post footer */ .forum-post-footer { background-color: #EDF5FA; + color: #3C78A7; } .forum-jump-links { diff --git a/styles/naked/advanced_forum.naked.forum-list.tpl.php b/styles/naked/advanced_forum.naked.forum-list.tpl.php index 6267a40..389e441 100644 --- a/styles/naked/advanced_forum.naked.forum-list.tpl.php +++ b/styles/naked/advanced_forum.naked.forum-list.tpl.php @@ -22,7 +22,7 @@ * - $forum->new_url: A URL to the forum's unread posts. * - $forum->new_text: Text for the above URL which tells how many new posts. * - $forum->old_topics: A count of posts that have already been read. - * - $forum->num_posts: The total number of posts in the forum. + * - $forum->total_posts: The total number of posts in the forum. * - $forum->last_reply: Text representing the last time a forum was posted or * commented in. * @@ -31,102 +31,125 @@ */ ?> - + - $forum): ?> + $table): ?> + - is_container): ?> - +
+
+
+ link)): ?> + name; ?> + + name; ?> + +
+ + +   + + +
description; ?>
+
- 1): ?> - - - - +
- - + + - + - - description): ?> - - - - - - - depth == 1): ?> - - + + + $item): ?> - - - - -child"> + + -child"> + + + - - - - subforums)): ?> -
- : subforums; ?> + + is_container) ? 4 : 1 ?> + +
+ + description)): ?> +
+ description; ?> +
+ - + - + is_container): ?> + + + - - - - + + + + + + + +
- name; ?> - - - -   - -
- description; ?> -
- icon_text ?> - - forum_image; ?> + is_container): ?> +
+ icon_text ?> -
- name; ?> -
- - description)): ?> -
- description; ?> -
+ +
+ forum_image; ?> + + - - -
num_topics ?> - new_topics): ?> -
- new_text; ?> + subcontainers)): ?> +
+ : subcontainers; ?> +
+ + + subforums)): ?> +
+ : subforums; ?>
-
-
- num_posts ?> - - new_posts): ?> -
- new_text_posts; ?> - -
+
total_topics ?> + new_topics): ?> + + +
+
+ total_posts ?> + + new_posts): ?> +
+ new_posts_text; ?> + +
- last_reply ?> -
+ last_post ?> +
+
- - diff --git a/styles/naked/advanced_forum.naked.images.css b/styles/naked/advanced_forum.naked.images.css index 327ab6e..d8cecb8 100644 --- a/styles/naked/advanced_forum.naked.images.css +++ b/styles/naked/advanced_forum.naked.images.css @@ -94,6 +94,7 @@ span.advanced-forum-toggle { text-indent: -9999px; display: block; margin-left: 10px; + margin-right: 10px; float: right; cursor: pointer; background: transparent url(images/container_collapse.png) no-repeat center center; diff --git a/styles/naked/advanced_forum.naked.structure.css b/styles/naked/advanced_forum.naked.structure.css index cb10e65..71dfb25 100644 --- a/styles/naked/advanced_forum.naked.structure.css +++ b/styles/naked/advanced_forum.naked.structure.css @@ -6,6 +6,22 @@ floats. /*** PAGER ******************************************************************/ +/* This is the pager on the topics in the list */ +.topic-pager { + font-size: 90%; + font-style: italic; +} + +/* Other pagers in the forum */ +#forum-comments .pager { + text-align: right; +} + +#forum-comments .pager li { + padding: 3px; + margin: 0; +} + .forum-pager .pager, .forum-comment-wrapper .pager { text-align: right; @@ -68,8 +84,29 @@ ul.forum-links li { /*** FORUM & TOPIC LIST TABLES **********************************************/ .forum-table { + margin: 0px; +} + +.forum-table-wrap, +.forum-table-topics { + margin-bottom: 15px; clear: both; - width: 100%; +} + +.forum-table-superheader { + padding: 10px; +} + +.forum-table-superheader .forum-table-name { + margin: 5px 0 3px 5px; + width: 90%; + display: inline; + font-size: 1.2em; +} + +.forum-table-superheader .forum-table-description { + margin: 0 0 3px 5px; + width: 90%; } /* Header, both tables */ @@ -87,8 +124,8 @@ td.forum-details .forum-description { } td.forum-details .forum-subforums, -td.forum-details .forum-subforums a { - padding-left: 10px; +td.forum-details .forum-subcontainers { + margin-left: 10px; } td.forum-number-topics, @@ -96,6 +133,10 @@ td.forum-number-posts { text-align: center; } +th.forum-icon { + width: 5%; +} + th.forum-number-topics, th.forum-posts { width: 10%; @@ -254,6 +295,7 @@ th.forum-last-post { .forum-posted-on { padding: 0 5px; float: left; + font-size: .8em; } .forum-post .new { @@ -280,12 +322,20 @@ th.forum-last-post { margin: 10px; } +.forum-post-panel-sub .author-pane .author-name { + font-size: 120%; +} + .forum-post-panel-sub .author-pane .picture { float: none; padding-left: 0px; margin: 2px 0 10px 0; } +.forum-post-panel-sub .author-pane .picture img { + padding: 5px; +} + .forum-post-panel-sub .author-pane .author-pane-section { margin-bottom: 10px; } diff --git a/styles/silver_bells/advanced_forum.silver_bells.images.css b/styles/silver_bells/advanced_forum.silver_bells.images.css index b071d92..5f43367 100644 --- a/styles/silver_bells/advanced_forum.silver_bells.images.css +++ b/styles/silver_bells/advanced_forum.silver_bells.images.css @@ -127,38 +127,38 @@ a.author-pane-link:visited { .af-button-large, .af-button-small, .author-pane-link { - display: block; - border-top: 1px solid #EAF8E4; - background: #C1C1C1; - background: -webkit-gradient(linear, left top, left bottom, from(#DFDFDF), to(#C1C1C1)); - background: -moz-linear-gradient(top, #DFDFDF, #C1C1C1); - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0; - -moz-box-shadow: rgba(0,0,0,1) 0 1px 0; - box-shadow: rgba(0,0,0,1) 0 1px 0; - text-shadow: rgba(0,0,0,.4) 0 1px 0; - color: #333333; - font-family: Helvetica, Arial, Sans-Serif; - text-decoration: none; - vertical-align: middle; + display: block; + border-top: 1px solid #EAF8E4; + background: #C1C1C1; + background: -webkit-gradient(linear, left top, left bottom, from(#DFDFDF), to(#C1C1C1)); + background: -moz-linear-gradient(top, #DFDFDF, #C1C1C1); + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0; + -moz-box-shadow: rgba(0,0,0,1) 0 1px 0; + box-shadow: rgba(0,0,0,1) 0 1px 0; + text-shadow: rgba(0,0,0,.4) 0 1px 0; + color: #333333; + font-family: Helvetica, Arial, Sans-Serif; + text-decoration: none; + vertical-align: middle; } a.af-button-large:hover, a.af-button-small:hover, a.author-pane-link:hover { - background: #C1C1C1; - color: #333333; - border-top-color: #EFEFEF; + background: #C1C1C1; + color: #333333; + border-top-color: #EFEFEF; } - + a.af-button-large:active, a.af-button-small:active, a.author-pane-link:active { - background: #C1C1C1; - color: #333333; - border-top-color: #EFEFEF; + background: #C1C1C1; + color: #333333; + border-top-color: #EFEFEF; } .af-button-large span { diff --git a/styles/silver_bells/advanced_forum.silver_bells.style.css b/styles/silver_bells/advanced_forum.silver_bells.style.css index 0602850..84fcd79 100644 --- a/styles/silver_bells/advanced_forum.silver_bells.style.css +++ b/styles/silver_bells/advanced_forum.silver_bells.style.css @@ -16,23 +16,12 @@ Colors used: /* This is the pager on the topics in the list */ .topic-pager { - font-size: 90%; font-style: italic; } /* Other pagers in the forum */ -#forum-comments .pager { - text-align: right; -} - -#forum-comments .pager li { - padding: 3px; - margin: 0; -} - .forum-pager .pager a, #forum-comments .pager a { - padding: 3px; font-weight: bold; } @@ -60,24 +49,37 @@ Colors used: color: #333333; } -/*** FORUM & TOPIC LIST ******************************************************/ +/*** FORUM & TOPIC LISTS ******************************************************/ -/* General */ +/* Forum list and topic list tables */ .forum-table { border: 1px solid #C1C1C1; } -/* Headers */ -.forum-table thead tr { - border-top: 1px solid #C1C1C1; +/* Table name and description on forum list and table header on topic list */ +.forum-table-wrap .forum-table-superheader, +.forum-table-topics thead tr { + border: 1px solid #C1C1C1; background: #DDDDDD; background: -webkit-gradient(linear, left top, left bottom, from(#F5F5F5), to(#DDDDDD)); background: -moz-linear-gradient(top, #F5F5F5, #DDDDDD); color: #333333; +} + +/* Table name on forum list */ +.forum-table-superheader .forum-table-name, +.forum-table-superheader .forum-table-name a { + color: #333333; font-weight: bold; - border-bottom: none; } +/* Table header on forum list */ +.forum-table-wrap thead tr { + background-color: #F5F5F5; + border: 1px solid #C1C1C1; +} + +/* Table header on forum list and topic list */ .forum-table thead tr a, .forum-table thead tr a:visited, .forum-table thead tr a:link { @@ -85,28 +87,37 @@ Colors used: font-weight: bold; } +/* Reset to avoid bleed-thru from theme */ +.forum-table thead th { + border-bottom: none; +} + +/* Rows on both tables */ .forum-table tr.even, .forum-table tr.odd { border-top: 1px solid #C1C1C1; background: #EFEFEF; - background: -webkit-gradient(linear, left top, left bottom, from(#F5F5F5), to(#EFEFEF)); - background: -moz-linear-gradient(top, #F5F5F5, #EFEFEF); + background: -webkit-gradient(linear, left top, left bottom, from(#F5F5F5), to(#DDDDDD)); + background: -moz-linear-gradient(top, #F5F5F5, #DDDDDD); } +/* Active column on both tables - reset to prevent bleed thru from theme */ .forum-table tr.even td.active, .forum-table tr.odd td.active{ - background-color: #FFFFFF; + background-color: transparent; } +/* Individual cells on both tables */ .forum-table td { border: 1px solid #C1C1C1; } -/* Topic listings */ +/* Placeholder when there are no topics in the list */ .view-advanced-forum-topic-list .view-empty { border: 3px solid #C1C1C1; } +/*** Sticky topics ***/ .forum-table tr.forum-last-sticky { border-bottom: 10px solid #C1C1C1; } @@ -158,7 +169,6 @@ Colors used: } .forum-posted-on { - font-size: .8em; font-weight: bold; } @@ -166,20 +176,18 @@ Colors used: color: #333333 !important; } -/* Wrapper around AP and content */ +/* Wrapper around author pane and content */ .forum-post-wrapper { background-color: #F5F5F5; } /* Author information pane */ .forum-post-panel-sub .author-pane .author-name { - font-size: 120%; font-weight: bold; } .forum-post-panel-sub .author-pane .picture img { border: 1px solid #C1C1C1; - padding: 5px; background-color: #FFFFFF; } diff --git a/styles/silver_bells_stacked/advanced_forum.silver_bells_stacked.style.css b/styles/silver_bells_stacked/advanced_forum.silver_bells_stacked.style.css new file mode 100644 index 0000000..a9b8343 --- /dev/null +++ b/styles/silver_bells_stacked/advanced_forum.silver_bells_stacked.style.css @@ -0,0 +1,26 @@ + +/* Since this style inherits from Silver Bells, only a few adjustments are + needed to account for having the Author Pane on top. +*/ + +/* Reset styles not needed with AP on top */ +.forum-post-info { + margin-bottom: 0; +} + +.forum-post-wrapper { + background-color: transparent; +} + +.forum-post-panel-main, +.forum-post-links { + background-color: transparent; + border-left: none; +} + +/* Add in our AP styling */ +.forum-post-panel-sub { + background-color: #F5F5F5; + border-bottom: 1px solid #C1C1C1; +} +