Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26,276 through 26,300 (of 32,481 total)
  • Author
    Search Results
  • #70025

    Thanks for the response and it clarifies all of my questions.

    Regarding nonces, the catch twenty-two with them would be if logging in and logging out of either/or BBP or WP don’t both affect both, or if adequate traps aren’t placed to disallow one or the other.

    Example is visible at my live test site http://www.delsolownersclub.com. If you’d like to try this, register yourself and use the invite code “bbpress”. (Registering makes you a WP contributor, and I need to assign your membership role in the BBP admin manually as of right now.)

    When you’re in the forums, the logout link won’t work, because the login through WP generates a nonce that BBP doesn’t know and can’t find. Because the nonces are by design different, if I login through WP and try to logout through BBP, WP will pitch a fit without the correct nonce. Make sense or am I off track here?

    #69912

    I first tried switching DESC to ASC, and it didn’t change the result, which was 1.

    #69911
    _ck_
    Participant

    You mean on the regular topic page? Yeah it would just add one query.

    On a low to medium activity site it should be okay.

    I think there’s an index on topic_time so mysql shouldn’t have too much of a workout.

    The >= switch aroo may be logic confusion on my part between whether to use DESC or ASC.

    One makes the list start with the current topic time, the other way makes it end with the time.

    In theory the count should be easier with <= and if you have to change DESC to ASC.

    #69910

    I had to change topic_time<='$topic->topic_time' to topic_time>='$topic->topic_time', but it works beautifully now.

    I’m thinking about applying this mod to the regular topic view. You told me in a different thread that it should be fine if I’m only using this extra DB query in the Edit screen – do you think it would be unwise to use it in regular topic views?

    #69909
    _ck_
    Participant

    Oh that’s a simple bug, I forgot the quotes around the time:

    $query="SELECT count(topic_id) as position FROM $bbdb->topics WHERE forum_id=$forum_id and topic_time<='$topic->topic_time' ORDER BY topic_time DESC";
    $position = $bbdb->get_var($query);

    #69243

    In reply to: New installation

    You’re exactly right!

    I added my host (straight from wp-config.php) and it worked…BUT…it didn’t write bb-config.php on it’s own…it gave me some error messages, but it also provided the code for me to make the bb-config.php on my own…

    I opened notepad, pasted the code, saved it as bb-config.php, and uploaded it to the bbPress directory. Seems to be working so far, but I’m not quite done with the install. I’ll let you know if it works out…

    Thanks Chris!

    #69908

    I tried the shortcut method, it returned an error: `bbPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’01:46:48 ORDER BY topic_time DESC’ at line 1]

    SELECT count(topic_id) as position FROM tvcforum_topics WHERE forum_id=6 and topic_time<=2008-12-09 01:46:48 ORDER BY topic_time DESC`

    Regarding the last bit of code you posted – there’s actually a function already present in one of the bb-includes files that does the same thing – get_page_number().

    #70074
    chrishajer
    Participant

    This:

    <li><a href="http://forums.beardownarizona.com/" title="Visit the forums"></a></li>

    The bloginfo just grabs the url of the site in case you ever move to another domain name.

    #70073

    Thanks!

    Now what if I wanted to add the forums as a subdomain…like forums.example.com? How does that affect the code?

    Would this work?

    <li><a>http://forums.beardownarizona.com" title="Visit the forums"></a></li>

    Thank you for your help!

    #70072
    chrishajer
    Participant

    In that Autumn Almanac theme, you can add a link in menu.php. It can easily be before or after the link to Home, of after all the pages that are listed (so, end of the line.) Just add this to menu.php right after <?php wp_list_pages('depth=1&title_li='); ?>:

    <li><a href="<?php bloginfo('url'); ?>/forum/" title="Visit the forums"></a></li>

    That will add an additional list item right after all the rest of the pages in your menu.

    You could also do it by creating a page called Forum and then just redirect the content of that page to your forums. That way you could control the page order and have it appear in a place other than the beginning or end of the menu.

    You didn’t mention what version of bbPress and WordPress you’re trying to integrate. It matters. Looks like you are using WordPress 2.6.3 – I don’t know how to properly integrate the logins with any version of bbPress. If you spend some time looking through these forums, you will see people who’ve had trouble with integration. Maybe someone else can help you with that.

    #4425
    mshakour
    Member

    Hello bbPress Community Members,

    This is the Arabic translation for bbPress, I’ve done it 5 months ago with 0.9.0.2

    I was a little bit lazy about posting it here, dunno why :)

    Till i checked out this post mintues ago , #thanks _ck_

    http://bbpress.org/forums/topic/check-out-this-very-nice-r-t-l-arabic-bbpress

    All that i do know that alot of people love it in Arabic and already using the Arabic version of bbPress.

    Also, I’ve made a complete RTL version with heavy modifications on template files and a completely new Admin Page Design (CSS Edit).

    This is the last version of Arabic Translation for 0.9.0.3 with slight modifications.

    Hope that the moderator add this translation officially with other bbPress translations.

    Arabic Support Forum: (part of my blog itkallem.com)

    http://bbpress.itkallem.com/

    Project @ Google Code:

    http://code.google.com/p/bbpressar/

    Arabic Language Files ar_AR:

    http://bbpressar.googlecode.com/files/ar_AR-0.9.0.3.zip

    bbPress 0.9.0.3 Arabic Pack only (language files + RTl modifications,..etc)

    http://bbpressar.googlecode.com/files/bbpress-arabicpack-0.9.0.3.zip

    bbPress 0.9.0.3 Arabic Version (ready to use complete bbPress in Arabic version)

    http://bbpressar.googlecode.com/files/bbpress-0.9.0.3-ar.zip

    [+] Annoying Problems:

    – unicode support for usernames :(

    Thanks.

    M.Abdel-Shakour.

    #69878
    _ck_
    Participant

    Um, no you missed my point. I didn’t enter an htmlentity,

    I simply entered the ampersand symbol. bbPress converts it to an htmlentity

    and then your plugin converts it to a trac code.

    only way now to get a real & is to enter &amp; or put it in backticks &

    & & & &# & & &38;

    #69876
    Sam Bauers
    Participant

    Heh, definately a border case!

    I don’t know too many people who hand encode their own HTML entities in the normal flow of text.

    #67831

    In reply to: Get Current Forum ID?

    Hi guys, i’m trying to get the above code to work without any success.

    This is the code i’m using in my header files:

    <?php

    $current_forum_id = get_forum_id();

    while ( bb_forum() ) {

    $class = ”;

    if ($current_forum_id == get_forum_id()) {

    $class = ‘on’;

    }

    }

    ?>

    …and this is the code i’m using in my front page and forum template (within the menu):

    <li class="<?php echo $class; ?>">

    Not sure where i’m going wrong, any help would be much appreciated.

    Thanks

    #4414
    Sam Bauers
    Participant

    A first attempt at getting WordPress 2.7 and bbPress 1.0 to play nice again is now in trunk [1862].

    I’m specifically talking about “deep” integration, i.e. when you include WordPress inside bbPress to gain access to WordPress’ functions.

    This will need a lot of testing, so please post any issues you have on the relevant Trac ticket, #972 (which will stay open until some more testing has occurred).

    I recommend using the following code at the top of your bbPress bb-config.php file to include WordPress inside bbPress:

    if ( !defined( 'ABSPATH' ) ) {
    include_once( '/Full/Path/To/wp-load.php' );
    }

    Note that this includes “wp-load.php” not “wp-config.php” or “wp-blog-header.php”. This avoids running WordPress’ template loader which presumably isn’t needed inside bbPress. Some implementations may want it though, so if you find you need it then give it a go and let us know how that goes.

    Also note that all filters and actions set in WordPress whether default or added by plugins or themes are cleared out completely. That means that plugins and themes installed in WordPress cannot add filters or actions to bbPress at all. This may have some implications I’m not aware of yet.

    Go nuts!

    #69984
    chrishajer
    Participant

    Hiya Trent :-)

    #4410
    #69907
    _ck_
    Participant

    That’s because get_var only gets one item – the first and only.

    You want get_results which returns an array.

    Actually, even better in this case would be get_col which should return a flat array.

    Another trick to use on that query is possibly to include the topic_time as the end in the WHERE clause so that it doesn’t bother to pull up 10,000 topic id’s if the topic you are looking for is in the first 100

    global $topic;
    $query="SELECT topic_id FROM $bbdb->topics WHERE forum_id=$forum_id and topic_time<=$topic->topic_time ORDER BY topic_time DESC";
    $topic_array = $bbdb->get_col($query);

    We could take a huge shortcut and a bit of a gamble that no other topic has the same exact topic_time as this one and simply get the position via count, assuming it’s the very last one. Occasionally you might be a page short, or a page too many.

    global $topic;
    $query="SELECT count(topic_id) as position FROM $bbdb->topics WHERE forum_id=$forum_id and topic_time<=$topic->topic_time ORDER BY topic_time DESC";
    $position = $bbdb->get_var($query);

    Then you divide position by topics per page and you have the page it’s on.

    $page=ceil($position/bb_get_option('page_topics'));
    $link=get_topic_link(0,$page);

    #69906

    @_ck_ – The reason is, I have some breadcrumb links in the header of my edit_post.php file. It displays something like this:

    The Volturi’s Castle Forum » Forum Games » Count to 10,000 » Edit Post

    I have the topic link pointing to the exact position of the post being edited, and I want the forum link to point to the exact page of the topic as well. The code I have is this:

    <?php
    $forum_id = $bbdb->get_var("SELECT forum_id FROM $bbdb->posts WHERE post_id=" . get_post_id() . " LIMIT 1");
    $forum_name = get_forum_name($forum_id);
    /*$topic_array = $bbdb->get_var("SELECT topic_id FROM $bbdb->topics WHERE forum_id=" . $forum_id . " ORDER BY topic_time ASC");
    while ($topic_id = current($topic_array))
    if ($topic_id == get_topic_id())
    $topic_index = key($topic_array);
    $forum_page = get_page_number($topic_index);*/
    $forum_link = '<a href="' . get_forum_link($forum_id, $forum_page) . '">' . $forum_name . '</a>';
    ?>
    <a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php echo $forum_link; ?> &raquo; <a href="<?php post_link(); ?>"><?php topic_title(); ?></a> &raquo; <?php _e('Edit Post','rag'); ?>

    The commented stuff is what’s giving me trouble. When executed, it issues an error saying that $topic_array isn’t an object or array. I inserted an echo $topic_array;, and it spit out 3. The topic_id is 13, the forum_id is 6, and no matter what post I edit, the same number is echoed, so I have no idea where it’s getting 3.

    #69660

    In reply to: bbPress Facebook page

    _ck_
    Participant

    For those that haven’t been around awhile, code development on bbPress tends to happen in bursts. There will be little or nothing or just trivial bug fixes for a few months and then BAM, Michael and Sam will post a whole bunch more code.

    Just because you don’t get feedback on a problem from a developer doesn’t mean they don’t think it’s important, it just means they can’t make it a priority right now for some reason or another. Everyone would love bbPress to have every feature and every feature work amazingly but there simply aren’t enough people or hours available to make it happen. Every feature one person insists is absolutely critical is quite trivial to another person.

    Last but not least, be careful what you wish for. If bbPress had all the features like the more mature WordPress does, it would also share the same number of problems, backward incompatibilities and constant changes. If they did to bbPress what just happened in WordPress between versions 2.3 and 2.7, I would not be making plugins for it anymore (because they all would be broken). Since bbPress takes a slower path, it tends to get things more “right” the first time around.

    I think 2009 holds big things for bbPress.

    Someone new to bbPress a year from now might wonder what some early adopters were complaining about.

    #69656

    In reply to: bbPress Facebook page

    Sam Bauers
    Participant

    Kevin, the cookie and login integration that works with BB0.9 – WP2.5 also works with BB1.0 – WP2.6 or 2.7. The only issues remaining arise when you login via WordPress instead of bbPress, the simple fix for this is to redirect WordPress logins to bbPress, but I will be building a plugin to make this (and some other things) easier.

    The “deep” integration issues where people load WordPress inside bbPress are still outstanding, and as I said may never be resolved and might eventually be unsupported. The XML-RPC functionality being developed is intended as a launching pad for people who need bbPress data inside their WordPress installs, I also expect that there will be some functionality written to get data going in the other direction as well. We are using this already “internally” with the BuddyPress forums component which communicates with bbPress 1.0 to provide group forums and eventually other functionality to that software. There is also already a plugin to pull some basic data from bbPress to WordPress widgets.

    I don’t think you should blame Matt for XML-RPC being added either, I think it was mdawaffe who wanted pingbacks and I think I was the person who liked the idea of a complete XML-RPC server enough to actually write it.

    Features tend to forge ahead when they have a champion for them and as the only major contributor to the code at the moment that kind of leaves it up to me as to what gets done. There has only been a small amount of thorough and reported testing of deep integration done by users so far who are actually trying to make it happen (see #972). That doesn’t exactly excite me to work on a feature that neither I nor the company I work for particularly need, especially when I already have a low opinion of the technique in the first place. In the same breath though, I understand that others may want it and I’m not actively trying to stop it from happening either. If someone fixed, patched it and put it in Trac, I would commit it with a smiley emoticon and a “props” in capital letters.

    So in short, it needs someone to take the lead on it, if you want it done sooner rather than later.

    Talking about community discontent by referring to the contents of these forums seems a bit disingenuous. These are support forums which by their nature invite people to announce their problems, all we can tell by it is that some people have problems with the software, sometimes. I’m pretty sure we aren’t getting every user coming through here. It’s not a gauge, and perhaps the dreaded Facebook page will help us find the people who don’t post here a bit more easily, perhaps it is something that can be used to gauge what the community mood is like. If anything it might give me a little comfort to know that a few people out there like what we’re doing here. My development time isn’t a zero sum game, I didn’t steal 30 minutes from my “writing code” time to setup that page. I need to enjoy myself while I work, maybe doing that helped me get through that particular day. At the other end of the tubes is me, a person. Hi. Nice to meet you.

    On that personal note it isn’t nice to be blasted for something as cursory as not initiating topics in the forums for two months. I’ve been contributing to bbPress for almost two years now. There have been times when I’ve taken close to the full burden of support here, even before I worked for Automattic. Recently we got two community moderators who are very competent. _ck_ and chrishajer have been outdoing themselves around here. I have taken it a little easier for the past month while I focused on some other tasks.

    I’m really only catching up on some of the more recent goings on around here, including your very interesting threads about the overall direction of bbPress. I completely want those conversations to happen, you make good points there too and I like the general direction of what you are saying, even though you make incorrect assumptions about some details. I wish I had been there in real-time to discuss it, but I will try to respond where I can.

    Finally, bbPress is important to Automattic at the moment primarily as a tool for it’s own uses. Thus there is little or no promotion of it at this stage. If we gain some traction in the real world one day it might be treated like WordPress, but for now it will basically be whatever the people who contribute to it want it to be, and as usual when resources are limited, those who can write good bug reports or contribute real code will get their needs met first.

    #69655

    In reply to: bbPress Facebook page

    How is repeating that you’re not happy with integration, that it doesn’t work, that it fails, over and over again helping?

    Ticket #1007 has been opened, by SAM and that means developers agree. It is highest priority and flagged as critical. So look, they know, they agree, and they’re working on it. Can they tell you how long it will take? No. And instead of doing what my office tries to make me do (make up an answer) they gave you the truth. It will take as long as it takes. If that doesn’t work for you, then you should move on to something else. Because those are your options, unless you want to write the code yourself and offer it up.

    There are a lot of tickets (see https://trac.bbpress.org/report/1 ) and a small amount of coders. If you want to (and can) fix bugs, fix bugs. If you can only report on them, report. But once the report is there, badgering the techies to be smarter faster doesn’t help anyone. It pisses off the techs who are trying, but honestly, you can’t inspire creativity any faster than it naturally comes

    So thank you for reporting that integration sucks, and that the website implies something that isn’t exactly true – bbPress .9 works with WP 2.6, but it’s not full integration. That should probably be modified to say ‘shared login’ or such. There’s a ticket up for fixing real integration, so that is something that the dev team is aware of.

    #69978

    In reply to: forum exporter plugin

    You could probably do it with RSS. If you’re using wordpress, you can do this (I have it as a sidebar widget).

    <?php require_once (ABSPATH . WPINC . '/rss-functions.php');
    $today = current_time('mysql', 1);
    // insert the feed URL here
    $rss = @fetch_rss('http://www.domain.com/forums/rss');
    if ( isset($rss->items) && 0 != count($rss->items) ) {
    // set the number of items from the feed to display (6)
    $rss->items = array_slice($rss->items, 0, 5);
    foreach ($rss->items as $item ) {
    echo '<h1>';
    echo wp_specialchars($item['title']);
    echo '</h1>';
    echo '<p>';
    echo wp_specialchars($item['description']);
    echo <a href="';
    echo wp_filter_kses($item['link']);
    echo '">(Read More)</a>';
    echo '</p>';
    }
    }; ?>

    The main (all posts) RSS feed is: http://www.domain.com/forums/rss

    All subsequent forums (fori?) are: http://www.domain.com/forums/rss/<whatever&gt;

    Like this subforum would be: https://bbpress.org/forums/rss/forum/plugins

    This page would be: https://bbpress.org/forums/rss/topic/forum-exporter-plugin

    If you don’t have wordpress, look into MagpieRSS

    #69874

    This is code with an apostrophe ' in the middle.

    That would be a double plus good.

    #69654

    In reply to: bbPress Facebook page

    I’m really disappointed in this response actually. _CK_ is without a doubt the person who carries the most weight around here these days given her exceptional and continued support and development.

    Whenever we, as a community or an individual, say something that is negative about BBpress it is because we want to make it better. You said yourself in October that Sam wasn’t on the forums much, and as time goes on, mostly because of wordpress moving forward, BBpress has looked more and more stale/abandoned. I appreciate it’s a perception rather than reality, but surely you can see by the response that Sam’s first post in months was met with this reaction, is down to that feeling that’s been growing in the community for months now.

    Its not an attack on Sam, as a person, in anyway. It not an attack on BBpress or its code, its people who read one thing (or multiple things) and then find them out to be not true. its people who read new posts daily about “wordpress integration”

    “I’m not sure how many more times I can repeat that bbPress is pre-release software.”

    We know this, we don’t expect everything to work, we expect bugs, and we’re trying to report them back and be helpful. But we’ve been reporting 1 particular ind crucial bug back for over half a year now, with no info being forthcoming.

    “Every part of bbPress is subject to completely change and break overnight”

    We get this too. But, um, it broke over half a year ago!

    If it broke last night, last week, or last month then yeah i’d get it.

    But it broke a long long time ago.

    “there are no feature or bug priorities”

    Sam said there is (read up).

    You said there was last month (about XMLRPC – will find link to post).

    “If that bothers anyone, or they feel the need to rant about it, please stop using it asap”

    TO Be Honest, that sounds childish in my opinion.

    And not what i’d expect _CK_.

    “Integration is tricky because it was not a priority for bbPress”

    It wasn’t? wow.

    Ok, it wasn’t. Can we ask why?

    Again, it seems like the most asked about thing on the forum. Not just in terms of how often people ask, or that fact that there is a sticky on it, or that it’s the biggest word on the tag cloud by miles or… (i could go on, but i think we all know the point i’m getting at).

    “there is no such thing as a “standard” wordpress install”

    Yes there is. Download wordpress. input your database and password. hit install.

    Famous 5 min install remember.

    There is a standard wordpress install!

    “The radical changes to WordPress security in the past year have not helped at all with integration ease”

    We get that _CK_, we do, and we totally understand.

    But the change happened in WP2.6, then we had 2.6.1, 2.6.2 , 2.6.3 . 2.6.5, and now 2.7.

    BBpress / Automattic have had 7 month (minimum) to realise and fix this issue.

    I mean, and correct me if i’m massively wrong, but did security change in 2.6, or did it change drastically in every release? If it changed drastically in 2.6, 2.6.1, 2.6.2 , 2.6.3 . 2.6.5, and now 2.7; then yes i can see how that would be a huge issue and a moving target. but if it has stayed the same for 6 months (in all the WP2.6 releases) then frankly, it seems crazy to me that NO-ONE at automatic can be asked how security has changed.

    “So weigh your options and either stick with it or move on but please don’t rant against the very people trying to help the project”

    We’re not ranting against the people _CK_, there is nothing personal here.

    We want to help.

    We want to use BBpress, spread the word, fix bugs, make it better.

    But with this HUGE issue over our heads, we can’t, and thats what we’re trying to put across.

Viewing 25 results - 26,276 through 26,300 (of 32,481 total)
Skip to toolbar