_ck_ (@_ck_)

Forum Replies Created

Viewing 25 replies - 776 through 800 (of 2,186 total)

  • _ck_
    Participant

    @_ck_

    untested theoretical plugin

    add_filter('post_text','first_reply',999);
    function first_reply($text) {global $bb_post;
    if (!is_bb_feed() && (int) $bb_post->post_position==1) {$text.="<a name='first-reply'></a>";}
    return $text;
    }

    Then to get the first-reply link for any topic,

    <?php echo "<a href='".get_topic_link()."#first-reply'>replies</a>"; ?>


    _ck_
    Participant

    @_ck_

    They are trying to link to the first reply.

    It far easier to inject an anchor at the very bottom of the first post and link to that instead.

    It could be done via a plugin that appends post_text and checks the $bb_post->post_position to see if it’s equal to 1

    If it’s equal to 1 then append <a name="first-reply"></a>

    Then your first reply is always at http ://topic-link-blah-blah#first-reply

    Note that my unread-posts plugin already solves the problem of linking to the first unread reply per user.


    _ck_
    Participant

    @_ck_

    No, none of bbpress’s functions can be overridden unless they are in pluggable.php

    You cannot override the functions in template-functions.php

    That’s why filters and actions exist instead.

    If you are often trying to replace the entire function, you are probably doing it wrong or in an overly complex way.


    _ck_
    Participant

    @_ck_


    _ck_
    Participant

    @_ck_

    I assume this is just a typo in your example and not what you are really using:

    add_filter('topic_pages', 'output_what_i_want, 11');

    because the quote should close before the 11

    add_filter('topic_pages', 'output_what_i_want', 11);

    There’s nothing wrong with the action or filter triggers in bbpress (only that there are not enough of them or in the right places). The code for that is taken right out of wordpress and works fine. My dozens of plugins kinda prove they all work.


    _ck_
    Participant

    @_ck_

    Very nice conversion and I am very partial to the blue vs default green of bbPress.


    _ck_
    Participant

    @_ck_

    My theme switcher plugin is capable of doing this quite easily, it already allows each visitor to select the theme they want.

    All you would need to do is change the cookie support code into session support code so the server controls which theme is seen instead of the visitor.

    Should take all of an hour to convert for someone who understands cookies and sessions.

    Actually if the domain is fixed you can just use $_SERVER['HTTP_HOST'] or $_SERVER['SERVER_NAME'] to determine the theme to use which makes it even easier.


    _ck_
    Participant

    @_ck_

    You need a basic understanding of filters vs actions in WordPress before you can get this done.

    You can’t replace anything via add_action(‘post_form’… because it’s an action and not a filter. Calling it as a filter doesn’t change the fact that the hook itself is an action.

    Filters give you the opportunity to change the data passed.

    Actions are just points in the processes that you can inject activity into, but you can’t change what was before or what is coming after. No data is passed to you, no data is taken from your activity.

    You cannot change forms this way on the fly, it’s impossible (unless maybe via javascript).

    If you want dynamic themes, start with my theme switcher plugin and find some way to keep track of what theme is used without cookies (maybe sessions instead).


    _ck_
    Participant

    @_ck_

    For those that don’t want to install IE8 permanently to just test their sites, this version will run in it’s own virtual box so it doesn’t affect the rest of your system:

    http://start-o.xenocode.com/layers/ie8/8-0-0-0__2/ie8.exe

    In reply to: Why Was I Bozoed?

    _ck_
    Participant

    @_ck_

    Askimet might bozo you automatically if you’ve been bozo’ed elsewhere.

    Personally I disable the bozo part entirely – I had Sam make it a plugin so it’s really easy now.


    _ck_
    Participant

    @_ck_

    You can do a similar hack on the wordpress side too, except it’s easier because wordpress doesn’t need a referer , you just do it in the url.

    ie.

    wp-login.php?redirect_to=<?php echo $_SERVER['REQUEST_URI']; ?>


    _ck_
    Participant

    @_ck_

    Yes I already removed that, try doing a hard refresh (shift f5)


    _ck_
    Participant

    @_ck_

    Ah okay, apparently the htc file I use for old IE6 support is now causing some kind of weird behavior in IE7.

    It works for me now in IE7 – but I have no idea why you couldn’t see those images, it works for me.

    In reply to: List all Tags?

    _ck_
    Participant

    @_ck_

    It’s also technically possible to take tag creation privileges away from specific users entirely (but then they could just sign up for a new account to get around it).


    _ck_
    Participant

    @_ck_

    It’s working for me. What browser/os are you using?


    _ck_
    Participant

    @_ck_

    No one has done it yet but you can replace bbpress’s auth/cookie system via pluggable functions. Look at the cookie plugins for examples.


    _ck_
    Participant

    @_ck_

    Recount is only there for when things get out of sync somehow.

    In theory counts should stay pretty accurate but there is a chance that a plugin or manual delete may mess something up.

    Recounts are very db intense so that’s why they are not done each time something is deleted (or added).

    In reply to: Plugin tutorials

    _ck_
    Participant

    @_ck_

    Use WordPress plugin guides. Same concept, just different hook names.

    Also study existing plugins, that’s how I learned.

    In reply to: wp-functions error

    _ck_
    Participant

    @_ck_

    put back in the bb_foot and start deactivating plugins until the error goes away

    let me know which plugin stopped the error when deactivated


    _ck_
    Participant

    @_ck_

    No do not start with 1.0 unless you plan to not use any plugins.

    You can always upgrade from 0.9 to 1.0

    You can *never* downgrade from 1.0 to 0.9 because of the dramatic db changes involving tags and meta.

    Even if you are “only using part of bbPress” (not sure what that means) 1.0a6 is about to do a semi-radical change with 1.0a7 involving permalinks.

    bbPress 0.9 templates will (mostly) work with 1.0 but not visa versa.

    1.0 is about 150% the code size than 0.9 for the same functionality.

    I could go on but the point is that 1.0 is changing and unstable by nature. It should not even be called alpha but pre-alpha.


    _ck_
    Participant

    @_ck_

    Yeah unfortunately they didn’t even bother to maintain backward compatibility on the email change (which kinda annoyed me) so to support 0.8 you should first check from_email and if that is empty use admin_email.

    In reply to: Plugin @ ForumMatrix

    _ck_
    Participant

    @_ck_

    I’ve actually become the maintainer for that recently.

    The problem is their options are VERY limited with no room for details.

    WYSIWYG would be wrong, I’ll go look at that, but bbPress has partial or most of the others.


    _ck_
    Participant

    @_ck_

    Showing the gravatar for topic starter and last poster would be something like this (untested)

    Topic started by
    <?php echo "<img src='http://www.gravatar.com/avatar.php?gravatar_id=".md5(bb_get_user_email($topic->topic_poster))."'> $topic->topic_poster_name"; ?>
    Last Poster
    <?php echo "<img src='http://www.gravatar.com/avatar.php?gravatar_id=".md5(bb_get_user_email($topic->topic_last_poster))."'> $topic->topic_last_poster_name"; ?>


    _ck_
    Participant

    @_ck_

    To be clear, both bbPress and WordPress for that matter still work fine under PHP 4.4.x and technically 4.4.x is still supported officially.

    It’s just the specific i18n problem they are encountering, where the fix in 1.0 hasn’t been backported to 0.9

    Sam is unlikely to make any further changes to 0.9 unless it’s a security fix or serious performance problem.

    I haven’t looked at the fix for 1.0 but I suspect someone could make a patch to make 0.9 do the same thing if they really wanted.


    _ck_
    Participant

    @_ck_

    Because for some reason the bbdb object must not be created when deeply integrated under 1.0

    Must have something to do with backpress which re-uses wp functions.

Viewing 25 replies - 776 through 800 (of 2,186 total)