Skip to:
Content
Pages
Categories
Search
Top
Bottom

How Do I Do This?

  • Hi,

    I want to make a forum or forums like this:

    Chicago Forum

      General Discussion

      Jobs

      For Sale

      Housing

      Another Topic

      Another Topic

      Another Topic

      Another Topic

    New York Forum

      General Discussion

      Jobs

      For Sale

      Housing

      Another Topic

      Another Topic

      Another Topic

      Another Topic

    And do this for five or six cities.

    How would I do this? I fear the thing will be too big and complicated.

    If the answer has to do with multiple forum installations, what’s involved with that? And, I would like users to be able to post in any city without having to log in again and again.

    Oh, I should mention that I’m just now learning code ect. I’m at the point where I can tinker with a file if I’m told exactly how to do it.

    Any suggestions?

Viewing 14 replies - 51 through 64 (of 64 total)
  • So? I think I’m done for now, right?


    chrishajer
    Participant

    @chrishajer

    I hope so – now go get some members!

    Where you going to fix the ids to make them unique for each city table?

    Hey Guys,

    Chris, sorry I didn’t answer sooner, I had to work this weekend and I also had to deal with a WP issue.

    First, I’d again like to thank all of you who helped me. Especially Chris and livibetter.

    Second, to answer your question Chris, no I haven’t fixed the table ID issue yet. I see what you mean and when I try to validate at W3Schools it says exactly what you said. Problem is I’m still trying to find where in my files to change the ID’s. Basic question I know, but I’ve looked at everything I think might apply. Ideas?


    chrishajer
    Participant

    @chrishajer

    I’m not sure which version of front-page.php you’re using (couldn’t make my site look like yours using the last front-page.php code that was posted) but I THINK all you need to do is change the line that looks like this:

    <table id="forumlist">

    to this:

    <table id="forumlist-<?php forum_id(); ?>">

    That just adds a dash and the forum number to the table id. That should validate. But I think that will affect the CSS in a bad way. There will no longer be an id of “forumlist”, they’ll all be “forumlist-something” which the CSS will have trouble with.

    Maybe it would be better to do something like this:

    <table class="forumlist" id="forumlist-<?php forum_id(); ?>">

    Then you would need to change your style.css to make any references to #forumlist look like .forumlist (change from applying the forumlist styling to ids and make it apply to classes.)

    That’s a lot of work, but ids are supposed to be unique on a page, where classes are not. This is actually a better application of a class since all the tables should look the same and use the same styling. You’re not referencing them with javascript or something where the ids matter.

    I just tried this and it worked on mine and validated properly. There were 6 instances of #forumlist that needed to be changed to .forumlist in my style.css

    Hopefully that will work for you.

    Hey All,

    I’ve been away for a while…I got an assignment so I had to put my site on hold. But, I’m back.

    I’m only writing today because I really wanted to thank a few people for their help. I would never have gotten as far as I have with my forums if not for them.

    So…fel64, livibetter and, especially Chrishajer, thank you all for your help. Since starting this whole WP and bbPress venture, I’ve constantly been surprised and impressed with just how generous people in this community are with their time and their knowledge.

    Thanks again…I’m sure I’ll be hitting you up again soon.

    Hey Chris…still around?

    I’m continuing this thread because so much on the info is here.

    I’ve been trying to validate my html and css by trying the various methods listed above.

    This didn’t validate <table class=”forumlist” id=”forumlist-<?php forum_id(); ?>”>

    But, this did <table id=”forumlist-<?php forum_id(); ?>”>

    Both the html and the css are perfect with the last one, but I lost some of my styling, namely the colors. Any ideas?


    chrishajer
    Participant

    @chrishajer

    There is a difference between id and class. Maybe you’re using one or the other.

    This is a class:

    .forumlist {
    font: whatever;
    }

    This is an id:

    #forumlist {
    font: whatever;
    }

    You’re using <table id="forumlist-1"> but your css doesn’t contain markup for that (it has forumlist, not forumlist-anything. There is markup for #forumlist, but without numbers. Maybe you could do something like <table id="1" class="forumlist"> or something? That way, the forumlist class doesn’t need to be unique, since each city will sort of look the same, and the id is unique to each city. You still need to add the proper tags in your CSS, #1, #2, #3 for the ids and .forumlist (which is already there I believe.)

    Hope this advice is accurate. Let us know if it works.


    chrishajer
    Participant

    @chrishajer

    I’ m not sure, but I think the id needs to come before the class. Did you try your one example with the id first, then the class?

    I’ve always seen them in that order (id first) but I’m not sure if that’s required or not. What was the error exactly?

    Hey Chris,

    Thanks for answering. If you’re still up, well, I have to go to bed. But, I’ll try it again in the morning and let you know how it goes.

    Thanks again

    Hey Chris,

    I owe you a huge apology…I wasted your time.

    So, after trying all the various combinations you suggested, I remembered that when I first tried you original suggestion:

    <table class=”forumlist” id=”forumlist-<?php forum_id(); ?>”>

    that I had put it on two lines. So, the “id” line started with a black (rather than light green) “id.” I thought, “Oh, that needs to be green,” so I went ahead and added < to begin the line.

    Obviously I’m learning this stuff as I go. Anyway, I went back, used you original method all on one line without adding the extra < and, guess what? It all validated.

    I’m an idiot. Sorry for waisting your time and thanks for making it work.

    Oh, also, I didn’t want the “Hot Tags” so I justed cut that entire Div out. Everything still seems to work and still validates, but I worry that I shouldn’t have done that. What do you think?

    I signed up for adsense and I’m thinking of putting ad code where hot tags was


    chrishajer
    Participant

    @chrishajer

    You can remove a whole div, no problem. If it still validates, then it’s fine. If it looks good, then it’s fine. Sounds like it’s working fine…

    It’s working great. Thanks for everything Chris. I’d be using a plugin if it wasn’t for you.


    robbert12
    Member

    @robbert12

    Sorry to bump this topic, but I’m new to BBpress and after a long search on Google and in these forums, I arrived here.

    I want to do the same as on this picture: this picture.

    Unfortunately, I can’t get it to work on my forum. I posted the code of front-page.php below and emphasized the problem point (I think). I hope somebody can help me

    <?php bb_get_header(); ?>

    <div id="forums"><!-- Forums -->
    <?php if ( $forums ) : ?>
    <div id="sidebar"><!-- Sidebar -->

    <?php if ( bb_forums() ) : ?>
    <table id="forumlist">
    <thead>
    <tr>
    <th class="title"><?php _e('Forums'); ?></th>
    <!-- th><?php _e('Topics'); ?></th-->
    <th><?php _e('Posts'); ?></th>
    </tr>
    </thead>

    <tbody>
    <?php while ( bb_forum() ) : ?>
    <tr<?php bb_forum_class(); ?>>
    <td class="title"><?php bb_forum_pad( '<div class="nest">' ); ?><a>"><?php forum_name(); ?></a> <span><?php forum_description(); ?></span><?php bb_forum_pad( '</div>' ); ?></td>
    <!--td><?php forum_topics(); ?></td-->
    <td><?php forum_posts(); ?></td>
    </tr>
    <?php endwhile; ?>
    </tbody>
    </table>
    <?php endif; // bb_forums() ?>

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

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

    </div><!-- //sb -->

    <div id="content"><!-- Content -->
    <?php if ( $topics || $super_stickies ) : ?>
    <table id="sticky">

    <thead>
    <tr>
    <th class="title"><?php _e('Sticky'); ?></th>
    <th><?php _e('Posts'); ?></th>
    <th><?php _e('Freshness'); ?></th>
    </tr>
    </thead>

    <tbody>
    <?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td class="title"><?php bb_topic_labels(); ?> <big><a>"><?php topic_title(); ?></a></big></td>
    <td><?php topic_posts(); ?></td>

    <td><a>"><?php topic_time(); ?></a></td>
    </tr>
    <?php endforeach; ?>
    <?php else : ?>
    <tr>
    <td class="title">Er zijn geen belangrijke berichten beschikbaar</td>
    <td></td>
    <td></td>
    </tr>

    </tbody>
    </table>
    <?php endif; ?>

    <table id="lastest">
    <thead>
    <tr>
    <th class="title"><?php _e('Latest Discussions'); ?> — <?php new_topic(); ?></th>
    <th><?php _e('Posts'); ?></th>
    <th><?php _e('Freshness'); ?></th>
    </tr>
    </thead>

    <tbody>
    <?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td class="title"><?php bb_topic_labels(); ?> <a>"><?php topic_title(); ?></a></td>
    <td><?php topic_posts(); ?></td>
    <td><a>"><?php topic_time(); ?></a></td>
    </tr>
    <?php endforeach; endif; // $topics ?>
    </tbody>
    </table>
    <?php endif; // $topics or $super_stickies ?>
    </div><!-- //c -->
    <?php else : // $forums ?>

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

    </div><!-- //f -->

    <?php bb_get_footer(); ?>

    And this piece of code is wrong, I think;

    <table id="forumlist">
    <thead>
    <tr>
    <th class="title"><?php _e('Forums'); ?></th>
    <!-- th><?php _e('Topics'); ?></th-->
    <th><?php _e('Posts'); ?></th>
    </tr>
    </thead>

    <tbody>
    <?php while ( bb_forum() ) : ?>
    <tr<?php bb_forum_class(); ?>>
    <td class="title"><?php bb_forum_pad( '<div class="nest">' ); ?><a>"><?php forum_name(); ?></a> <span><?php forum_description(); ?></span><?php bb_forum_pad( '</div>' ); ?></td>
    <!--td><?php forum_topics(); ?></td-->
    <td><?php forum_posts(); ?></td>
    </tr>
    <?php endwhile; ?>
    </tbody>
    </table>

    I hope somebody can help me.

    Thanks in advance..


    kevinjohngallagher
    Member

    @kevinjohngallagher

    Hi Robert,

    I re-brought this up (and provided a solution and a theme) in October.

    If you check out my profile you’ll be able to find it, if it’s not been deleted (a number of my threads have been deleted in the past few months)

Viewing 14 replies - 51 through 64 (of 64 total)
  • You must be logged in to reply to this topic.
Skip to toolbar