Sidebar_Last Conflicts with Advanced Forum

Events happening in the community are now at Drupal community events on www.drupal.org.
tubby's picture

hi,

i'm using the marina theme. the main reason i chose it was because sidebar_last floated to the right while the main content text wrapped around it. what i've discovered is that it's very easy to "break" the site by adding other floats. in other words, the text will stop wrapping if you're not careful.

my first problem occurred when i wanted an additional column to float to the far right. i couldn't get it to work and the only way i could keep the sidebar_last styling was to use tables, the code is ugly but it works.

well now my problem is, i want to use the advanced forum module. it uses a lot of floats and clears lots of them as well. i've tried to edit the adv_forum css.

i've attached what i see now....first the forum itself and then a forum post.

has anyone successfully integrated advanced forum?

thank you

----- resolved

i struggled with this for HOURS last night and in moments after posting, i found the solution

in /public_html/drupal/sites/all/modules/advanced_forum/styles/naked/advf-forum-post.tpl.php, i removed....

<?php if ($top_post): ?>

  <?php print $topic_header ?>
 
  <?php $classes .= $node_classes; ?>
  <div id="node-<?php print $node->nid; ?>" class="top-post forum-post <?php print $classes; ?>">

<?php else: ?>
  <?php $classes .= $comment_classes; ?>
  <div id="comment-<?php print $comment->cid; ?>" class="forum-post <?php print $classes; ?>">
<?php endif; ?>

    <?php if (!$top_post): ?>
      <span class="post-num"><?php print $comment_link . ' ' . $page_link; ?></span>
    <?php endif; ?>
  </div>

so that i'm left with this...note that i made sure the div content class is first.

  <div class="content">

  <div class="forum-post-wrapper">

    <div class="forum-post-panel-sub">
      <?php print $author_pane; ?>
    </div>

    <div class="forum-post-panel-main">
      <?php if ($title && !$top_post): ?>
        <div class="post-title">
          <?php print $title ?>
        </div>
      <?php endif; ?>


        <?php print $content ?>

      <?php if ($signature): ?>
        <div class="author-signature">
          <?php print $signature ?>
        </div>
      <?php endif; ?>
    </div>
  </div>

</div>

that's is :) i will need to go through each tpl file and make the necessary adjustments but end result is, yes, i can use advanced forum with the marina theme.

AttachmentSize
advforum.jpg193.2 KB
advforum-resolved.jpg186.69 KB

Comments

Wow

michelle's picture

I've always told people the only way to use AM with AF is to not have a right sidebar on those pages. The inset sidebar, as you've found, clashes horribly when what you have on the page isn't a river of text and has structure of its own. I'll make a note of this post so I have a place to send folks who are trying to make them work together. Thanks.

Michelle

yeah, i was about to give up

tubby's picture

yeah, i was about to give up and got lucky. unfortunately, adding the original code back in took a while as i wasn't sure what was forcing the float problem to begin with.

here's the final code that i came up with for the posts page
/public_html/drupal/sites/all/modules/advanced_forum/styles/naked/advf-forum-post.tpl.php

keep in mind, i also edited the css to remove some of the offending "clear" declarations (can't remember which). the clears were causing the forum to shift underneath sidebar_last.

also, i am using the boxy theme.

      <div class="content">

    <div class="forum-post-panel-sub">
      <?php print $author_pane; ?>
    </div>

        <div class="post-title">
  <?php if ($title && !$top_post): ?>
          <?php print $title ?>
      <?php endif; ?>
        </div>

      <?php print $date ?>

      <?php if (!$top_post && !empty($comment->new)): ?>
        <a id="new"><span class="new">(<?php print $new ?>)</span></a>
      <?php endif; ?>

      <div class="content1">
        <?php print $content ?>
</div>

      <?php if ($signature): ?>
        <div class="author-signature">
          <?php print $signature ?>
        </div>
      <?php endif; ?>

    <?php if (!empty($links)): ?>
      <div class="forum-post-links">
        <?php print $links ?>
      </div>
    <?php endif; ?>

i also added the following to the adv-forum css

.content1 {
min-height: 265px;
}

this was necessary because without it, whenever there's a short post, the display is messed up. you should set the min-height to the max height of your author pane (with a lil extra). this will insure that all posts are at least the height of the author pane and prevent the wrapping that occurs without it.

the important thing to remember, at least for the marina theme is that the code needs to start with < div class="content" > where in the original files, it's buried in the code.

sorry i couldn't be more detailed but hopefully this serves a guideline on how to go about editing the other pages as well.

TNT Themes

Group organizers

Group categories

Type of post

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: