Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26,251 through 26,275 (of 32,466 total)
  • Author
    Search Results
  • #70077

    In reply to: Arabic Translation

    Sam Bauers
    Participant

    Except unicode for usernames, that will be fixed by allowing unicode display names in bbPress 1.0

    #66200
    Sam Bauers
    Participant

    We do unicode display names in bbPress 1.0, but not usernames.

    #69988
    Sam Bauers
    Participant

    $_SERVER['REQUEST_URI'] can be dodgy, _ck_’s code cleanup is probably a little safer.

    #70028
    Sam Bauers
    Participant

    @johnjamesjacoby

    The login forms don’t pass around nonce values generally, so it should be of no concern.

    What happens as of right now is that the role map you setup in the admin area only gets applied to new registrations either when you save the changes on that role map form or when the new WordPress user who is missing the role in bbPress logins in through bbPress.

    On your site as it is right now this never occurs because you force all logins through WordPress. Just now in trunk I have changed that so that just visiting the bbPress site with a valid cookie will set your role in bbPress.

    I suspect that all the problems with loging out in your case are going to come down to having a bunch of stuff manually set in your wp-config.php and bb-config.php

    Here’s what I think you should do…

    1. Update bbPress to the latest trunk version
    2. Remove any hardcoded settings in bb-config.php and wp-config.php WRT integration
    3. Install this brand spanking new plugin (get the trunk version for the moment) http://svn.wp-plugins.org/bbpress-integration/trunk/
    4. Recheck your integration settings in bbPress – don’t hardcode anyting into bb-settings.php
    5. Configure that plugin in WordPress
    6. Copy the wp-settings.php lines specified in that plugin to wp-config.php (probably only one line for you)

    Let us know how that goes.

    #70026
    ganzua
    Member

    OK, this is fixed in trunk now. Just a stupid error on my part in a new function.

    I’ll see if it’s possible to re-release the 1.0-alpha-3 or maybe just bump up to 1.0-alpha-4.

    So, what did it happen? Is it the fix already included in the download right now? I’d like to give it a try :)

    #67833

    In reply to: Get Current Forum ID?

    I modified your code to the following and it worked:

    <li<?php if ($current_forum_id=get_forum_id()) {echo ” class=’on'”;} ?>>

    Thanks a lot CK, much appreciated.

    #69915
    watson
    Member

    Thanks both of you for answering… This is just such a great forum :)

    #69987
    Trent Adams
    Member

    I will be around more again now ;) Been a busy year! Thanks for the cleanup code _ck_ and I will test it tomorrow. Hi back to everyone ;)

    Trent

    #69986
    _ck_
    Participant

    Untested code cleanup (just for fun – untested)

    function force_login_init() {
    if (!bb_is_user_logged_in() && !preg_match("/(bb-login|bb-reset-password|register|xmlrpc).php/s",$_SERVER['REQUEST_URI'])) {
    nocache_headers();
    header("HTTP/1.1 302 Moved Temporarily");
    header("Status: 302 Moved Temporarily");
    bb_safe_redirect( bb_get_uri( 'bb-login.php', null, BB_URI_CONTEXT_HEADER + BB_URI_CONTEXT_BB_USER_FORMS ) );
    exit;
    }
    }

    Good to see you Trent, don’t be a stranger!

    #67832

    In reply to: Get Current Forum ID?

    _ck_
    Participant

    Why not just do it all in the li:

    <li<?php if ($current_forum_id==get_forum_id()) {echo " class='on'";} ?>>

    #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!

Viewing 25 results - 26,251 through 26,275 (of 32,466 total)
Skip to toolbar