Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 30,976 through 31,000 (of 32,432 total)
  • Author
    Search Results
  • #54866
    mvashistha
    Member

    I am also looking for same thing. I would really appreciate any help in this regard.

    Can I use bbpress functions as library functions in my code to register user in bbpress, login in bbpress and logout from bbpress programmatically?

    If there are some direct functions available for these needs, please let me know.

    Thanks in advance.

    #54754

    This is awesome! Thanks :D!

    #53877

    In reply to: Bozo problem

    Also, it is only happening with Akismet on. I removed my Akismet key and it’s now working fine, but I’m afraid that this is going to leave me open to spammers :-/

    #1457
    tzangms
    Member

    Today I am integreating wordpress and bbpress, it’s works fine, but after I set BBLANG to my language(zh_TW), this message below shows up.

    “Fatal error: Cannot redeclare class streamreader in /path/to/bbpress/bb-includes/streams.php on line 26”

    Coz StreamReader class has been declared in wordpress, but bbpress will declare it again in ‘bb-settings.php’, this coz the error.

    here is the code in ‘bb-settings.php’

    Code:
    include_once(BBPATH . BBINC . ‘streams.php’);
    include_once(BBPATH . BBINC . ‘gettext.php’);

    I use class_exists to avoid these two files, ‘streams.php’ and ‘gettext.php’ to be include twice.

    the code came into these:

    Code:
    if (!class_exists(‘StreamReader’))
    include_once(BBPATH . BBINC . ‘streams.php’);

    if (!class_exists(‘gettext_reader’))
    include_once(BBPATH . BBINC . ‘gettext.php’);

    then it works! bbpress came back to normal, but my language file seems not to be loaded.

    After all, I find out, that bbpress uses wordpress function after integrate, so I place my .mo file into /path/to/wordpress/wp-includes/languages/ , then, my language file finally loaded. but ….. here is another problem, the .po of wordpress and bbpress will mess up into one file. but I want my wordpress not to be translated. ><

    #53566
    skrimpy
    Member

    Ok I seem to have it working now. I did have display-name.php installed. I think the problem was with another plugin: bb-limit-latest-discussion.php. I took that plugin down and the forum restriction plugin began to work properly.

    I still get an error when I put in my display name; however it does give me access to the forum category. This afternoon I’m going to work on getting all the forum categories set up the way I want and I’ll let you know if it seems to be working right for everyone.

    I like the limit discussion plugin because it makes for a cleaner forum; however having restricted access to forum categories is more important to the purpose of my boards so I’m just going to leave the limited discussion plugin off for now.

    thanks David :)

    #54833

    In reply to: .htaccess/Cookie woes!

    Ziyphr
    Member

    I had a look at the WP code but haven’t had a chance to look at bbPress’ yet. Would like to hear your solution. One thing I noticed was when you try entering www on here it filters them out.

    #53875

    In reply to: Bozo problem

    chrishajer
    Participant

    I was only going off this reply by peiqinglong (different user?):

    https://bbpress.org/forums/topic/643?replies=17#post-3815

    Trent,

    That’s the problem, there is no box to uncheck them anywhere in their individual profile, where they are listed as Bozos, etc.

    “No box to uncheck” was the part I caught. I’ve seen it mentioned before too and wondered if that was part of the real problem. (edit: maybe since this is a few weeks old this is the one I was remembering)

    This was a different, but possibly related problem (where unchecking the box never “stuck” – you’d always be a bozo – that was in 0.73 though I think):

    https://bbpress.org/forums/topic/312?replies=4#post-1525

    Also, I didn’t follow this from mdawaffe:

    There’s nothing in the admin for this (sad, I know).

    You need to edit that user’s profile.

    But, as key master you CAN edit the user’s profile, from admin. So I didn’t follow this part either.

    I thought the crux of the problem was that there were no boxes visible in the admin, where I have boxes, as expected. That is all :)

    edit: PLEASE change the style.css to include some styling for [blockquote] – my quotes were quoted up there but you can’t tell. Indent, different font, different BG color, something.

    #1455
    chrishajer
    Participant

    Here is the section of akismet.php that I saw that led me to believe I could assign a level to a user to make them ‘trusted’:

    In akismet.php, around line 119:

    function bb_ksd_check_post( $post_text ) {
    global $bb_current_user, $bb_ksd_pre_post_status;
    if ( in_array($bb_current_user->roles[0], bb_trusted_roles()) ) // Don't filter content from users with a trusted role
    return $post_text;

    #53873

    In reply to: Bozo problem

    chrishajer
    Participant

    Trent, maybe I misunderstand. There is a box on the edit tab of my user’s profiles that says “this user is a bozo” and it’s normally unchecked (there was an issue with .73 and the admin being checked bozo, but that doesn’t appear to be an issue any more.)

    See this admin user screenshot and normal user screenshot, both of the edit tab in the profiles. Is that what is missing from the OP’s install? I wasn’t asking for anything that doesn’t exist. It sounded to me like this box that I see does not show up sometimes. That’s the confusion for me.

    edit: also, I saw on the source somewhere that users of a certain level could be whitelisted to skip the akismet check, but maybe that’s not implemented yet.

    In akismet.php, around line 119:

    function bb_ksd_check_post( $post_text ) {
    global $bb_current_user, $bb_ksd_pre_post_status;
    if ( in_array($bb_current_user->roles[0], bb_trusted_roles()) ) // Don't filter content from users with a trusted role
    return $post_text;

    That I asked about before, for sure:

    https://bbpress.org/forums/topic/728?replies=1

    #53602
    fel64
    Member

    Hey,

    I just wanted to say that I just installed bbPress in a subdomain from my forum and got the cookie syncing to work fine.

    Much thank to Trent, who provided half the solution:

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

    made it so that forum-generated cookies worked for the entire website. I had to go into wordpress root and edit wp-settings.php line 190:

    define(COOKIE_DOMAIN, '.example.com');

    I do not understand how it worked previously, as it defined it simply as false (I assume that the browser will automagically substitute the domain that the user is currently on?). However, hardcoding the domain worked for me, and as long as I remember to change this in future upgrades I should be fine.

    I did have troubles, especially logging out, while testing all this, and found that it’s vital to clear your cookies manually as the wordpress/bbpress logouts were clearing different cookies and you could stay logged in despite trying to log out.

    But yeah, I’m all good. :) Thanks guys.

    #54802
    macwise
    Member

    Ok, this is the solution that worked for me. I did have to add the rewrite rule, as multiviews isn’t working on my server??? (I think I’m running on php4, is that why?) So, for others who want a wal-mart type bb build ;) here’s a recap of what I did:

    I created a page in my bbpress root called contest.php. Inside of that page I put:

    <?php
    require('./bb-load.php');
    bb_load_template( 'contest.php' );
    ?>

    I then created my contest.php page with the content I needed (the template)

    The last thing I did was to put these two lines in my .htaccess file IN MY FORUM ROOT FOLDER, (not my wordpress root folder):

    RewriteRule ^contest/$ /forum/contest.php [L,QSA]
    RewriteRule ^contest$ /forum/contest.php [L,QSA]

    This basically says that myurl.com/my/forum/directory/contest (without the trailing backslash)

    and myurl.com/my/forum/directory/contest (with the trailing backslash)

    will both point to the contest.php page in the root forum directory.

    As so1o said, this last part in .htaccess may be unnecessary if you have multiviews enabled (if your .htaccess file in your FORUM directory has this line: “Options +MultiViews”). Maybe someone else can confirm/deny this, as my configuration is different.

    Hope this helps someone else who needs some custom functionality out of bbpress.

    #54801
    so1o
    Participant

    macwise..

    if you are ok hacking the code.. create a page contest.php in the root forum folder

    add require_once('./bb-load.php'); on the top of the page. and write whatever code you want in the page.. that should create a static page with bbpress functions..

    as far as rewrite is concerned.. im not 100% sure but i think multiviews will automatically translate /contest.php to /contest/. test it and see.

    #54800
    macwise
    Member

    bbolman,

    thanks for the idea. I would probably prefer to do this. However, I have a few bbpress functions being called in the code on the page, and though I could probably dig about and find out how to replace it with wp code, it was not the most pleasant thought. I figured I’d just throw a page up on the bbpress side, and have it resolve at a myurl.com/directory/ as is common with wordpress. I found out how to take care of this…I achieved this by adding two lines in the .htaccess file…

    RewriteRule ^contest/$ /forum/contest.php [L,QSA]
    RewriteRule ^contest$ /forum/contest.php [L,QSA]

    I’m not trying to start a battle here, but I think your response, Null, might be a bit short-sighted and aggressive. After all, if I feel my software needs a static page, that may just be what it in fact does need.

    I agree with bbolman that this would probably be more efficiently handled by wordpress. However, since bbpress is still in it’s infancy, and it’s not integrated fully yet with wordpress, (this is my way of trying to sound like I’m not a completely right-brained individual), I think it’s fair to say that these decisions aren’t so cut and dried. Anyway, I appreciate the responses all the same, and will post any further findings here…

    #54829

    In reply to: .htaccess/Cookie woes!

    macwise
    Member

    Ziyphr,

    Thank you so much for your reply. I think this is really the solution that I have been looking for. It just doesn’t make sense to me to only have one subdomain registered in the cookies, and I wasn’t sure how wordpress handled the adding of a subdomain.

    I am still moderately new to php, so I’m not sure I follow the last paragraph in terms of proper form and syntax, and so I’d prefer to ask that “stupid question” rather than sound smart and fail. ;). Can you let me know exactly what you think should go there, in terms of syntax? That would be greatly appreciated.

    P.S. It sounded like you meant to say “You should NOT need to use .htaccess? Just checking to be sure…

    Thanks so much for your help.

    #54828

    In reply to: .htaccess/Cookie woes!

    Ziyphr
    Member

    You should need to use .htaccess. Best thing is to override the way cookies are created. For WP these are in wp-settings.php around line 185. To have a shared cookie for the whole site I changed the cookie scope replacing:

    codeif ( !defined(‘COOKIEPATH’) )

    define(‘COOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, get_option(‘home’) . ‘/’ ) );code

    With:

    codeif ( !defined(‘COOKIEPATH’) )

    define(‘COOKIEPATH’, ‘/’ );code

    Setting the www bits etc can be done in a similar way. Assuming you’ve integrated your users, if you set the cookie path to ‘/’ with domain .babyquestions.101.com you should be fine.

    #54618

    In reply to: Plugin: bbMenu 1.0

    Null
    Member

    Hi,

    What kind of items would you like to add? Is it a plugin page like the memberlist plugin, or a link to another website, or a link to your homepage.

    The last one is technically hard to do cause of the way bbPress id’s there pages. bbMenu uses this to highlight the menu item when you are on a certain page. Since your homepage proberbly doesn’t support/use this, you can add an item in the menu, but it proberbly wouldn’t highlight when you are on that page.

    Hope you understand what I mean…

    If you want to add an “off-link” (the link goes to wikipedia or something) you could add this into bbmenu.php (not tested):

    At the bottom find:

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

    Underneeth it add:

    echo '<li><a href="link-to-your-thingy.com">Thingy-name</a></li>';

    (Ignore the this forum adds them when editing this topic)

    This should add a new link ad the end in your menu, but you will not see it in the admin, or be able to put it anywhere else… It will also not be highlighted when you are on that page (in case you use it to go to your homepage)

    #54668

    In reply to: Import SMF to bbPress

    lonemadmax
    Member

    OK, if you are lucky and the server isn’t dead as it usually is, you may get it here.

    Remember, no guarantees. I hadn’t even read php before messing with that script.

    #52384
    giantsfan
    Member

    FYI, I modified the plug-in slightly to prevent moderators from messing with other forums they are not assigned to by this plug-in in bbpress version 0.8.

    changed function forum_moderators_process_capacities in forum-moderators.php, added some additional filters:

    $filtering_caps = array(

    'manage_topics' ,

    'edit_closed' ,

    'edit_deleted' ,

    'browse_deleted' ,

    'edit_others_tags' ,

    'edit_others_topics' ,

    'manage_posts' ,

    'ignore_edit_lock' ,

    'edit_others_posts',

    'delete_posts',

    'delete_topics',

    'close_topics',

    'stick_topics',

    'move_topics',

    'moderate'

    );

    added filters:

    delete_topics’,

    ‘close_topics’,

    ‘stick_topics’,

    ‘move_topics’,

    ‘moderate

    don’t know exactly what I’m doing but that hacked seemed to do what I want.

    #1453
    marky
    Member

    Don’t ask me how (I always find a way to do stuff like this), but I managed to delete the keymaster for my forum. :-)

    Since my forum is “live” and I don’t want to lose posts, re-installing isn’t really an option for me. Is there some way I can modify the database directly to grant keymaster permissions to an existing user?

    In bb_usermeta, I found a column with data like this: a:1:{s:6:"member";b:1;} that I think might be the key to doing what I want, but changing the word “member” to “keymaster” doesn’t seem to do the trick. What should I do?

    #54823
    marky
    Member

    Thanks! Worked like a charm. :)

    #1451
    marky
    Member

    I switched from phpBB to bbPress recently thanks very much in part to a script found in these forums.

    Now, many of the existing posts contain links to each other in the old phpBB format /topic.php?t=123. Since the topic IDs have stayed the same in the conversion process, I’d like to use ModRewrite to automatically redirect to the new /topic/123 URL scheme. I’ve tried the following in my .htaccess, but it doesn’t appear to work. (Admittedly, my knowledge of ModRewrite is shaky at best.)

    RewriteEngine on
    RewriteRule ^/forums/viewtopic.php?t=([0-9]+)$
    /forums/topic/$1 [R]

    (In the real code there isn’t a linebreak on the second line.)

    Does anyone have any advice?

    #1449
    dcfridge
    Member

    I am using Basic-authentication for all of other authentication and access control on my site, and would like to have bbPress detect that and leverage $ENV{‘REMOTE_USER’}

    Is this possible? Has anyone done it, that can share the code?

    Thanks,

    – Dave

    #53088
    spencerp
    Member

    cre8tive, I’ll try and get up a downloadable zip archive of the theme soon. I’ve just been so busy lately sigh, that I haven’t had much time on the bbPress/WP side of things.. I’ll keep you posted though.. ;)

    spencerp

    #54265
    spencerp
    Member

    Is this going to get submitted into the SVN trunk for 1.0 soon, or..? I’m really hoping so, all this “applying patches” is getting tiresome and confusing, sigh.

    It’s one of the main reasons I haven’t even upgraded my bbPress forums to the latest full .80, with category enhancement, just seems pointless… =(

    spencerp

Viewing 25 results - 30,976 through 31,000 (of 32,432 total)
Skip to toolbar