Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 20,026 through 20,050 (of 32,517 total)
  • Author
    Search Results
  • #77136

    In reply to: Topic paging issue

    _ck_
    Participant

    I forgot to add the topic_id=12 and group by on my queries sorry.

    Well the numbers are coming from post position.

    But still something is very wrong, because bbpress is showing 81 as the post count.

    You need to run the exact query that the recount function uses.

    SELECT topic_id, COUNT(post_status) as topic_posts FROM bb_posts WHERE post_status=0 AND topic_id=12 GROUP BY topic_id

    See if that gives 80 or 81

    #94066
    mr_pelle
    Participant

    I’ve checked every BackPress version and none of them has $end at line 244…. weird…

    The root of the problem is probably somewhere else.. no guess though..

    #77133

    In reply to: Topic paging issue

    e-motion
    Participant

    This query gave me an error:

    #1140 - Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause

    So I just did this:

    SELECT * FROMbb_postsWHERE topic_id=12

    And the result is:

    Showing rows 0 – 29 (80 total, Query took 0.0020 sec)

    So now I’m wondering where is bbpress taking post count numbers from?

    #77132

    In reply to: Topic paging issue

    _ck_
    Participant

    Okay we need to see if the query is failing somehow.

    try this (assuming the table is bb_posts)

    SELECT topic_id, COUNT(post_status) as topic_posts FROM bb_posts WHERE post_status=0 AND topic_id=12

    See if that gives 80 or 81

    Then try this if that gives 81

    SELECT topic_id, COUNT(*) as topic_posts FROM bb_posts WHERE post_status=0 AND topic_id=12

    (sorry I forgot to add AND topic_id=12)

    #94058

    In reply to: Internal Server Error

    zaerl
    Participant

    Check the server error log logs/error_log and report the error.

    #94064
    mr_pelle
    Participant

    What version of bbPress are you on? There is no $end at line 244 of that file, neither on the BackPress version shipped with bbPress 1.0.2 neither with trunk…

    #77125

    In reply to: Topic paging issue

    _ck_
    Participant

    I have a little trick to workaround this problem, at least when bbpress requests a link for the post that happens to be the last post in the topic.

    I will write a filter for when get_post_link is requested, it will check the post id# – if it happens to be the last post in the topic (stored in topic_last_post_id) it will instead route the request to the more accurate get_topic_last_post_link

    #77124

    In reply to: Topic paging issue

    _ck_
    Participant

    Here’s a simplified example of what I think is happening internally.

    Let’s say for ease of understanding there are TWO posts per page.

    And there are 7 posts in this particular topic example

    |1 2| – |3 4| – |5 6| – |7|

    so there are 4 pages (each | | is a page)

    In this example, the post numbers are also the post-position.

    Now let’s say a mod deletes post number 4

    |1 2| – |3 5| – |6 7|

    Should only be three pages.

    But bbPress is stupid by default, post-position is never recalculated so those post numbers still represent post position in this example.

    bbPress DOES track number of posts in a topic, even when deleted.

    So requesting a link to the last post in the topic, regardless of post-position, WILL be calculated correctly, and return page 3.

    However, if it specifically asks for a direct link to post 7 and not the last post in the topic, this is what happens.

    Post 7 is post-position 7

    posts per page is 2 per page

    ceil( $post_position / $per_page )

    7 / 2 = 3.5, ceil of 3.5 = 4

    So it will ask for page 4

    Page 4 does not exist in the topic.

    The link may be created but the link is bogus and will not work, it will either return you to the first page of the topic, or maybe the front page of the entire forum.

    #77122

    In reply to: Topic paging issue

    _ck_
    Participant

    You know what, this is an inherit flaw with bbpress that I think I mentioned elsewhere years ago.

    It never recalculates post-position when there are deleted posts, yet it relies on that post-position to find a specific posts’s page.

    See this is how it calculates the page

    function get_post_link( $post_id = 0 ) {
    $bb_post = bb_get_post( get_post_id( $post_id ) );
    >>>>>> $page = bb_get_page_number( $bb_post->post_position );
    return apply_filters( 'get_post_link', get_topic_link( $bb_post->topic_id, $page ) . "#post-$bb_post->post_id", $bb_post->post_id );
    }

    and this is how it calculates that page

    return intval( ceil( $item / $per_page ) );

    so it’s $bb_post->post_position / $per_page

    always, regardless if there are deleted posts in the way, which is why it can be “short” when calculating the last page(s) on a longer topic with deleted posts.

    The solution is that post-position has to be recalculated when a post is deleted. The only side effect is that for admin, jumping directly to a deleted post would not work, you’d have to find it manually.

    bbPress never, ever, re-calculates post-position, even on a recount, if I am not mistaken.

    There is one tiny work-around we can do.

    For the LAST POST calculation, we can intercept that and subtract the number of deleted posts from the post-position. Hmm, actually wait, is it subtract or add. I have to investigate this a bit and think out the logic.

    #77121

    In reply to: Topic paging issue

    _ck_
    Participant

    I must be missing the problem here.

    The “latest reply” link works.

    When I am on page 3, the page 4 link works.

    What specifically is not working?

    Are you saying the problem is intermittent?

    ps. I use an ebike with a custom lifepo4 battery :-)

    Oh wait, I see what you saying now

    he problem vanished when one reply was written.

    It will reappear when someone writes a reply last on that page.

    so it’s an even/odd problem

    if there are an even number of posts, it works,

    if there is an uneven number, it does not work

    Did you try the trick of deleting one post and then undeleting it?

    There must be a bug in the way bbPress calculates post-position when there are deleted posts. I wonder if it’s specific to 1.x

    #77120

    In reply to: Topic paging issue

    e-motion
    Participant

    No, I do not. I have following plugins:

    Akismet

    Allow Images

    Avatar Upload

    BBcode Buttons Toolbar

    BBcode Lite

    bbPM

    BBVideo

    Bozo Users

    Hello Louie

    Human Test for bbPress

    Instant Password

    Skip Akismet

    SourceCode Highlighter

    #92614
    mr_pelle
    Participant

    I suppose the first echo should read:

    echo "<tr><td>". $forum_id." > ".$result->forum_name."</td>";

    By the way, I suggest you to use double quotes for html tags (like you would do normally) and single quotes for php commands, unless you include vars in them. Like this: echo '<td class="num">';

    More details here.

    #35030
    kikko088
    Member

    <table id=”latest”>

    <tr>

    <th>Forum</th>

    <th>Discussioni</th>

    <th>Messaggi</th>

    </tr>

    <?php

    global $wpdb;

    $query=”SELECT * FROM bb_forums WHERE topics!=0 ORDER BY forum_order ASC LIMIT 10″;

    $results=$wpdb->get_results($query);

    foreach ($results as $result) {

    echo “<tr><td>forum_id.”‘>”.$result->forum_name.”</td>”;

    echo “<td class=’num’>”.$result->forum_topics.”</td>”;

    echo “<td class=’num’>”.$result->forum_posts.”</td></tr>”;

    }

    ?>

    </table>

    why this code don’t display the number of discussions and posts?

    kikko088

    #94034

    In reply to: css input problem

    kikko088
    Member

    http://www.endurodoc.net/forum/

    new topic title

    kikko088 :)

    #76448

    @erlend – Understandable. Will try to do better.

    @mbiernat – Thanks for the pat on the back. Definitely helps to have some support :)

    nood
    Member

    Assuming you have permalinks set up, create a page with the permalink forums so the full url would be http://localhost/wordpress/forums

    Because the directory exists, when someone goes to the page they will end up on your forum.

    #76443
    Rich Pedley
    Member

    All sounds good, thanks for the update ;)

    #76442

    I’ve been side tracked with BuddyPress bugs and paying work, so don’t expect anything official for a week or two. I have a few projects coming up fast that will need this working so while I’m missing my soft Sept 15 deadline, I don’t think it will be /too/ far off.

    Sorry to disappoint, it’s no fun… and thanks for your patience with me and it.

    For the record, I love bbPress. I have a few commits going into 1.1, and I have every intention of making bbPress be the best it can be as a WordPress plugin.

    Regarding my motivation and priority, it’s to make great forum software that fits inside WordPress; nothing more and nothing less.

    Regarding why I was able to step into this role, it’s because our peers believe I am capable, and I am willing to dedicate time and effort towards it getting it done.

    Regarding any possible benefit BuddyPress might see, is a welcome bonus but not a priority. BuddyPress/bbPress processing times should decrease with BuddyPress 1.2.6, as a few tweaks have been made and a bug or two have been patched in that regard. Even still, nothing compares to the blazing fast speed of bbPress by itself, even in the slower 1.x branch.

    Regarding everything else, I’m just here to write the best code I can, help make bbPress a great WordPress plugin, and have fun doing it all. So far, so good on my end. :)

    #76440
    frooyo
    Member

    @ _ck_

    And how once I had hope for bbPress, it seems like that hope dead with 0.9 some 3 years ago :(

    _ck_, I’ll definitely make a donation, if you were to pick back up 0.9 and run with it. Fix the known bugs in 0.9 and add in native page (front page & topic) caching for non-logged in users.

    I’ll donate $100. Seriously.

    #35354

    Topic: css input problem

    in forum Themes
    kikko088
    Member

    Hi at all, I try to put a value on input form (like bbpress.org form), I use this code

    <input name=”topic” type=”text” id=”topic” size=”50″ maxlength=”80″ tabindex=”1″ value=”text” onfocus=”if(this.value==’text’){this.value=”;this.focus();}” onblur=”if(this.value==”){this.value=’text’}”/>

    normally it work, now the problem is that I use also related post and I think it conflicts with the input code, infact if I active plugin the code don’t work, if I deactive the plugin the code work perfectly.

    Can you help me?

    kikko088

    #76436
    _ck_
    Participant

    Let me clarify for those that don’t follow.

    BuddyPress is JJJ’s pet project.

    Buddypress relies on WordPress, currently it’s technically a “plugin” to WordPress.

    Buddypress (pre-1.3) uses bbpress standalone to manage it’s groups by using bbpress’s engine to manage forums (buddypress “groups” technically are forums with specific memberships to limit who can post to where).

    JJJ sees that there are far too many layers and way too much code being loaded which is making buddypress too slow. So his plan is to more closely tie bbpress into WordPress, making buddypress faster.

    His motivation is not to improve bbpress for the sake of making bbpress better. He doesn’t need the front end of bbpress at all for buddypress. He already manages it through buddypress.

    So by reinventing bbpress to use wordpress’s core, he can cut out some of the bulk and make buddypress faster. BuddyPress is currently very slow and bulky unless you have a decent server and good caching setup.

    Taking control of bbPress is a side project to help buddypress for JJJ and he’ll never convince me otherwise about his motivations.

    Note I am NOT saying you won’t be able to run bbPress without buddypress, of course you will be able to (because that’s even less complicated) But that’s not his motivation or priority, at all.

    @frooyo

    0.7-0.9 bbPress standalone, high speed core independent of WP

    1.0-1.1 bbPress relies on backpress core, which uses WP functions (150% larger)

    1.2/2.0 bbPress relies on WordPress 3+ for it’s core (200% larger)

    If you think hooking into the bulk that is WP 3.x is going to make bbPress faster, well there’s going to be a mighty big wake up call sometime soon. It will make page caching easier, but that’s good because it’s practically going to be a requirement.

    JJJ’s only motivation to do this is because his pet buddypress project relies on the bulk of WP so the logic is might as well force bbPress to also.

    TL;DR bbPress rewrite makes buddypress faster but bbpress by itself slower than 0.9/1.1

    #94016
    _ck_
    Participant

    While I won’t say it’s impossible, doing this currently with bbpress is difficult because of how everything internally is geared for newest last.

    The post_position and other issues make this tricky. Even something as basic as jumping to the current post becomes a problem and has to be worked around.

    Matt just didn’t think of anyone desiring it any other way when he first coded things in bbpress and now it’s legacy.

    This is something I plan to address in a future (forked) version as well as parent/child threading. I’ve actually already accomplished it using plugins for a specific client but it’s overly complex and non-standardized.

    #93710
    RedBull
    Member

    The two above posts explain how to accomplish this.

    If you are using _ck_’s bbcode-lite plugin: https://bbpress.org/plugins/topic/bbcode-lite/

    You can use basic html

    <img src=”http://mydomain.com/pic.jpg&#8221; alt=”Pic1″ />

    #35352

    is there a way to change the default gravitar to something custom? i’m not talking about a member’s gravitar, but the one that shows up if they have not personalized it. there is a plugin to do this in wordpress, but i haven’t found one in bbpress yet.

    also something i noticed is that under the gravitar… where the member’s name shows up, when you click on it the link takes you directly to their website instead of to their member profile……….. has anyone come across that and figured out a way to change that?

    does bbpress have a permalinks option like wordpress does?

    thanks!!!!! :)

    #94001

    In reply to: reply via email

    zaerl
    Participant

    sorry….I don’t know this is a support forum.

    looks like a demo site…XD

    Well the title of this page is “okiss test topic << bbPress Support Forums.”

Viewing 25 results - 20,026 through 20,050 (of 32,517 total)
Skip to toolbar