Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 28,226 through 28,250 (of 32,481 total)
  • Author
    Search Results
  • #57816
    _ck_
    Participant

    Omegacool has a wp.com site too, there are download links there as well:

    http://mundoarroba.wordpress.com/2007/05/24/theme-misty-para-bbpress/

    (ps. it’s bbShowcase.org I decided bbpressshowcase was just too long and too many sss’s ;-)

    #62926
    _ck_
    Participant

    If you cannot get into admin panel it’s one of two reasons:

    1. cookie hashes & paths don’t match

    2. you do not have the proper role set under bbpress as administrator

    The 404’s may be caused by turning on slugs without multiviews or proper mod_rewrite rules. If you have slugs turned on, turn them off temporarily (in your config.php) until you solve the other problem. ie.

    $bb->mod_rewrite = false;

    I am betting on the role not being set in bbPress that’s preventing you from getting to the admin panel. This can be inspected/fixed via phpmyadmin. I’ve been meaning to write an auto-load plugin to fix this issue automagically.

    UPDATE:

    I’ve whipped up a little plugin to restore proper admin access roles for both bbPress and WordPress without having to tinker in phpmyadmin:

    http://bbshowcase.org/plugins/fix_admin_access.zip

    Copy this to your plugins directory in bbPress OR WordPress (not both). Then access bbPress or WordPress (whichever you used). Then test you can access admin panel. Then DELETE the plugin off your server. There is no reason to leave it there.

    (you MUST leave the leading underscore “_” on the plugin name which makes it auto-load without having to activate it first. I have not tested it from the WP side but in theory should be fine.)

    #2900
    t3ch33
    Member

    This code is supposed to go in bb-admin/install.php for the plugin that allows users to post anonymously. My bbpress was already active when I discovered the plugin, so, of course, i didn’t want to run the install file again. So, can you translate this for me so that I can possibly make the changes manually? Thanks. The code is as follows:

    bb_update_usermeta( '0', $bb_table_prefix . 'capabilities', array('anonymous' => true) );

    #62963
    t3ch33
    Member

    hans3, thank you. that worked. :)

    #55749

    In reply to: Anonymous posting

    t3ch33
    Member

    This is almost working for me. My bbpress was already active, so i didn’t want to run the modified install file. Here is the code that’s in the bb-admin/install.php file:

    // Anonymous User
    $now = bb_current_time('mysql');
    $bbdb->query("INSERT INTO $bbdb->users (user_login, user_registered)
    VALUES ('anonymous', '$now')");
    $bbdb->query("UPDATE $bbdb->users SET ID = '0' WHERE user_login = 'anonymous'");
    bb_update_usermeta( '0', $bb_table_prefix . 'capabilities', array('anonymous' => true) );

    Since my bbpress is already active, I have manually updated my users table by following the guideline in the above code. But, I have no idea what the last line of code means: bb_update_usermeta( '0', $bb_table_prefix . 'capabilities', array('anonymous' => true) );

    Can you modify it so that I can manually update the db or do whatever needs to be done to make it work? Thanks.

    #50219
    3ring
    Member

    Hey Mods;

    (Tried to install plugin, got fatal error, so tried code file edit…)

    I just want one post to have reverse order, so I tried:

    if ( !$bb_db_override ) :

    if ($topicid == '54') {

    $posts = get_thread( $topic_id, $page, true );

    } else {

    $posts = get_thread( $topic_id, $page );

    }

    $forum = get_forum ( $topic->forum_id );

    $tags = bb_get_topic_tags ( $topic_id );

    But it doesn’t seem to recognize the topic id – it displays all posts normally? Am I assuming wrongly that the topic_id is the number after “/topic/##” in the thread url?

    Can you see anything I’m doing wrong? How do I isolate a single post to be reverse order?

    Thanks!

    #62955
    t3ch33
    Member

    looks like i had a bad install. sorry for the panic. :)

    #62880
    rosebud
    Member

    I figured it out. Thanks anyhow.

    <php if ( $user_id == 1 ) : // User number one ?>

    #62952
    chrishajer
    Participant

    bbPress does not create the .htaccess file. You have to manually create it with a text editor either on the server, on locally, then upload it. The file can contain one of two things:

    1. Options +MultiViews

    or

    2. visit http://website.com/dir/bb-admin/rewrite-rules.php

    That script will generate the rules you need to put in your .htaccess file. Use this if the first option does not work.

    If you cannot get permalinks working, just change the mod_rewrite line to false in your config, so you can at least use your forum until you get permalinks working.

    $bb->mod_rewrite = false;

    #62934

    In reply to: Edit topic title

    chrishajer
    Participant

    As keymaster, if you log in and edit the first post in a topic, you have access to editing the title. If you created the topic as a user, there is a limited amount of time that you can go back and edit your own post. By default, I think the limit is 60 minutes, set in the config.php with $bb->edit_lock = 60;.

    #62912
    chrishajer
    Participant

    dreamsofthequill: since _ck_ caught the session issue, I recalled that dotq.org also had a session in the response:

    u39872340:~/riverside/bbpress-831 >  time curl -I dotq.org
    HTTP/1.1 200 OK
    Date: Wed, 13 Feb 2008 21:33:49 GMT
    Server: Apache
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Pragma: no-cache
    X-Pingback: http://dotq.org/xmlrpc.php
    Set-Cookie: PHPSESSID=263b0ed23debf73f72bb98c377fb5fbb; path=/
    Content-Type: text/html; charset=UTF-8

    real 0m5.749s
    user 0m0.004s
    sys 0m0.000s

    Maybe the issues are the same?

    #62910
    chrishajer
    Participant

    noyz319: I would try a stock installation of bbPress without the WordPress stuff. The require_once wp-blog-header.php seems to be fouling it up.

    #2883
    darkling235
    Member

    I have the code to work with the new field in the DB all ready and tested. To test it I just created a new column in the user table manually. Is there a way to do it automatically on install?

    I.E. bbpress creates a bunch of tables and fields when it is first activated, how can I alter what tables are created and what columns they possess?

    #62903
    chrishajer
    Participant

    Can you force godaddy to use PHP5 instead of PHP4 by making this change to your .htaccess?

    AddType x-mapp-php5 .php

    Put that line at the top of your WordPress .htaccess if GoDaddy allows PHP5. I could not tell from your server response which version of PHP is being used. You could create a file called info.php with this in it:

    <?php
    phpinfo();
    ?>

    then put it somewhere accessible via browser, then load it up. It will tell you the version of PHP being used. Try it before and after making that change to the .htaccess file.

    Call that info.php then load it in a browser at whatever URL you choose.

    I am curious to see if using PHP5 will make the 404 errors go away…

    #62899
    319
    Participant

    I’m still getting the 404 about 95% of the time in IE. The front page of the forum usually loads, but clicking back and forth into some of the sub forums etc.. gives me a 404 pretty much every time, does this not happen for you in IE?

    Not exactly sure what that command line response means, but in the forum directory there isn’t a .htaccess file, there used to be one in there when i had first tried to setup pretty permalinks, but i removed it that a few days ago when i found out bbpress + slugs + godaddy hosting does not work (which i don’t really understand but have given up on for now).

    And our wordpress .htaccess file is pretty standard i think:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    A pretty large segment of our visitors use IE, so i don’t think we’ll be able to launch the forum as is with this error occuring.

    #62898
    chrishajer
    Participant

    OFFTOPIC: I hate the fact that code in backticks has changed 0.8 em recently. It’s nearly unreadable. They must be working on the site since there have been a couple other CSS changes recently as well. Looks like the changes were made about a week ago.

    #62897
    chrishajer
    Participant

    noyz319: the site loads for me in Firefox and IE, but when checking the server response from the command line, it gives a 404 error.

    u35452940:~ > time curl -I clutchmagonline.com/forums/
    HTTP/1.1 404
    Date: Wed, 13 Feb 2008 18:14:13 GMT
    Server: Apache
    Cache-Control: no-cache, must-revalidate, max-age=0
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Pragma: no-cache
    X-Pingback: http://clutchmagonline.com/xmlrpc.php
    Set-Cookie: PHPSESSID=cec9b723687a4a88fc83b4a528c2017a; path=/
    Last-Modified: Wed, 13 Feb 2008 18:14:15 GMT
    Content-Type: text/html; charset=UTF-8

    real 0m1.550s
    user 0m0.004s
    sys 0m0.000s

    Is it possible that you have an .htaccess file with rewrite rules that would do something like this? That’s kind of interesting that it returns a 404 error but still loads the forum. Maybe there’s an ErrorDocument directive that directs the 404 error to the forum index page?

    Weird.

    The server response has been consistent though between IE, FF and command line, so I wouldn’t worry too much about the fact that it only happens sometimes. There is one thing making the 404 error happen on all browsers. I wonder what that is…

    #62789
    chrishajer
    Participant

    The default role is set in bb-includes/capabilities.php around line 485

    $user->set_role('member');

    This is a job for a plugin, but I haven’t tried to write one yet, so if you were to change that word member to inactive, my guess would be that that would make any new member inactive and then the keymaster would need to edit their role to make them members.

    ACTUALLY – that didn’t work :D

    In bb-includes/pluggable.php, line 361 says this:

    bb_update_usermeta( $user_id, $bb_table_prefix . 'capabilities', array('member' => true) );

    I changed member to inactive there, and now new users are inactive when they first register.

    Like I said, this is really a job for a plugin, but you could probably use this last change temporarily until a proper plugin is written.

    HTH, and be warned this is not a good way of doing it. It should really be a plugin I think.

    #62891
    chrishajer
    Participant

    The dotq.org site is REALLY slow, like the server is overloaded or the pipe to it is overloaded or something. It loaded for me in Firefox, once, but in IE it timed out after 60 seconds or something.

    When I did it with the command line, it took almost 58 seconds, and that’s browser independent. I think the problem is that the server is slow, or the software running the site is slow, one or the other.

    u35878210:~ > time curl -I dotq.org
    HTTP/1.1 200 OK
    Date: Wed, 13 Feb 2008 15:59:37 GMT
    Server: Apache

    real 0m57.898s
    user 0m0.004s
    sys 0m0.000s

    lucaiz
    Member

    hello all.

    I have tried some search about this but did not find anything.

    I’d need the new users on a bbPress forum to be set to Inactive by default.

    the reason is I need to set up a forum for an experiment in secondary schools. we have to take in account the possibility of rude behavior from people not participating to the experiment.

    the administrator is not likely to be very present on line, so it would be a problem if anybody could just register and start posting indesiderable contents, that could sit there for a while.

    a temporary fix would be setting the default role for users to Inactive (the administrator then has the possibility to verify that the user is really who he say to be). I’ve tried to look into the code, but was not able to figure it out how to do it. hints would be welcomed.

    another option (the one I’m currently adopting) is removing the register function and putting something like “write to this email address if you want to be registered”, then using this plugin to allow administrator to add users:

    http://bbpress.org/plugins/topic/admin-add-user/

    but this is not how really we want it to be. an example of it is the “candidate” system used in vanilla forum: you candidate yourself to be a member of the forum, and if admin agree then you’re in. (why then not using vanilla? because there’s a graphic customization people have worked into, and we are running very short on deadline, say the url is in this morning newspaper… :-) ).

    I’d also be grateful for any other suggestions.

    #62863

    In reply to: Error

    chrishajer
    Participant

    Change this line in your config.php:

    $bb->mod_rewrite = slug;

    to this:

    $bb->mod_rewrite = false;

    That should fix the problem. Your server configuration does not support the .htaccess rewriting rules you have set up. Changing this to false turns off the need for mod_rewrite and .htaccess. You can get them working later.

    Also, it’s possible the might work if you spelled and quoted it properly. It should be

    $bb->mod_rewrite = 'slugs';

    and that will work if your server supports mod_rewrite and you have the proper .htaccess rewrite rules in place.

    #62862

    In reply to: Error

    jompen8
    Member

    amazing ty so much!

    BUT I discorverd a new big problem doh :(

    Look here:

    http://www.jompen8.byethost13.com/wordpress/bbpress/

    whatever i click on, for example the thread “Your first topic” , I came to my wordpress site :s

    I dont want that ;/ All this problems. I´m sorry but if u can help me for the 111 time i would be so happy.

    Is it something with the config-file again?

    Best Regards

    Johan

    #62860

    In reply to: Error

    chrishajer
    Participant

    I think for bb-plugins.php, you would need to make this change:

    if ( function_exists( 'glob' ) && is_callable( 'glob' ) ) {
    foreach ( glob(BBPLUGINDIR . '_*.php') as $_plugin ) {
    $_data = bb_get_plugin_data( $_plugin );
    $_plugins[$_plugin] = $_data ? $_data : true;
    }
    }

    That’s the whole block of code from trunk. Looks like they test now to see if glob is callable, then actually call it. That should fix your glob problem.

    #62859

    In reply to: Error

    chrishajer
    Participant

    Regarding the glob thing – you are going to need the same sort of fix for the glob anywhere it’s used in bbPress since your host disabled it. You would have to grep through all the code and say something like:

    if ( function_exists( 'glob' ) && is_callable( 'glob' ) ) {
    whatever test that used to use glob;
    }

    Not sure the best way to deal with that.

    #2884
    rosebud
    Member

    I would like to know if there is a particular template tag to check (in profile for example) what user that profile belongs to.

    i.e if is user id=x then do sth.

    It might sound strange, given that the profile already takes care of this. But I need to add some data to only a few users, and that data can’t be “user-editable”. If this could be done with the custom profile fields plugin (add some fields which are only admin editable) then, please, instruct me.

    Otherwise, I just need to hardcode the data for these few users.

    Thanks in advance.

Viewing 25 results - 28,226 through 28,250 (of 32,481 total)
Skip to toolbar