Gautam (@gautam2011)

Forum Replies Created

Viewing 25 replies - 51 through 75 (of 75 total)
  • @gautam2011

    Member

    Hmmm… Will take a look at it………

    @gautam2011

    Member

    oh….

    @gautam2011

    Member

    Use this:

    <?php if(bb_is_admin()){ ?>
    <div id="useronline">
    <h3><?php _e('ONLINE TODAY'); ?></h3>
    <p><?php do_action('members_online_today',''); ?></p>
    </div>
    <?php } ?>

    This should work…….

    @gautam2011

    Member

    Create a functions.php file in your theme folder, and write this in it:

    <?php
    function get_post_teaser($chars = 200){
    global $bbdb;
    $topic_id_ft = get_topic_id(); //topic id for getting text of first post of the topic
    $first_post = (int) $bbdb->get_var("SELECT post_id FROM $bbdb->posts WHERE topic_id = $topic_id_ft ORDER BY post_id ASC LIMIT 1");
    $content = substr(strip_tags(strip_shortcodes(get_post_text($first_post))),0, $chars); //gets the first 200 chars of the post
    return $content;
    }
    ?>

    Then at the front page, put this where you need to display the post text (it should be inside the loop):

    <?php echo get_post_teaser(200); ?>

    You can change that 200 to anything, any number of letters you want. Default is 200.

    I think, this should work.

    @gautam2011

    Member

    I think, for the front page, where all topics are shown, you should put this:

    <?php
    $limit = bb_get_option('page_topics');
    $offset = ($page-1)*$limit;
    $all_topics = $bbdb->get_results("SELECT * FROM $bbdb->topics WHERE topic_status = 0 AND topic_sticky = 0 ORDER BY topic_id DESC LIMIT $limit OFFSET $offset");
    $all_topic_posts = get_thread( $topic->topic_id);
    $topics = $all_topics;
    ?>

    Haven’t tested it, but should work.

    @gautam2011

    Member

    I think get_topic_start_time(); will not echo it. You need to put topic_start_time();

    @gautam2011

    Member

    Here, I have uploaded it:

    http://www.mediafire.com/file/znyxze2mefw/live-comment-preview.zip

    I have also added auto-check, so after 10 seconds, it will automatically refresh the preview. And you dont need to do any editing, it will automatically insert itself.

    @gautam2011

    Member

    Hey! Plugin fixed :D

    Posting the link in a few mins

    @gautam2011

    Member

    Wait, I will try to fix it.

    @gautam2011

    Member

    @gautam2011

    Member

    Can you give me the current source of the plugin you have made?

    You can get the post text (of the first post of the topic) by:

    global $bbdb;

    $topic_id_ft = get_topic_id(); //topic id for getting text of first post of the topic

    $first_post = (int) $bbdb->get_var("SELECT post_id FROM $bbdb->posts WHERE topic_id = $topic_id_ft ORDER BY post_id ASC LIMIT 1");

    $content = urlencode(substr(strip_tags(strip_shortcodes(get_post_text($first_post))),0,300));

    $content = str_replace('+','%20', $content);

    $content = str_replace("’","'", $content);

    $post_summary = stripslashes($content);

    @gautam2011

    Member

    Also, you should upload templates to my-templates folder, not to bb-templates folder.

    @gautam2011

    Member

    :O

    This shouldn’t be the case. However, check the topic.php of your theme and see if there is the currect loop. It should look like this:

    <?php foreach ($posts as $bb_post) : $del_class = post_del_class(); ?>
    <li id="post-<?php post_id(); ?>"<?php alt_class('post', $del_class); ?>>
    <?php bb_post_template(); ?>
    </li>
    <?php endforeach; ?>

    And did you follow the steps to upgrade written here – https://bbpress.org/documentation/upgrading/

    In reply to: New forum setup

    @gautam2011

    Member

    If you have wordpress installed in the same database with wp_ as prefix, then use bb_ as prefix for bbpress, else it would conflict with wordpress.

    @gautam2011

    Member

    You also need to change bb-admin/includes/defaults.bb-htaccess.php appropiately and regenerate permalinks.

    @gautam2011

    Member

    You also need to change that at line number 847 and 819 for rss links.

    @gautam2011

    Member

    As you have bbpress installed in forum directory, thats why its showing one more forum

    if you have installed it in example.com, then only one forum would be shown

    (though you already know this)

    To fix this, you might do this (NOTE: I have not tested it, nor do I know if it might have a side effect on anything else, and this change will also be vanished when you upgrade bbpress):

    Open bb-includes/functions.bb-template.php

    Go to line number 711

    This would be written there:

    $link = bb_get_uri('forum/' . $forum->$column . $page, null, $context);

    Change forum/ to category/ or anything you want.

    In reply to: Permalink question

    @gautam2011

    Member

    http://www.example.com/forum/topic/test-post#post-5

    this is just the post id link, it scrolls down till the post number 5 when we go to that link.

    @gautam2011

    Member

    Click advanced settings and check if the host name there (default: localhost) is correct.

    @gautam2011

    Member

    Hmm.. upgrading……….

    In the next release please also put auto update feature…. like wordpress notifies you to upgrade and then automatically upgrades in a single click….

    In reply to: Getting Plugin URL

    @gautam2011

    Member

    Oh…

    The forum changed double into single

    In reply to: Getting Plugin URL

    @gautam2011

    Member

    Thanks ck…

    But, you forgot to escape .

    So, the correct code is:

    $url = bb_get_option('uri').trim(str_replace(array(trim(BBPATH,"/\"),"\"),array("","/"),dirname(__FILE__)),' /\').'/';

    @gautam2011

    Member

    for BBPress 1.0*

    In reply to: bbPress 1.0 released

    @gautam2011

    Member

    @sambauers

    Even I am not able to delete tags (from INove theme), and its not Ajaxed…. its links to the tag-remove.php file.

    In reply to: bbPress 1.0 released

    @gautam2011

    Member

    Thanks Mate :)

    I am the 24th to download it :P

    I will also write a blog post on it….

Viewing 25 replies - 51 through 75 (of 75 total)