Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 21,601 through 21,625 (of 32,524 total)
  • Author
    Search Results
  • #87035
    bb-lover
    Member

    @ zaerl… i think you did not read his post completely …

    please read it again and see what he said

    Note: I’ve tried various things but nothing happened even i tried

    A). https://bbpress.org/forums/topic/name-based-permalinks-without-page-and-forums

    B). https://bbpress.org/plugins/topic/nicer-permalinks/

    C). http://www.technospot.net/blogs/how-to-remove-forum-and-topic-keyword-from-bbpress-url/

    but they are not useful ..

    #34031
    cnc
    Member

    Hi all,

    I’ve 3 issues regarding my car forums i.e. ( http://car-n-car.com/forums)….

    1. Page title:

    it happened after deep integration…. the title of the page which usually show in the browser’s window and Google search has been broken.. now there is just a link besides title words,

    I’m sending you its screen shot for better understanding..

    here is its screenshot regarding title issue

    a) http://car-n-car.com/forums/page-title.jpg

    =====================================

    2. Page Not Found:

    when i select 1st option from permalinks i.e. http://car-n-car.com/forums/forums.php?id=1 then it work fine but its not good for seo .. that’s why i need 3rd option which is name based permalinks.. so when i select 3rd option then content goes hide and message apear regarding page not found.

    here is its screenshot for better understanding :

    b) http://car-n-car.com/forums/page-not-found.jpg

    =====================================

    2. Permalinks Problem:

    my name based permalinks structure is like that

    http://car-n-car.com/forums/forums/first-forum

    means the word of forums is repeated 2 times, so i want to remove this one word ( forums ) from name based permalinks.. i think it creates all trouble for me and drive me crazy…

    here is its screenshot

    http://car-n-car.com/forums/car-permalinks.jpg

    =====================================

    here is my .htacess file structure

    http://car-n-car.com/forums/htaccess.txt

    =====================================

    Note: I’ve tried various things but nothing happened even i tried

    A). http://bbpress.org/forums/topic/name-based-permalinks-without-page-and-forums

    B). http://bbpress.org/plugins/topic/nicer-permalinks/

    C). http://www.technospot.net/blogs/how-to-remove-forum-and-topic-keyword-from-bbpress-url/

    but they are not useful ..

    =====================================

    Special Request:

    I’m inviting the sir chrishajer, johnhiler, Gautam to take personal interest in this issue so that other people can learn from this post…

    I hope you’ll solve these issues…

    Regards

    cNc

    #86961
    master5o1
    Participant

    That doesn’t work. :| (to making it exclude=7,8)

    #86959
    zaerl
    Participant

    Try:

    if ( $topics = get_latest_topics('exclude=8,7', $page) )

    but I’m not sure that this will function.

    #86957
    master5o1
    Participant

    Still not sure how :|

    #86955
    zaerl
    Participant

    So you must manually change the loop the you will find in the template file front-page.php.

    #87000
    zaerl
    Participant

    You have to manually modify the template file front-page.php line 20.

    #86931

    In reply to: bbPress loop help

    driz
    Member

    @psycheangels

    Looks like some of that code could be useful. I’m not a PHP whizz though. Would you or anyone else be able to help me *rewrite* it to what I am wanting to do above?

    Much appreciated.

    #86985

    In reply to: Put PHP together

    chrishajer
    Participant

    Do you want to echo the $page if ANY of them are true? So, an OR statement?

    <?php if ($page>1 && (is_front() || is_topic() || is_forum())) echo " page $page"; ?>

    That should do it, unless I misunderstood your problem.

    #86909

    In reply to: Latest Discussion Page

    gerikg
    Member

    Okay here is the update:

    I created discussion.php and put it in root. In the file I put…

    <?php

    require('./bb-load.php');

    bb_repermalink();

    $bb_db_override = false;
    do_action( 'bb_index.php_pre_db' );

    if ( isset($_GET['new']) && '1' == $_GET['new'] ) :
    $forums = false;
    elseif ( !$bb_db_override ) :
    $forums = bb_get_forums(); // Comment to hide forums
    if ( $topics = get_latest_topics( false, $page ) ) {
    bb_cache_last_posts( $topics );
    }
    if ( $super_stickies = get_sticky_topics() ) {
    bb_cache_last_posts( $super_stickies );
    }
    endif;

    bb_load_template( 'discussion.php', array('bb_db_override', 'super_stickies') );

    ?>

    It’s the same as index.php except for the last line I put discussion.php

    Then I created the template file discussion.php. I put in the file:

    <?php bb_get_header(); ?>
    <?php if ( $forums ) : ?>

    <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><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 ?>

    </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(); ?>

    Now bb_new_topic_link() & topic_class() for sticky does not work.

    #86904
    psycheangels
    Member

    hmm maybe you can make a condition that check if there is no parent category in that forum (by depth). i think i have seen the code for your problem in this forum but i forgot to bookmark it

    #86930

    In reply to: bbPress loop help

    psycheangels
    Member
    #86936

    In reply to: posts per page setting

    Anonymous User
    Inactive

    ok :) – I see – this is the standard settings for topics, posts and tags.

    With the plugin from _ck_ it is possible to set different count limits for nearly every bbPress page:

    • front-page
    • forum-page
    • topic-page
    • view-page
    • tag-page
    • tag-page
    • search-page
    • feed-page
    • profile-page
    • favorites-page
    • stats-page

    Markus

    #86928

    In reply to: bbPress loop help

    driz
    Member

    Okay here is how I want it to work:

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

    <!-- FOR EACH TOP LEVEL CATEGORY BUILD A DIV WITH A H3 AND OL -->

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

    <div class="box">

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

    <h3><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a></h3>

    <?php endif; ?>

    <ol>

    <!-- FOR EACH FORUM BUILD A LI (only show top level children not children within those) -->

    <li class="arrow f_unread">
    <a href="<?php forum_link(); ?>">
    <strong><?php forum_name(); ?></strong><br />
    <?php forum_topics(); ?> Topics / <?php forum_posts(); ?> Replies
    </a>
    </li>

    </ol>

    </div>

    <?php endwhile; ?>

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

    I only want top level cats and forums to show on the front page, clicking on those will show the sub-forums when you view in the individual forums.

    Can anyone help?

    #85630
    mr_pelle
    Participant

    No answer, so I made a plugin upload request today: “Nicer Permalinks” will be online soon! ^_^

    #86926

    In reply to: bbPress loop help

    driz
    Member

    Okay changed all forums to have cats, but I need each block of forums with a cat to have this setup:

    <div class="box">
    <h3>CAT</h3>
    <ol>
    <li>Forum</li>
    <li>Forum</li>
    </ol>
    </div>

    At the moment it’s repeating the div and ol for each forum and not containing the forums within a cat inside just one div and ol.

    ALSO

    But because I have categories within categories it will become messy nested. So I only want to show top level forums and not the sub-forums/cats within.

    #34008
    driz
    Member

    Hi I have the following code:

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

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

    <div class="box">

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

    <h3><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a></h3>

    <?php continue; endif; ?>

    <ol>

    <li class="arrow f_unread">
    <a href="<?php forum_link(); ?>">
    <strong><?php forum_name(); ?></strong><br />
    <?php forum_topics(); ?> Topics / <?php forum_posts(); ?> Replies
    </a>
    </li>

    </ol>

    </div>

    <?php endwhile; ?>

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

    Struggling to get it to work how I want which is basically like this:

    for each category do this:

    <div class="box">
    <h3>CAT</h3>
    <ol>
    <li>Forum</li>
    <li>Forum</li>
    </ol>
    </div>

    so that div should be repeated for each block. if a set of forums has not category, then all of the code would be above would run but just no h3.

    so an example might look like this:

    <div class="box">
    <h3>CAT</h3>
    <ol>
    <li>Forum</li>
    <li>Forum</li>
    </ol>
    </div>

    <div class="box">
    <h3>CAT</h3>
    <ol>
    <li>Forum</li>
    <li>Forum</li>
    </ol>
    </div>

    <div class="box">
    <ol>
    <li>Forum</li>
    <li>Forum</li>
    <li>Forum</li>
    <li>Forum</li>
    </ol>
    </div>

    <div class="box">
    <ol>
    <li>Forum</li>
    <li>Forum</li>
    <li>Forum</li>
    <li>Forum</li>
    </ol>
    </div>

    can anyone help thanks.

    #86791
    Anonymous User
    Inactive

    Hi Chris,

    thanks for your answer. So I only continue to help here in the forum. :)

    Markus

    #86907

    In reply to: Latest Discussion Page

    Anonymous User
    Inactive

    Hi gerikg,

    this post could help you:

    https://bbpress.org/forums/topic/create-a-new-custom-page-like-wordpress

    1. Make a custom page

    create a page discussion.php in the root forum folder

    add require_once(‘./bb-load.php’); on the top of the page. and write whatever code you want in the page.. that should create a static page with bbpress functions..

    2. Put in the code for the Latest discussions from the main page (?)

    or

    3. Make your own sql query – https://bbpress.org/forums/topic/create-a-new-custom-page-like-wordpress

    Markus

    #34004
    #86897
    gerikg
    Member
    <?php if (bb_get_forum_is_category()) {; ?>
    <table id="forumlist">
    <tr<?php bb_forum_class('bb-category'); ?>>
    <td colspan="4" class="cattile"><?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>
    <tr>
    <th colspan="2"><?php _e('Main Theme'); ?></th>
    <th><?php _e('Topics'); ?></th>
    <th><?php _e('Posts'); ?></th>
    </tr>
    <?php } else { ?>
    <table id="forumlist">
    <tr>
    <th colspan="2"><?php _e('Main Theme'); ?></th>
    <th><?php _e('Topics'); ?></th>
    <th><?php _e('Posts'); ?></th>
    </tr>
    <?php };?>
    <?php continue; endif; ?>

    I can’t get it right..

    #86896
    chrishajer
    Participant

    I suppose you could do the complete noob thing and say:

    <?php if (bb_get_forum_is_category()) {
    continue;
    }
    else {
    // do something
    }
    ?>

    Unless I am completely missing your point and this is some sort of test :-)

    #86895
    chrishajer
    Participant

    Is it as simple as:

    <?php if ( !bb_get_forum_is_category() ) {
    // whatever
    ?>

    gerikg
    Member

    Add

    AddHandler x-httpd-php5 .php
    AddHandler x-httpd-php .php4

    to your .htacess file. By default GoDaddy uses php4

    bah I should add pictures to my tutorial!

    #86787
    Anonymous User
    Inactive

    Hi chris,

    thanks for your long post. It’s great to have you here as moderator :)

    Honestly though, we have bigger problems than just putting a fresh face on the bbPress.org website. That would be the least of my concerns.

    I can understand thoughs – although I’ve made a post about the “fresh face” just minutes ago. After using bbPress more than a year I believe in the future of this project. :) And I will contribute – where I can help. :)

    For my thoughts … there should be a defined project team to coordinate the next steps. The weekly IRC meetups in December and January were the right way. To define a document team was also great. But after three months there are only you and Gautam “driving” the project.

    Markus

Viewing 25 results - 21,601 through 21,625 (of 32,524 total)
Skip to toolbar