zaerl (@zaerl)

Forum Replies Created

Viewing 25 replies - 26 through 50 (of 762 total)
  • @zaerl

    Participant

    No. Use a different forum prefix.

    @zaerl

    Participant

    $info = get_userdata();
    echo ‘Biographical Info: ‘, $info->description;

    @zaerl

    Participant

    bbp_user_profile_link( $user_id = 0 ) for the link, bbp_get_user_profile_url( $user_id = 0 ) for the URL.

    @zaerl

    Participant

    I’ve checked the documentation of FORCE INDEX, forget the “solution” I’ve posted above. Actually speaking this snippet (maybe) work:

    SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts FORCE INDEX (PRIMARY, post_parent) JOIN wp_icl_translations t ON wp_posts.ID = t.element_id AND t.element_type IN ('post_topic') JOIN wp_icl_languages l ON t.language_code=l.code AND l.active=1 WHERE 1=1 AND (wp_posts.ID = 647 OR wp_posts.post_parent = 647) AND wp_posts.post_type IN ('topic', 'reply') AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'closed') AND t.language_code='en' ORDER BY wp_posts.post_date ASC LIMIT 0, 15
    

    Notice the positioning of the FORCE INDEX. Unfortunately we can’t change that part of the query from ‘_bbp_has_replies_where’. We must use the ‘posts_join’ filter, check if WPML have injected its stuff and add the FORCE INDEX.

    In reply to: Ask for a plugin

    @zaerl

    Participant

    Hi smiga. This is possible cause I save a mix of last IDs and last timestamp but I don’t think that I will insert this in the first release cause I’m having problems with deleted/merged/splitted topics/replies. I’m trying to avoid making additional calls to the database.

    @zaerl

    Participant

    Have you tried archive-forum.php? The forum page is an archive.

    @zaerl

    Participant

    The problem here is that bbPress insert a FORCE INDEX (PRIMARY, post_parent) but WPML uses a JOIN in its tables. You can’t do that when you have a JOIN cause the correct syntax in that particular case is FORCE INDEX FOR JOIN. Try to replace the function “function _bbp_has_replies_where( $where, $query )” in wp-content/plugins/bbpress/bbp-includes/bbp-replay-functions.php” with this: https://gist.github.com/3930162

    Keep in mind that it’s not tested, I haven’t a WPML license. I do not know either if my reasoning makes sense at all.

    @zaerl

    Participant

    What 500 error you got? You can see it from the apache error log (tail /var/log/apache2/error.log)

    In reply to: Ask for a plugin

    @zaerl

    Participant

    For you what is the best place to put the link that mark an entire forum as read? Right now I’ve placed it next to “Viewing topic X (of Y total)” (filter bbp_get_topic_pagination_count) but I don’t know if it’s the best option.

    In reply to: Ask for a plugin

    @zaerl

    Participant
    1. Visitor check topic A, which belongs to forum F, at 10:00
    2. New reply in post A at time 10:05
    3. Visitor check forum at 10:06, the post A and forum F are unread
    4. Visitor check post A, the post is now read
    In reply to: Mark topic as closed

    @zaerl

    Participant

    Forgot the double &, it’s &&.

    In reply to: Mark topic as closed

    @zaerl

    Participant

    The class is “status-closed”. You can change the title of a topic in this way:

    add_filter('the_title', 'custom_the_title', 10, 2);
    
    public function custom_the_title($title, $post_id) {
        if(get_post_type($post_id) === bbp_get_topic_post_type() &&
            bbp_is_topic_closed($post_id)) {
            return '[Resolved] ' . $title;
        }
    
        return $title;
    }
    
    • This reply was modified 12 years, 2 months ago by zaerl.
    • This reply was modified 12 years, 2 months ago by zaerl.

    @zaerl

    Participant
    bbp_get_user_profile_url( $user_id = 0, $user_nicename = '' )
    

    is the function for retrieving the user profile URL. If you don’t pass an ID it takes that current user ID.

    \wp-content\plugins\bbpress\bbp-theme-compat\bbpress\user-details.php
    \wp-content\plugins\bbpress\bbp-theme-compat\bbpress\user-favorites.php
    \wp-content\plugins\bbpress\bbp-theme-compat\bbpress\user-subscriptions.php
    \wp-content\plugins\bbpress\bbp-theme-compat\bbpress\user-topics-created.php
    

    are the template files that you can override in your own template.

    In reply to: Ask for a plugin

    @zaerl

    Participant

    Hi there. The plugin is in advanced state of development. I’m testing it in very large (+10,000 auto-generated topics) env in order to ensure that it will scale well. It will be released in a few day as an alpha release on Github. I can publish it now if you want but I prefer to make some more tests.

    I’m not using ck approach cause it generate problems with very large forum. Main functionalities are:

    1. Users can mark an entire forum as read (use an AJAX call)
    2. Users can mark a single topic as read (use an AJAX call)
    3. Every visited topic is marked “read” when accessed via browser
    4. Custom HTML class for unread topics
    5. Custom prefix for unread forums title (“[unread] ” or similar)
    6. Custom prefix for unread topics title
    7. Template functions for checking the state of current forum/topic

    These are the functionalities of the first soon-to-be alpha. I think that in future release I will add something like: custom loop for unread topic (maybe a separate page), count of unread topics, mark a forum as “always read” and other stuff.

    Who is an adventurous can write me at za@zaerl.com, I will send you back the prototype.

    @zaerl

    Participant

    Go to /wp-admin/nav-menus.php (section Appearance -> Menu from left sidebar), create a menu (if you don’t have one), assign it and insert the link to the /forums page.

    In reply to: Quick Widget Question

    @zaerl

    Participant

    It’s not a page, it’s an archive. Personally I use http://www.woothemes.com/woosidebars/ and I created a sidebar for the archive forum custom post type.

    @zaerl

    Participant

    The CSS is injected in the section. Maybe your theme does push inline styles. Check header.php and/or functions.php on /wp-content/themes/compare/*.

    @zaerl

    Participant

    I suggest to insert an additional filter on all the functions described above. This is an example for bbp_get_topic_reply_count: https://gist.github.com/3884515

    All the functions that ‘echo’ values are used on templates and it’s the best place where to put a cosmetic filter like number_format.

    @zaerl

    Participant

    /wp-content/plugins/bbpress/bbp-includes/bbp-topic-template.php line 686:

    $total = bbp_get_topic_reply_count( $topic_id );
    

    this is erroneous because of this:

    /wp-content/plugins/bbpress/bbp-includes/bbp-core-filters.php line 158:

    add_filter('bbp_get_topic_reply_count', 'bbp_number_format', 10);
    

    Actually speaking bbp_get_user_topic_count, bbp_get_user_reply_count, bbp_get_user_post_count, bbp_get_forum_subforum_count, bbp_get_forum_topic_count, bbp_get_forum_reply_count, bbp_get_forum_post_count, bbp_get_topic_voice_count, bbp_get_topic_reply_count and bbp_get_topic_post_count are all affected by this bug.

    @zaerl

    Participant

    It’s quite strange. I forced 1.000.000 on bbp_get_topic_pagination with no luck. A “find . -name ‘*.php’ | xargs grep 1000” didn’t show the value hardcoded anywhere.

    In reply to: Ask for a plugin

    @zaerl

    Participant

    I will provide a free alternative.

    In reply to: Unread Posts

    @zaerl

    Participant

    I’m working on a brand new plugin. The first alpha version will be out soon.

    In reply to: Ask for a plugin

    @zaerl

    Participant

    I will work on that then. I remember Unread Posts, it’s one from ck.

    @zaerl

    Participant

    Tell them to change the avatars on gravatar.com.

    In reply to: Ability to hide topic

    @zaerl

    Participant

    bbPress plugin or standalone?

Viewing 25 replies - 26 through 50 (of 762 total)