Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 31,701 through 31,725 (of 32,462 total)
  • Author
    Search Results
  • #49480
    satellio
    Member

    @pompilos and lstelie

    I guess the change password bug (and general user-account editing bug) in the translated versions are triggered by the translation of this line in the bbpress/bb-includes/functions.php file:

    $profile_menu[0] = array(__('Edit'), 'edit_profile', 'edit_users', 'profile-edit.php', 'edit');

    If you translate 'Edit' by 'Editer' or 'Modifier', for example, users won’t be able to save their password change, and administrators won’t be able to save a role change for an user; the last part of the edit link — …/edit— will be changed to either …/editer or …/modifier. The page will display, but when you click on the save button, changes to the user’s profile won’t be saved.

    #52419
    lordcoder
    Member

    Ok if my PHP/MySQL knowledge is still good , the plugin must , on the first use , add a new collumn to bb_topics table ( named for example cat_id ) , and a new table titled bb_cats .

    On each use of the plugin , it must check if everything is good ( the collumn cat_id , the table bb_cats ) before continuing , and if not , it must display the default structure of the forum .

    To perform this last , there must be new template tags which can be ignored if the plugin installation is wrong , so the plugin needs its proper template file …

    We know that the goal of BBPress is to be light and fast , so if you code all the things above and use them on a plugin , BBPress will be slower , i think like PunBB …

    So my tip is ; don’t use categories , try to remove no useful forums , merge some forums if they are similar , and you’ill have a good order without categories .

    #52849
    lordcoder
    Member

    Ok , i see that my messages are incomprehensible ( normal , i am not a native english speaker ) , i ill try again ( my english will suck a little :P ) .

    I have this on my my-templates/footer.php :

    <?php if ( $bb_current_user->ID ) : ?>

    <li><h2 class="vcard">Profile</h2></li>

    <li>

    <?php profile_menu(); ?>

    </li>

    <?php endif; ?>

    My goal is to display the avaible profil options for the connected user if no other user’s profil is viewed .

    But it doesnt work until i dont go to another user’s profil and displays this error :

    Warning: Invalid argument supplied for foreach() in /home/httpd/bouazza/bouazza.franceserv.com/sbouazza/forums/bb-includes/template-functions.php on line 59

    And only one item is viewed , Profile , and it contains a bad link ( http://bouazza.franceserv.com/sbouazza/forums/profile/, without an user ID ) .

    But if i am viewing an user’s profil , the menu is correctly displayed , and allthing is fine .

    I Hope I can get more replys now .

    Thanks !

    PS : It will be great if we can speak here on this board in another language like French , German … espiecially for guys like me who ar’nt familiar with English :P .

    Bouazza .

    #49552
    chrishajer
    Participant

    The site issue and the database issues do seem like separate things. That was the first thing that caught my eye though (the URLs.)

    my database has bbpress_ tables (like bbpress_forums, bbpress_posts, etc) and wp_ tables (like wp_links, wp_users, wp_usermeta etc)

    My config.php (bbpress) has this for the DB stuff:

    $bb_table_prefix = 'bbpress_';

    $bb->wp_table_prefix = 'wp_';

    And mine just works with user integration like that. Is is possible that including the ‘http://dearauthor.com/wordpress/wp-config.php&#8217; is overwriting something? I didn’t have to include that, and just have the one other require there. Why is that included for yours (did you read something I didn’t maybe?)

    Looking at your original error:

    'dearauth_bbdb.wp_users' doesn't exist

    the table prefix there is set to dearauth_bbdb somehow. Maybe you forgot to close a quote or something? Or did you edit your config before posting it (i.e. it’s not the actual, but it’s edited without the same error maybe?) You didn’t post the MySQL and bbpress config stuff from the top of the config.php.

    Just guessing, but maybe we’ll get it.

    #49551
    JaneLitte
    Member

    I have tried that. It seems to me that it is not looking at either the right database (ie., the wordpress database is different than the bbpress database) or it needs to have the “bb_” prefix instead of the “wp_” prefix.

    i.e., when I change $bb->wp_table_prefix = 'wp_'; to $bb->wp_table_prefix = 'bb_';, I no longer get the error, but then I am also not getting the wordpress users either.

    #52823
    chrishajer
    Participant

    Hi Trent, Merry Christmas. I did install it and it apparently was working since someone got blocked :yikes: I could not find any logging anywhere, and to fix it yourself with the code provided

    > Your technical support key is: 0000-zzzz-yyyy-xxxx
    >
    > You can use this key to fix this problem yourself.

    you need to log in to the ioerror/homelandstupidity site here:

    http://www.ioerror.us/ip/

    But with the IP that was blocked. So, with no logging and no way to know why this legitimate user was blocked, I disabled it. I was looking at the logging a bit (using bad-behavior-wordpress.php as an example as suggested) but I haven’t figured it out yet. I was hoping there was a config section with four lines like WP or BB, where I could enter the DB details, but it’s not there :)

    So, turned off for now. It was doing something though, I just don’t know what or why.

    #49550
    chrishajer
    Participant

    I think if your blog is at dearauthor.com/wordpress, then

    $bb->wp_home and $bb->wp_siteurl are both wrong – they don’t point to the blog but just the domain name. I think they should be:

    $bb->wp_home = 'http://dearauthor.com/wordpress'; //

    $bb->wp_siteurl = 'http://dearauthor.com/wordpress'; //

    Also, your require once is different than mine, but that might be unrelated. This is the only one I have in my config.php:

    require_once( BBPATH . 'bb-settings.php' );

    I think the wp_home and wp_siteurl might be wrong. Did you go to WordPress – Options->General: Blog address (URL) and WordPress – Options->General: WordPress address (URL) and verify that the settings are the same there?

    #52793
    sewar
    Member

    Go to your database in phpMyAdmin, in table wp_usermeta you will see this row:

    user_id meta_key meta_value

    1 bb_capabilities a:1:{s:6:"member";b:1;}

    Change “meta_value” to: a:1:{s:9:"keymaster";b:1;}, So it will look like:

    user_id meta_key meta_value

    1 bb_capabilities a:1:{s:9:"keymaster";b:1;}

    #49549
    JaneLitte
    Member

    I am having problems with the integration. I installed the bbpress_integration on my wordpress blog which is installed at dearauthor.com/wordpress.

    I have a redirect that makes the blog address dearauthor.com

    I then installed the bb forum at dearauthor.com/forum.

    I set the bbPress Integration as bb_

    I have this in the config.php file for bbPress

    $bb->wp_table_prefix = 'wp_'; //

    $bb->wp_home = ‘http://dearauthor.com&#8217;; //

    $bb->wp_siteurl = ‘http://dearauthor.com&#8217;; //

    $bb->cookiedomain = ‘dearauthor.com’;

    $bb->cookiepath = ‘/’;

    require_once(‘http://dearauthor.com/wordpress/wp-config.php&#8217;);

    I am getting this error.

    bbPress database error: [Table ‘dearauth_bbdb.wp_users’ doesn’t exist]

    SELECT * FROM wp_users WHERE ID = 1 AND user_status % 2 = 0

    Anonymous`

    Thanks.

    #52819
    Trent Adams
    Member

    I would suggest using the following to stop the avatar plugin from working in the mobile version until I can figure out a way to make all images smaller or non-existant with this plugin.

    Put this over the code for the avatar plugin in post.php in /my-templates/

    <!-- Diable Avatar for BB-Mobile -->

    <?php if ( mobile_check() ) : ?>

    <!-- <?php post_avatar(); ?> -->

    <?php else : ?>

    <small><?php post_avatar(); ?></small>

    <?php endif; ?>

    <!-- Diable Avatar for BB-Mobile -->

    I have now tested this out and know that it works on my site.

    In fact, any code that you do not want shown or changed in the mobile version of your site can be elminated or changed with the following structure!

    <!-- Code for BB-Mobile -->

    <?php if ( mobile_check() ) : ?>

    CODE YOU WANT SHOWN ON MOBILE

    <?php else : ?>

    CODE YOU WANT SHOWN ON MAIN SITE

    <?php endif; ?>

    <!-- Code for BB-Mobile -->

    Trent

    #52847
    lordcoder
    Member

    I edited correctly the message , sorry if it was incomprehensible .

    I use that code on footer.php without modifying de template-functions.php file .

    Normally , it shows only the profil menu if a user’s profil is viewed , but i wanted that the profil menu will be displayed using the current user’s settings if no profil is viewed .

    #52846
    ardentfrost
    Member

    Where are you changing that? I assume you’re using my Private Messages plugin (hope you like it), and if you’re changing something in functions.php or template-functions.php you could have an adverse effect on plugins.

    I also don’t exactly understand why you would test if the current user has an ID. You might want to, instead, test if the current user can do something instead of having an ID.

    Plus, I don’t think you want to use || in that setup. You probably want to use && so that if the profile exists AND something else, then it’ll display it.

    Possibly all or none of the above :)

    #1153
    lordcoder
    Member

    Hi all ,

    i do experience a problem with my forum if i use :

    <?php if ( $bb_current_user->ID ) : ?>

    <li><h2 class="vcard">Profile</h2></li>

    <li>

    <?php profile_menu(); ?>

    </li>

    <?php endif; ?>

    instead of :

    <?php if ( is_bb_profile() ) : ?>

    <li><h2 class="vcard">Profile</h2></li>

    <li>

    <?php profile_menu(); ?>

    </li>

    <?php endif; ?>

    I wanted only that it displays the avaible profile menu for the connected user if no other profile is viewed , but it doesnt work and returns this error message :

    Warning: Invalid argument supplied for foreach() in /home/httpd/bouazza/bouazza.franceserv.com/sbouazza/forums/bb-includes/template-functions.php on line 59

    Can someone help me ?

    Thanks and merry christmas !

    Bouazza .

    #52076

    In reply to: Simply doesn’t work

    ===============SOLUTION==============

    Put the following in your .htaccess file (in the same directory as config.php):

    Options -Multiviews

    RewriteEngine On

    RewriteBase /

    RewriteRule ^forum/([0-9]+)/page/([0-9]+)$ /forum.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^forum/([0-9]+)$ /forum.php?id=$1 [L,QSA]

    RewriteRule ^topic/([0-9]+)/page/([0-9]+)$ /topic.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^topic/([0-9]+)$ /topic.php?id=$1 [L,QSA]

    RewriteRule ^tags/(.+)/page/([0-9]+)$ /tags.php?tag=$1&page=$2 [L,QSA]

    RewriteRule ^tags/(.+)/?$ /tags.php?tag=$1 [L,QSA]

    RewriteRule ^tags/?$ /tags.php [L,QSA]

    RewriteRule ^profile/([0-9]+)/page/([0-9]+)$ /profile.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^profile/([0-9]+)/([a-z]+)$ /profile.php?id=$1&tab=$2 [L,QSA]

    RewriteRule ^profile/([0-9]+)/([a-z]+)/page/([0-9]+)$ /profile.php?id=$1&tab=$2&page=$3 [L,QSA]

    RewriteRule ^profile/([0-9]+)$ /profile.php?id=$1 [L,QSA]

    RewriteRule ^view/([a-z-]+)/page/([0-9]+)$ /view.php?view=$1&page=$2 [L,QSA]

    RewriteRule ^view/([a-z-]+)$ /view.php?view=$1 [L,QSA]

    RewriteRule ^rss/$ /rss.php [L,QSA]

    RewriteRule ^rss/forum/([0-9]+)$ /rss.php?forum=$1 [L,QSA]

    RewriteRule ^rss/topic/([0-9]+)$ /rss.php?topic=$1 [L,QSA]

    RewriteRule ^rss/tags/([a-z]+)$ /rss.php?tag=$1 [L,QSA]

    RewriteRule ^rss/profile/([0-9]+)$ /rss.php?profile=$1 [L,QSA]

    #52844
    chrishajer
    Participant

    This has been covered in the forum before: https://bbpress.org/forums/topic/439?replies=2

    Seems like the problem is with the CSS:

    #profile-menu {

    list-style: none;

    position: absolute;

    right: 0;

    }

    The position:absolute and the right:0 cause it to be anchored all the way over on the right side of the screen. Not much that can be done with it on bbpress.org, but if you are using the same template, you can fix your own CSS.

    #52835
    chrishajer
    Participant

    Yes, remove the directory from $bb->domain.

    // Just the domain name; no directories or path. There should be no trailing slash here.

    $bb->domain = ‘http://www.kensavage.com/forums&#8217;;

    #52834

    I’d say change to

    $bb->domain = 'http://www.kensavage.com';

    Then it should work!

    #52812
    chrishajer
    Participant

    Works for me too. Now to do something like “WP Since Last Visit” from Alex King.

    Also, I made the same change in forum.php on lines 16 and 25 for consistency.

    edit: Oops, just looked through the files and that need to be changed in lots of places. I lost track already…

    #1146
    Trent Adams
    Member

    I have another post in the forum, but if you are interested in using a great software package that limits spam and server attacks before they access the site, then you might be interested in Bad Behavior. I really like it because it really decreases the load on the server as well.

    While they do not have a plugin for bbPress and creating one isn’t in the cards right now, you can do it by downloading the newest Bad Behavior release and placing it as a folder in the root of your bbPress installation.

    After that, you just need to call it. I did this by adding the following to config.php after the /* Stop editing */ part.

    require_once( BBPATH . '/Bad-Behavior/bad-behavior-generic.php');

    That is the easy way without a plugin. Just thought I would share it for those that are interested.

    Trent

    #52800

    In reply to: Plugin: Summon user

    UPDATE

    Sorry … there was no ability to select “nobody”.

    Download here:

    http://la-school.com/2006/downloads/summon_1_0-fix.zip

    Sorry =)

    #52811
    vaelrith
    Member

    thanks :)

    #52810

    I think there is no plugin needed for this. It only requires a small template change in front-page.php.

    Just replace in line 37:

    topic_link();

    with

    echo get_topic_last_post_link($topic->topic_id);

    … I think it should work.

    #1143

    Topic: Plugin: Summon user

    in forum Plugins

    I just made another quick plugin. You can specify a user to be noticed by mail about the recent topic. Read more here:

    http://bbpress.org/forums/topic/458

    To install put the file into your /my-plugins folder and add

    <p>

    <label for="summon_user_id"><?php _e('Summon:'); ?>

    <?php summon_user_dropdown(); ?>

    </label>

    </p>

    behind the last endif; to your /my-templates/post-form.php

    Download here:

    http://la-school.com/2006/downloads/summon_1_0.zip

    merry christmas.

    #1141
    Null
    Member

    Well I’ve created this form but it aint updating the db. What am I doing wrong?

    function update_portal($number_of_topics) {

    global $bbdb, $bb_table_prefix;

    $bbdb->query("UPDATE ".$bb_table_prefix."portal SET number_of_topics = '$number_of_topics'");

    }

    if ($_SERVER['REQUEST_METHOD'] == "POST")

    {

    update_portal($_POST['number_of_topics']);

    }

    // Show form

    function portal_form() {

    ?>

    <h2><?php _e('Management'); ?></h2>

    <form action="" method="post">

    <?php do_action('update_portal',''); ?>

    <h3><?php _e('Portal settings'); ?></h3>

    <table>

    <tr><th scope="row"><?php _e('Number of topics on the portal:'); ?></th>

    <td><input type="text" name="number_of_topics" id="number_of_topics" /></td>

    </tr>

    </table>

    <p class="submit alignleft"><input type="submit" value="Submit" name="submit">

    </form>

    <?php

    }

    Thx

    #50208

    In reply to: About Freshness

    ryuuguu
    Member

    I have not really investigated the what problem in the code is so I am not sure what things should be set to. I set my GMT offset to to get right (+9) and my posts started showing right then changed $hours around until I got freshness right in my case it was -18, but all I can suggest is get the post time right by changing $bb->gmt_offset and then use $hours to bring freshness time into line. This plugin is really only a tempory fix till later beta version bbpress fixes the code properly.

Viewing 25 results - 31,701 through 31,725 (of 32,462 total)
Skip to toolbar