Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 31,676 through 31,700 (of 32,432 total)
  • Author
    Search Results
  • #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’; //

    $bb->wp_siteurl = ‘http://dearauthor.com’; //

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

    $bb->cookiepath = ‘/’;

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

    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.

    #1142

    Basically I’m working on a plugin for bbpress that will skip wordpress all together ( no offense wordpress :-) )

    Frankly I think wordpress is too advanced for the average “myspace” type user / target visitor. And, I want to have a community like system like myspace or livejournal.

    So I want to basically add a blog section to bbpress where you can keep a private journal… with privacy options on each blog entry to either Private or Public, and if you select Public it will put it in a Forum as a new topic for people to discuss.

    I was hoping to get a few pointers as to what functions to look at to help me achieve this through bbpress or if I should even continue doing this and try to customize wordpress-mu instead to fit the visitor

    Heres what I have looked at so far:

    1) Add new topic / Write blog

    bb-templates/post-form.php

    ......

    <label for=”forum_id”><?php _e(‘Pick a section:’); ?>

    <?php forum_dropdown(); ?>

    </label>

    <!– DIRT_PRIVACY –>

    Set the privacy:

    <select name=”dirt_privacy” id=”dirt_privacy” tabindex=”6″>

    <option value=”public” selected>Public</option>

    <option value=”private”>Private</option>

    </select>

    <small>**Choose ‘Private’ if you want this to be a blog only readable by you</small>

    <!– END DIRT_PRIVACY –>

    <?php endif; ?>

    <p class=”submit”>

    <input type=”submit” id=”postformsub” name=”Submit” value=”<?php _e(‘Send Post’); ?> »” tabindex=”4″ />

    bb-includes/functions.php -> bb_new_topic();

    function bb_new_topic( $title, $forum, $tags = '' ) {

    // function bb_new_topic( $title, $forum, $tags, $dirt_privacy = ” ) {

    global $bbdb, $bb_cache, $bb_current_user;

    $title = apply_filters(‘pre_topic_title’, $title, false);

    $forum = (int) $forum;

    $now = bb_current_time(‘mysql’);

    if ( $forum && $title ) {

    // if ($dirt_privacy==’public’){

    // ADD AS NORMAL TOPIC HERE (depending on whether ‘adding new topic’ or ‘writting new blog’, determine whether to add as default normal Forum Topic (public) or include in users blog but also as public Blog Forum Topic

    $bbdb->query(“INSERT INTO $bbdb->topics

    (topic_title, topic_poster, topic_poster_name, topic_last_poster, topic_last_poster_name, topic_start_time, topic_time, forum_id)

    VALUES

    (‘$title’, $bb_current_user->ID, ‘{$bb_current_user->data->user_login}’, $bb_current_user->ID, ‘{$bb_current_user->data->user_login}’, ‘$now’, ‘$now’, $forum)”);

    $topic_id = $bbdb->insert_id;

    if ( !empty( $tags ) )

    add_topic_tags( $topic_id, $tags );

    $bbdb->query(“UPDATE $bbdb->forums SET topics = topics + 1 WHERE forum_id = $forum”);

    $bb_cache->flush_many( ‘forum’, $forum_id );

    do_action(‘bb_new_topic’, $topic_id);

    return $topic_id;

    //} elseif ($dirt_privacy == ‘private’) {

    // ADD TO DB AS PRIVATE BLOG HERE

    //}

    } else {

    return false;

    }

    }

    Sorry if I’m a bit confusing as I am a bit confused right now :-)

    Again, any functions/documentation/help I should look at would be appreciated.

    -BHensley.com

    -Bakedlog.com

    #52195
    weirdtherapy
    Member

    the easiest way would be a link to a zip to download it I think :)

    I just tried to piece it together with the information from the sourcecode … and I think it might be done, but for me it looked easier to build it new.

    The CSS file as jonlandrum metioned would be a start for it, but it’s still a bit of work to do because it doesn’t use all the same id’s (like rap instead of wrapper).

    #50206

    In reply to: About Freshness

    ryuuguu
    Member

    I wrote a quick plugin to correct this it is at

    http://www.ryuuguu.com/wordpress/2006/12/22/correcting-bbpress-freshness-1/

    you will need to edit

    $hours=-18;
    [code]
    to find the right number for your offset

    [code]

    $hours=-18;

    to find the right number for your offset

    [code]

    to find the right number for your offset

    #52785
    cgavin
    Member

    Right, cant fix the timezone as I have no idea what time zone it is in. Its 3000 miles away.

    Cant be bothered with this – clicking a topic redirects me to my WordPress homepage? Eh?

    Then it says the admin user I created and logged in as 10 mins ago doesnt exhist anymore. Riight.

    Think I’ll stick with something more mature.

    See you when bbpress gets there init. ;)

    Thanks again, but I dont have anymore time to waste ..

    I just spunked 3 hrs on this! Thats more than enough ..

    #52784
    cgavin
    Member

    Fun fun fun.

    :)

Viewing 25 results - 31,676 through 31,700 (of 32,432 total)
Skip to toolbar