Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change Places between Latest discussions and Forums

  • I have a theme and the latest topics appear on the front page before the forums list.

    I want the forums list to appear before

    This is the front page PHP – Any help is greatly appreciated – thanks

    <?php bb_get_header(); ?>

    <?php if ( $forums ) : ?>

    <div id=”hottags” role=”main”>

    <h2><?php _e(‘Hot Tags’); ?></h2>

    <p class=”frontpageheatmap”><?php bb_tag_heat_map(); ?></p>

    <h2><?php _e(‘Freebies Updates’); ?></h2>

    <script type=”text/javascript” src=”http://signup.ymlp.com/signup.js?id=geuswjjgmguw”></script>

    <br >

    <script type=”text/javascript”><!–

    google_ad_client = “pub-0827570622639205″;

    /* freebie forum side */

    google_ad_slot = “5398224595”;

    google_ad_width = 120;

    google_ad_height = 240;

    //–>

    </script>

    <script type=”text/javascript”

    src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>

    </script>

    </div>

    <div id=”discussions”>

    <?php if ( $topics || $super_stickies ) : ?>

    <h2><?php _e(‘Latest Discussions’); ?></h2>

    <table id=”latest”>

    <tr>

    <th><?php _e(‘Topic’); ?> — <?php bb_new_topic_link(); ?></th>

    <th><?php _e(‘Posts’); ?></th>

    <!– <th><?php _e(‘Voices’); ?></th> –>

    <th><?php _e(‘Last Poster’); ?></th>

    <th><?php _e(‘Freshness’); ?></th>

    </tr>

    <?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>

    <tr<?php topic_class(); ?>>

    <td><?php bb_topic_labels(); ?> <big>“><?php topic_title(); ?></big><?php topic_page_links(); ?></td>

    <td class=”num”><?php topic_posts(); ?></td>

    <!– <td class=”num”><?php bb_topic_voices(); ?></td> –>

    <td class=”num”><?php topic_last_poster(); ?></td>

    <td class=”num”>“><?php topic_time(); ?></td>

    </tr>

    <?php endforeach; endif; // $super_stickies ?>

    <?php if ( $topics ) : foreach ( $topics as $topic ) : ?>

    <tr<?php topic_class(); ?>>

    <td><?php bb_topic_labels(); ?> “><?php topic_title(); ?><?php topic_page_links(); ?></td>

    <td class=”num”><?php topic_posts(); ?></td>

    <!– <td class=”num”><?php bb_topic_voices(); ?></td> –>

    <td class=”num”><?php topic_last_poster(); ?></td>

    <td class=”num”>“><?php topic_time(); ?></td>

    </tr>

    <?php endforeach; endif; // $topics ?>

    </table>

    <?php bb_latest_topics_pages( array( ‘before’ => ‘<div class=”nav”>’, ‘after’ => ‘</div>’ ) ); ?>

    <?php endif; // $topics or $super_stickies ?>

    <?php if ( bb_forums() ) : ?>

    <h2><?php _e(‘Forums’); ?></h2>

    <table id=”forumlist”>

    <tr>

    <th><?php _e(‘Main Theme’); ?></th>

    <th><?php _e(‘Topics’); ?></th>

    <th><?php _e(‘Posts’); ?></th>

    </tr>

    <?php while ( bb_forum() ) : ?>

    <?php if (bb_get_forum_is_category()) : ?>

    <tr<?php bb_forum_class(‘bb-category’); ?>>

    <td colspan=”3″><?php bb_forum_pad( ‘<div class=”nest”>’ ); ?>“><?php forum_name(); ?><?php forum_description( array( ‘before’ => ‘<small> – ‘, ‘after’ => ‘</small>’ ) ); ?><?php bb_forum_pad( ‘</div>’ ); ?></td>

    </tr>

    <?php continue; endif; ?>

    <tr<?php bb_forum_class(); ?>>

    <td><?php bb_forum_pad( ‘<div class=”nest”>’ ); ?>“><?php forum_name(); ?><?php forum_description( array( ‘before’ => ‘<small> – ‘, ‘after’ => ‘</small>’ ) ); ?><?php bb_forum_pad( ‘</div>’ ); ?></td>

    <td class=”num”><?php forum_topics(); ?></td>

    <td class=”num”><?php forum_posts(); ?></td>

    </tr>

    <?php endwhile; ?>

    </table>

    <?php endif; // bb_forums() ?>

    <?php if ( bb_is_user_logged_in() ) : ?>

    <div id=”viewdiv”>

    <ul id=”views”>

    <?php foreach ( bb_get_views() as $the_view => $title ) : ?>

    <li class=”view”>“><?php view_name( $the_view ); ?>

    <?php endforeach; ?>

    </div>

    <?php endif; // bb_is_user_logged_in() ?>

    </div>

    <?php else : // $forums ?>

    <div class=”bbcrumb”>“><?php bb_option(‘name’); ?> » <?php _e(‘Add New Topic’); ?></div>

    <?php post_form(); endif; // $forums ?>

    <?php bb_get_footer(); ?>

Viewing 10 replies - 1 through 10 (of 10 total)

  • chrishajer
    Participant

    @chrishajer

    Thanks I tried but I am not sure exactly where to start the copy-paste before the relocation, the result was a mess


    chrishajer
    Participant

    @chrishajer

    Use an editor with syntax highlighting so you can see where to start and stop.

    Or, try this file and see if I swapped them correctly for you:

    http://pastie.org/978359

    Thank you but I tried yours and it didn’t work properly.

    The did change places but none of the posts and forums were clickable and signs like “> were added to each forum and post.


    chrishajer
    Participant

    @chrishajer

    Then it’s missing a closing character in one of the tags probably, or a quote mark somewhere.

    I see what I did now: the lines were not wrapped in my editor, and I am missing the end of some of the lines (they’re incomplete; see lines 40 and 44 for example.) If you repair those lines with the equivalent from your theme, it will be fine. Otherwise I’ll post a correction later today.


    chrishajer
    Participant

    @chrishajer

    Try this version. All the lines are complete here:

    http://pastie.org/979912


    chrishajer
    Participant

    @chrishajer

    Actually, it looks like they’re all complete in the original too. Maybe you didn’t copy all the way to the end of the lines. Notice the scrollbar in the code window – there’s more to the right.


    chrishajer
    Participant

    @chrishajer

    <?php bb_get_header(); ?>

    <?php if ( $forums ) : ?>

    <div id="hottags" role="main">
    <h2><?php _e('Hot Tags'); ?></h2>
    <p class="frontpageheatmap"><?php bb_tag_heat_map(); ?></p>
    </div>

    <div id="discussions">
    <?php if ( bb_forums() ) : ?>
    <h2><?php _e('Forums'); ?></h2>
    <table id="forumlist">

    <tr>
    <th><?php _e('Main Theme'); ?></th>
    <th><?php _e('Topics'); ?></th>
    <th><?php _e('Posts'); ?></th>
    </tr>
    <?php while ( bb_forum() ) : ?>
    <?php if (bb_get_forum_is_category()) : ?>
    <tr<?php bb_forum_class('bb-category'); ?>>
    <td colspan="3"><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>
    </tr>
    <?php continue; endif; ?>
    <tr<?php bb_forum_class(); ?>>
    <td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>
    <td class="num"><?php forum_topics(); ?></td>
    <td class="num"><?php forum_posts(); ?></td>
    </tr>
    <?php endwhile; ?>
    </table>
    <?php endif; // bb_forums() ?>
    <?php if ( $topics || $super_stickies ) : ?>

    <h2><?php _e('Latest Discussions'); ?></h2>

    <table id="latest">
    <tr>
    <th><?php _e('Topic'); ?> — <?php bb_new_topic_link(); ?></th>
    <th><?php _e('Posts'); ?></th>
    <!-- <th><?php _e('Voices'); ?></th> -->
    <th><?php _e('Last Poster'); ?></th>
    <th><?php _e('Freshness'); ?></th>
    </tr>

    <?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td><?php bb_topic_labels(); ?> <big><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></big><?php topic_page_links(); ?></td>
    <td class="num"><?php topic_posts(); ?></td>
    <!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
    <td class="num"><?php topic_last_poster(); ?></td>
    <td class="num"><a href="<?php topic_last_post_link(); ?>"><?php topic_time(); ?></a></td>
    </tr>
    <?php endforeach; endif; // $super_stickies ?>

    <?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td><?php bb_topic_labels(); ?> <a href="<?php topic_link(); ?>"><?php topic_title(); ?></a><?php topic_page_links(); ?></td>
    <td class="num"><?php topic_posts(); ?></td>
    <!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
    <td class="num"><?php topic_last_poster(); ?></td>
    <td class="num"><a href="<?php topic_last_post_link(); ?>"><?php topic_time(); ?></a></td>
    </tr>
    <?php endforeach; endif; // $topics ?>
    </table>
    <?php bb_latest_topics_pages( array( 'before' => '<div class="nav">', 'after' => '</div>' ) ); ?>
    <?php endif; // $topics or $super_stickies ?>

    <?php if ( bb_is_user_logged_in() ) : ?>
    <div id="viewdiv">
    <h2><?php _e('Views'); ?></h2>
    <ul id="views">
    <?php foreach ( bb_get_views() as $the_view => $title ) : ?>
    <li class="view"><a href="<?php view_link( $the_view ); ?>"><?php view_name( $the_view ); ?></a></li>
    <?php endforeach; ?>
    </ul>
    </div>
    <?php endif; // bb_is_user_logged_in() ?>

    </div>

    <?php else : // $forums ?>

    <div class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Add New Topic'); ?></div>

    <?php post_form(); endif; // $forums ?>

    <?php bb_get_footer(); ?>

    Same thing here

    Thanks!! that worked.

    However, I see little bullets with question marks on them next to each forum – http://forum.my-freebie.com/

    Why is that?

    look for this code. It’s there TWICE

    forum_description( array( 'before' => '<small> –

    replace

    with

    & # 8 2 1 1 ;

    take out the spaces

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.