Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 31,351 through 31,375 (of 32,468 total)
  • Author
    Search Results
  • #53035
    Trent Adams
    Member

    If you edit your style.css sheet in /bb-templates/ and go down to the portion that says:

    /* Topic Page

    =================================== */

    That is where you will need to edit your file. I am not sure, but changing this one might be what you are looking for:

    .threadauthor small { font: 11px Verdana, Arial, Helvetica, sans-serif; }

    Trent

    #50585
    Trent Adams
    Member

    No problem zapata. To get rid of the register link, you need to download login-form.php from /bb-templates/ and then edit it as follows:

    Change this part from:

    <p><?php printf(__('<a href="%1$s">Register</a> or log in'), bb_get_option('uri').'register.php') ?>:</p>

    to get rid of the register, you could just comment out this line or change the wording:

    <! -- <p><?php printf(__('<a href="%1$s">Register</a> or log in'), bb_get_option('uri').'register.php') ?>:</p> -->

    Once you have edited that file, upload it to a new folder (if it doesn’t exist already in root) /my-templates/ as bbPress will use that file first and if it doesn’t exist, go back to the one in /bb-templates/

    As for the registering with WordPress, I was only referring to the abilitity to turn on or off registration in WP admin. If you turn it off, then you can add the members you want through the admin.

    That should get you going!

    Trent

    #50581
    zapata
    Member

    Trent,

    WOEEEZZZZZZZZZAAAAAAAAAAA…. sorry for the excitement… the code works!!!!!

    Gurus… one request… how can I completely “Eliminate” anonymous user registration… the goal of my forum is for a private discussion of authors who write on the main blog to communicate with each other. Hence all users of the forum will be actually authors of the blog.

    #50579
    Trent Adams
    Member

    From Ardentfrost.

    <?php

    /*

    Plugin Name: Force Login

    Description: No one can see your forums unless they are logged in.

    Plugin URI: https://bbpress.org/forums/topic/117

    Author: Michael D Adams

    Author URI: http://blogwaffe.com/

    Version: 0.7

    */

    function force_login_init() {

    if ( !bb_is_user_logged_in() && false === strpos($_SERVER['REQUEST_URI'], 'bb-login.php') ) {

    if ( file_exists( BBPATH . 'my-templates/login.php' ) ) {

    require( BBPATH . 'my-templates/front-page.php' );

    } else {

    require( BBPATH . 'bb-templates/front-page.php' );

    }

    exit;

    }

    }

    add_action( 'bb_init', 'force_login_init' );

    ?>

    That will work.

    Trent

    #53627
    chrishajer
    Participant

    Usually those “cannot modify header” errors are due to whitespace before the <?php or at the end after the ?>

    Is that possible?

    #50578
    zapata
    Member

    Trent, Thanks for the quick reply. There are no errors. The objective was to hide the forums from everyone who is not logged in. For this the mdawaffe’s plugin (code posted in his post above) was working on my initial install (0.74)… but I’ve installed the 0.75 yesterday and reinstalled the plugin, but upon logging out, I’m still able to browse the forums…

    the url: passionforcinema.com/club

    #53621
    spencerp
    Member

    Awesome! Thanks Sam! I’ll jump on all of this real soon. Thanks again! :D ;)

    spencerp

    #53633
    spencerp
    Member

    Yep, and, even though Michael Adams made the newer version of the bbPress Integration plugin. Ryan Boren added two stubs in the 2.1 wp-includes/ folder, holding the same name as the original two.

    So, these two calls:

    require_once( ABSPATH . WPINC . ‘/registration-functions.php’ );

    include_once (ABSPATH . WPINC . ‘/rss-functions.php’);

    In any WordPress or bbPress plugins, you’ll still be safe! Inside those two stubs are:

    registration-functions.php file:

    <?php

    // Deprecated. Use registration.php.

    require_once(ABSPATH . WPINC . '/registration.php');

    ?>

    rss-functions.php file:

    <?php

    // Deprecated. Use rss.php instead.

    require_once (ABSPATH . WPINC . '/rss.php');

    ?>

    Happy 2.1 Upgrading and bbPress Integrating peoples.. :D ;)

    spencerp

    #53625
    Null
    Member

    Found the bug.

    When loading the admin it also includes the new file: menuhead.php. In that file there is a line: <?php ajax_show_javascript(); ?> and that gives this error: <b>Fatal error</b>: Call to undefined function ajax_show_javascript() in <b>bb-admin/menuhead.php</b> on line <b>6</b>

    Why is that? Well the new admin page DOES use this ajax_show_javascript but all others don’t. That also explains that only the menu admin page is working and all others aint.

    But how the hell can I fix this? Will an if work? If page = admin-base.php?plugin=menu_admin_page include menuhead.php or something? Any other suggestions?

    At the moment, menuhead.php is called using a include or is this fixed if I use the new admin_head hook in 0.8?

    #53618
    Null
    Member

    Quote:

    ...the new and improved 0.8 version that should be released pretty soon...

    Stop teasing us!!!

    :)

    #53617
    spencerp
    Member

    The only thing I’m worried about now is, the fact that I’m running the Forum Category enhancement. I’ve currently modified the 0.8alpha files, however, I haven’t gotten the “latest” svn commits yet, including what you’ve mentioned above..

    I *could* just manually keep editing my files, as they come through the email list, but IMHO, it’d be more of a pain in the arse that way sigh. I guess what I’m saying is, I’d love it if they’d implement that Forum Category option into 0.8, rather then 1.0.

    It’s running just fine for me, except for customizing the look of it and such. The other thing is, it’s really a pain in the arse as it is now, because I’ve implemented my blog’s theme around the forums themselves.

    So either way, I’m screwed with tons of file edits. :( I don’t know though, I’m too tired at this point to even do any file editing/uploading.. Maybe when I get up later, I’ll handle some of this stuff..

    As for the plugins, I’m hoping Josh takes care of his lol. His plugins are about the only plugins I have going, besides the normal original bbPress plugins lol. Anyway, enough of my rambling, I’m tired as heck, and everyone’s tired of it anyway… so.. later people..

    spencerp

    #53411

    In reply to: for each question

    Null
    Member

    Got it fixed, this topic can be deleted :D

    #53590

    bb_update_option( 'forum_restriction_db', array( "1" => "David Bessler,testman", "3" => "David Bessler" ) );

    $value = bb_get_option( 'forum_restriction_db' );

    That’s how it should work.

    #53594
    Anonymous User 96400
    Inactive

    yeah, i’m using polyglot for my wp blog. now, having something like this for bbpress would be just awesome. users being able to post in different languages. but maybe that’s wanting a bit too much right now.

    i had a look at the code aready, but it’s just too complicated for me. all this php code…

    #53420
    ardentfrost
    Member

    I’m not absolutely sure about this, but it seems that SQL will want you to be more explicit. You need to break up the list (4 and 1) and add different strings to the where. So, for the first add WHERE forum_id = 4 then do OR forum_id = 1. Every subsequent forum id query should also start with an OR.

    That’s what I think at least. It’s worth a shot :)

    #1243
    davidbessler
    Member

    When I use the following code in a plugin:

    function forum_restriction_get_topics_where_plugin( $where ) {

    if ( is_front() ) {

    $list_of_allowed_forums = "4,1";

    $where = "WHERE forum_id IN ('$list_of_allowed_forums') ";

    $where .= " AND topic_sticky <> 2 ";

    return $where;

    } else {

    return $where;

    }

    }

    add_filter ( 'get_latest_topics_where', 'forum_restriction_get_topics_where_plugin' );

    I expect it to list the topics belonging to forums with ID 4 and ID 1. Instead, it is only listing topics with forum 4. When I change them to (1,4) it only lists 1. It seems it is only seeing the first value in the string. Any ideas why?

    #53409

    In reply to: for each question

    ear1grey
    Member

    ...current"; }

    i.e.

    ...current"SEMICOLON }

    ?

    #53408

    In reply to: for each question

    Null
    Member

    Still no luck :(

    I have this:

    <?php

    global $bbdb;

    $r = mysql_query("SELECT * FROM $bbdb->menu WHERE set = 'active' ORDER BY order ASC");

    while($rw = mysql_fetch_array($r))

    {

    $class="";

    if ($rw['is']) { $class .=" current" }

    echo '<li><a class="$current" href="'.$rw['page'].'">'.$rw['item'].'</a></li>';

    }

    ?>

    Which is the same code as yours, but I still get the error:

    Parse error: parse error, unexpected '}' on header.php on line 84

    And line 84 contains the if:

    if ($rw['is']) { $class .=" current" }

    I am totally lost here :S

    #53595
    Trent Adams
    Member

    I would try the cookie sharing stuff in both bbPress config.php:

    $bb->cookiedomain = '.lumanation.com';

    $bb->cookiepath = '/';

    And then maybe the cookie stuff that you can put in WordPress wp-config.php (can’t remember the format) if the first stuff just doesn’t work out straight away.

    If the users are there it is because the integration is working, just the cookies are not sharing. Try that out and let me know.

    Trent

    #1274
    ateale
    Member

    hey guys,

    i have followed the instructions on the forums/extend for intgegrating bbpress and wordpress.

    It all seems to work – bbpress knows about the wordpress users.

    Only problem is that i have to login to both wordpress & bbpress seperately – I thought it was supposed to support 1 login for both – using the same cookie or something?

    the test site is:

    blog.lumanation.com

    the forums link at the top takes you to the bbpress install

    any help would be greatly appreciated! :)

    also – any ideas on how to embed the bbpress install into wordpress – is it just a matter of hacking up the bbpress templates or is there a more elegant way similar to the wordpress rs-discuss/xdforum plugins?

    Cheers!

    Adam

    #53507

    In reply to: Changing a Domain name

    spencerp
    Member

    You’re welcome Startribe.. :) ;)

    spencerp

    #53407

    In reply to: for each question

    ear1grey
    Member

    <?php

    global $bbdb;

    $r = mysql_query("SELECT * FROM $bbdb->menu WHERE set = 'active' ORDER BY order ASC");

    while($rw = mysql_fetch_array($r)) <strong>{</strong>

    $class="";

    if ($rw['is']) { $class .=" current" }

    echo '<li><a class="$current" href="'.$rw['page'].'">'.$rw['item'].'</a></li>';

    }

    ?>

    #53406

    In reply to: for each question

    Null
    Member

    Can you give me a code example, cause i keep getting the error :(

    #53405

    In reply to: for each question

    ear1grey
    Member

    the while looks like it needs curly brackets adding to it or you’re just going to repeatedly set $class="" then remove the curly bracket above the echo.

    #53404

    In reply to: for each question

    Null
    Member

    Hmm got this now:

    <?php

    global $bbdb;

    $r = mysql_query("SELECT * FROM $bbdb->menu WHERE set = 'active' ORDER BY order ASC");

    while($rw = mysql_fetch_array($r))

    $class="";

    if ($rw['is']) { $class .=" current" }

    {

    echo '<li><a class="$current" href="'.$rw['page'].'">'.$rw['item'].'</a></li>';

    }

    ?>

    But this gives me an error:

    Parse error: parse error, unexpected ‘}’ on line 71

    Think I have misplaced something here?

    Greetz

    ps I didn’t include $uri=option("uri").$rw["page"]; at all cause I wanted to test this first. So I keep it out for now…

Viewing 25 results - 31,351 through 31,375 (of 32,468 total)
Skip to toolbar