deadlyhifi (@tomdebruin)

Forum Replies Created

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

  • deadlyhifi
    Participant

    @tomdebruin

    I figured it out.

    <?php post_ip_link( array( 'before' => ' | ', 'after' => ' | ' ) ); ?>


    deadlyhifi
    Participant

    @tomdebruin

    I’m using bb_get_active_theme_directory() to detect any changes to my stylesheet.

    <link rel="stylesheet" href="<?php bb_stylesheet_uri(); echo '?' . filemtime( bb_get_active_theme_directory() . '/style.css'); ?>" type="text/css" media="screen, projection" />

    if I echo bb_get_active_theme_directory() on my page it does return the correct value. I’m using bbP 1.0.1.


    deadlyhifi
    Participant

    @tomdebruin

    you can do this with a plugin if you like.

    function filter_front_page_topics($where){
    $exclude_forums=array ("3"); // enable this to manually specify specific forums by id #
    if ( is_front() ) {foreach($exclude_forums as $forum) { $where.=" AND forum_id != ".$forum." "; }}
    return $where;
    }
    add_filter( 'get_latest_topics_where', 'filter_front_page_topics');
    add_filter( 'get_latest_posts_where', 'filter_front_page_topics');

    If you have front page paging (1,2,3,4 etc) then the paging count will be wrong. You need to edit the bb-includes/function.bb-template.php file

    function bb_latest_topics_pages() {
    global $page;
    static $bb_latest_topics_count;
    if (!$bb_latest_topics_count) {
    global $bbdb;
    $bb_latest_topics_count = $bbdb->get_var('SELECT COUNT(<code>topic_id</code>) FROM <code>' . $bbdb->topics . '</code> WHERE <code>topic_open</code> = 1 AND <code>topic_status</code> = 0 AND <code>topic_sticky</code> != 2 AND <code>forum_id</code> != 3;');
    }
    echo apply_filters( 'bb_latest_topics_pages', get_page_number_links( $page, $bb_latest_topics_count ), $bb_latest_topics_count );
    }

    Note the addition of AND "forum_id" != 3 to the query.

    EDIT: just noticed that use of backticks in the code has been turned into <code>, so amend as necessary.


    deadlyhifi
    Participant

    @tomdebruin

    Have you posted this in Trac? > https://trac.bbpress.org/


    deadlyhifi
    Participant

    @tomdebruin

    functions.bb-template.php line 1866 shows the arguments that this functions can accept, including a before and after character. But it also states $args = null. You could add the | on line 1868 but this is editing the core :(

    Alternatively use an if ( bb_current_user_can( 'view_by_ip' ) ) { echo " | "; }.


    deadlyhifi
    Participant

    @tomdebruin

    Have you looked at the cookies that are being outputted to see if they correspond? In Safari choose preferences > Show Cookies then search by your domain. In other browsers this is possible too.


    deadlyhifi
    Participant

    @tomdebruin

    You’d replace the topic_posts(); with the code that johnhiler wrote.

    Is it worth running through that calculation for every listed post though? People on your forum would soon become familiar with Number of Posts rather than Replies to Post statistics.


    deadlyhifi
    Participant

    @tomdebruin

    I’ve just reported this issue of HTML characters being displayed in edit post in Trac. (https://trac.bbpress.org/ticket/1158).

    It looks like a minor bug in bbP rather than an issue with the plugin… although it could affect people who are trying to type HTML characters out in their code examples. That rarely happens on my forum though.


    deadlyhifi
    Participant

    @tomdebruin

    This code won’t work on front-page.php but did you try it in forum.php? I’m running v1.0.1 and it’s working fine there.

    For the front page you need to find the SQL query that gets called and replace it with your own, and ORDER BY topic_id. Let me know how you get on. I’ll have a closer look tomorrow when I’m working from home.


    deadlyhifi
    Participant

    @tomdebruin

    Just noticed an issue when editing a post. If there is an apostrophe it get’s turned into HTML code. i.e. ' the preview code stops being generated… will look at this closer tomorrow. I suppose this only affects if the preview form has been added to edit post with (add_action('edit_form','add_live_comment_preview');)


    deadlyhifi
    Participant

    @tomdebruin

    good work.

    though I changed the preview button to <p name='live_comment_preview_button' id='live_comment_preview_submit' value='".$label."' onclick='sendPostToPreview("".$live_comment_preview_path."" )' />Preview Post</p>, styled accordingly with a cursor on hover and placed it on the post form itself (the submit button would try and submit the form).

    add_action('post_form', 'add_live_comment_preview');
    add_action('edit_form','add_live_comment_preview');

    also added it to the edit post form.


    deadlyhifi
    Participant

    @tomdebruin

    I do this on one of my forums (a classified forum that I didn’t want users ‘bumping’ on constantly.) Just add

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

    to the top of the forum.php file in your template. Take out the if ($forum_id == 3) { and trailing } if you want to apply it to all your forums.

    To show topic creation date instead of freshness replace topic_time(); with get_topic_start_time(); in the forum.php, and front-page.php template files – though I haven’t tested that bit.

    In reply to: Can I edit my tags?

    deadlyhifi
    Participant

    @tomdebruin

    I’ve just had a look at your site. Your tags show in the bottom right corner of the page, as if it’s included in your footer.php file.

    In your topic.php file all the tag code

    id="topic-tags" etc.

    needs to be put inside

    div class="infobox"

    then you can start styling it correctly.

    In reply to: Can I edit my tags?

    deadlyhifi
    Participant

    @tomdebruin

    after you have made the changes you need to a do a hard refresh, to force the browser to read the updates stylesheet – it has the old one cached.

    May I suggest you use Firefox, and get the Firebug extension so you can look at all the code correctly.

    In reply to: Can I edit my tags?

    deadlyhifi
    Participant

    @tomdebruin

    sorry, it’s actually

    ul#tags-list li (missed the s off)

    I think you need to do some reading about stylesheets and how they work. It’s quite straight forward and will stand you in good stead.

    In reply to: Can I edit my tags?

    deadlyhifi
    Participant

    @tomdebruin

    You can do it in the CSS.

    ul#tag-list li { display: inline; }

    you may meed to do some more CSS edits on other elements to make it all fit correctly and look good.


    deadlyhifi
    Participant

    @tomdebruin

    You should definitely submit your patches in the comments of the plugin pages, if you’re willing!

    Indeed I have:

    https://bbpress.org/plugins/topic/approve-user-registration/page/2/#post-3902

    and

    https://bbpress.org/plugins/topic/bbpress-moderation-suite/page/2/#post-3963


    deadlyhifi
    Participant

    @tomdebruin

    although it may be a little put of date now, the principles are the same.


    deadlyhifi
    Participant

    @tomdebruin


    deadlyhifi
    Participant

    @tomdebruin

    i fixed it! yeah! i’ll post a working version of ban plus up soon…


    deadlyhifi
    Participant

    @tomdebruin

    cool, thanks. I’ll take a look at that.


    deadlyhifi
    Participant

    @tomdebruin

    I may have to start doing it manually, then either adapt an existing plugin, or get my head around it myself at a later stage. They’re really banging on about it at work right now :( as a must have ASAP feature. It’s all about the monies!


    deadlyhifi
    Participant

    @tomdebruin

    The standard version of approve user registration does not work in V1. This may be breaking registration.

    There’s an updated version of this plugin here: https://bbpress.org/plugins/topic/approve-user-registration/page/2/#post-3902

    I’ve got V1.0.1 working great with that and human test. But if you’ve tested with the plugins disabled I can’t really offer anymore help. Sorry.


    deadlyhifi
    Participant

    @tomdebruin

    ooh, that’s good to know. That’s not the explanation then. oh well. Maybe it will all blow over :)


    deadlyhifi
    Participant

    @tomdebruin

    mmm, just noticed that cookies with _utma, _utmb etc. state they come from

    .MYWEBSITE.com

    whereas the “wordpress_logged_in_NUMBER” states it’s website as

    www.MYWEBSITE.com (without the http this forum is auto adding it)

    could the fact that it has www at the start be the issue?

    My test site, on a subdomain, shares the same source – but then because its a subdomain it doesn’t have the www at the start.

    thanks for your continued replies ck.

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