livibetter (@livibetter)

Forum Replies Created

Viewing 25 replies - 76 through 100 (of 145 total)
  • In reply to: 1970 issue

    @livibetter

    Member

    I see.

    There are some useless code in search.php, like $users and $titles. They are not used in 0.8.3. If you can’t switch to an updated template, then you should diff to find out what has been changed.

    In reply to: 1970 issue

    @livibetter

    Member

    This is quite old (check this diff)

    <?php echo date(__('F j, Y, h:i A'), bb_get_post_time()); ?>

    replace it with

    <?php bb_post_time( __('F j, Y, h:i A') ); ?>

    You are using 0.8.3, right? You should use an updated theme.

    In reply to: 1970 issue

    @livibetter

    Member

    Could you post the search.php in your template? and check database to ensure the time is correct in database.

    @livibetter

    Member

    @Trent, this is nice post!

    @AndrewMac, why don’t you just ask Dreamhost’s support? You know, your hosting fee includes getting support from them. Although, sometimes, finding a solution on our own is faster then counting on them. But. who knows? maybe they already manage a solution for bbPress? If so, please must post the solution!

    @livibetter

    Member

    @Trent and everyone, this plugin intercept login process, if the logging user hasn’t activated the account, then it will be redirect to bb-activate.php. After successful activation, the user will be redirect to bb-login.php.

    And when new user is registering, this plugin doesn’t interfere the normal registering process but add an additional usermeta and send the activation code right after bbPress send the password mail.

    So, there is no way this plugin will break the password being sent.

    Edit: Currently, user gets TWO mails after registration, one is for password, another is for activation code. I am not planning to merge them into one, because that would have to touch many things and I don’t like that.

    Edit: I knew there are some topics about mail problem, but I can’t find them now.

    @livibetter

    Member

    Did you mean password or activation code? Your forum is quite new, so I guess that your server can’t send any mail for your forum. And this isn’t a plugin’s problem.

    Please deactivate this plugin, and register new account, then see if you can get the password mail. If you can’t, then you have to fix mail problem.

    In reply to: Create a blank page

    @livibetter

    Member

    You need to format the return array of bb_top_topics() on your own.

    <?php
    /*
    Page Name: Highest rated
    2007-11-29 14:47:26
    */
    $sidebar_area = "forum";
    // $sidebar_ibox = "topic";
    require_once('./bb-load.php');
    bb_get_header();
    ?>
    <div id="content" class="narrowcolumn">
    <h2>Most highly rated topics</h2>
    <table id="latest">
    <tr>
    <th><?php _e('Topic'); ?> — <?php new_topic(); ?></th>
    <th><?php _e('Posts'); ?></th>
    <th><?php _e('Last Poster'); ?></th>
    <th><?php _e('Freshness'); ?></th>
    </tr>
    <?php if ( $topics = bb_top_topics() ) : foreach ( $topics as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
    <td class="num"><?php topic_posts(); ?></td>
    <td class="num"><?php topic_last_poster(); ?></td>
    <td class="num"><small><?php topic_time(); ?></small></td>
    </tr>
    <?php endforeach; endif; ?>
    </table>
    </div>
    <?php
    bb_get_footer();
    ?>

    @livibetter

    Member

    Just a note, if you want to send a http response code, you need to use bb_init action (check init action for WP). If you use bb_head, you will get error since there is something has been sent to client side before your own header. And your own response code won’t be effective.

    I suggest you send header, bb_load_template and then exit in the action hook.

    @livibetter

    Member

    v0.0.0.2

    Fix: #7 – Empty input to foreach.

    Add: #8 – Auto-delete unactivated users.

    Add: (hourly, daily or not) Mail reports, which includes what ID and user_login have been deleted.

    Auto-deletion is executed every 60mins.

    @livibetter

    Member

    @Trent, Thanks for spotting that bug!

    In reply to: How Do I Do This?

    @livibetter

    Member

    Comment out third line from bottom in forum.php like

    <?php // post_form(); ?>

    @livibetter

    Member

    Auto-deletion would be considered in next release.

    Users will get TWO mails. I will see if there a way to send only one mail.

    @vafaaaan:

    This plugin thinks user has act_code usermeta hasn’t activated their account. If a account has been activated, then it doesn’t have act_code usermeta.

    In reply to: How Do I Do This?

    @livibetter

    Member

    Thats works on my server. Are you sure you edited right front-page.php? Do you have more than one template?

    In reply to: How Do I Do This?

    @livibetter

    Member

    Please post entire front-page.php.

    In reply to: How Do I Do This?

    @livibetter

    Member

    Oh… you are still there…

    position isn’t the id. When your mouse move over the Edit link, check the status bar of your browser. The id is there.

    In reply to: How Do I Do This?

    @livibetter

    Member

    Why don’t you just backup current front-page.php and replace with new code, then see what you will get?

    In reply to: How Do I Do This?

    @livibetter

    Member

    The Chicago forum’s id is 2

    If the rest forums’ id are 3, 6, 12, then you should replace that line with

    if (in_array(get_forum_id(), array(2, 3, 6, 12)))

    PS. you don’t need to add additional links, the new code will take care of that you mention in your question #4.

    In reply to: How Do I Do This?

    @livibetter

    Member

    You have to put the forum ids into this line (no need to put them all into this line, you can let big cities to be shown in front-page.php)

    if (in_array(get_forum_id(), array(2, 3, 4, 5, 6, 7)))

    You can get those id in Forum Management by move mouse over Edit links.

    Those ids should belongs to top-level forums.

    New code (edited):

    <?php
    if ( bb_forums() ) :
    global $bb_forums_loop;
    $_loop =& $bb_forums_loop;
    bb_forum();
    $skipForum = false;
    while ($_loop) :
    if ($_loop->walker->depth == 1) {
    if (in_array(get_forum_id(), array(2, 3, 4, 5, 6, 7)))
    $skipForum = true;
    if ($skipForum) {
    ?>
    <h2<?php bb_forum_class?>><a href="<?php forum_link(); ?>">Click Here To Go To the <?php forum_name(); ?> Forums</a></h2>
    <?php
    }
    else {
    ?>
    <h2<?php bb_forum_class?>><?php forum_name(); ?></h2>
    <table id="forumlist">
    <tr>
    <th><?php _e('Main Theme'); ?></th>
    <th><?php _e('Topics'); ?></th>
    <th><?php _e('Posts'); ?></th>
    </tr>
    <?php
    }
    }
    elseif (!$skipForum) {
    ?>
    <tr<?php bb_forum_class(); ?>>
    <td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><small><?php forum_description(); ?></small><?php bb_forum_pad( '</div>' ); ?></td>
    <td class="num"><?php forum_topics(); ?></td>
    <td class="num"><?php forum_posts(); ?></td>
    </tr>
    <?php
    }
    bb_forum();
    if ($_loop === null || $_loop->walker->depth == 1) {
    if (!$skipForum)
    echo '</table>';
    $skipForum = false;
    }
    endwhile; ?>
    <?php endif; // bb_forums() ?>

    @livibetter

    Member

    Haven’t you noticed this line from bbPress source (L1296 in template-functions.php)?

    $roles = $bb_roles->role_names;

    I think chrishajer and me thought you knew how to program with PHP (by checking your website). Yes, chrishajer gave you a piece of code that is a hint not a just-can-work code at everywhere. I thought you can code with PHP, and you should be able to put the rest on your own code. However, I was wrong or you think someone else has taken care of the rest for you?

    you also need to do global $bb_roles;, in case you really can not code with PHP.

    (edit: Sorry for this emotional post to everyone else)

    @livibetter

    Member

    @Null: of course, you get all roles’ data. I meant you can get each role’s name from the returning result of $bb_roles->get_roles() (I thought you was going to do something special). However chrishajer has told you the useful information for all your need, you just need to read from https://trac.bbpress.org/browser/trunk/bb-includes/template-functions.php#L1296 to 1311. If you really want to do something with bbPress, you have to read the source of bbPress.

    @livibetter

    Member

    @livibetter

    Member

    Try forum_name($topic->forum_id);

    In reply to: Code backtick bug

    @livibetter

    Member

    Try my plugin: http://www.livibetter.com/it/topic/plugin-html-tag-attributes-validator

    It supports Image <img>, YouTube and Google Video embedding.

    In reply to: How Do I Do This?

    @livibetter

    Member

    Just add the rest of cities at top level as Chicago and New York are.

    @livibetter

    Member
Viewing 25 replies - 76 through 100 (of 145 total)