Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26,726 through 26,750 (of 32,466 total)
  • Author
    Search Results
  • #68283

    In reply to: HELP!

    Shagalaga
    Member

    Come on guys! PLEASE help me :-(

    #67928
    nekita
    Member

    Hi chris and thank you for your suggestion.

    I looked into the function you mentioned in template_functions.php which would be around here:

    function bb_profile_data( $id = 0 ) {
    if ( !$user = bb_get_user( bb_get_user_id( $id ) ) )
    return;

    $reg_time = bb_gmtstrtotime( $user->user_registered );
    $profile_info_keys = get_profile_info_keys();
    echo "<dl id='userinfo'>n";
    echo "t<dt>" . __('Member Since') . "</dt>n";
    echo "t<dd>" . bb_datetime_format_i18n($reg_time, 'date') . ' (' . bb_since($reg_time) . ")</dd>n";

    The problem is that this functions gets the data from the currently logged in user, or so I would assume, given that it’s the data for that specific profile.

    But in order to display the registration date for each user in a topic I’d need to call the data for each user individually.

    #55732
    cayoba
    Member

    ok I changed the require once to this code

    $bb->WP_BB = true;

    if (file_exists(‘../wp-blog-header.php’))

    require_once(‘../wp-blog-header.php’);

    else

    if (file_exists(‘../../wp-blog-header.php’))

    require_once(‘../../wp-blog-header.php’);

    it got rid of the errors, however, now when i click on the admin link, after logging in, it just refreshes the page and does not bring me to the admin so now im exactly where victor is with his problem

    #67926
    nekita
    Member

    Hmm, still didn’t figure out the syntax for this. :(

    #4130
    chrishajer
    Participant

    WordPress 2.6.2 svn checkout r8849

    bbPress trunk svn checkout r1794

    I installed WordPress first and that went fine. I logged in and changed my password. Then I went to install bbPress. bbPress installation appeared to go fine. I used simple keys with WordPress so that bbPress wouldn’t choke on them.

    I got to the final step and got a message “There were some errors encountered during installation!” and then I checked off “Show messages” to reveal the following:

    “Forum could not be created!” (that may have been visible before revealing the messages as well – I can’t recall.)

    After that, I tried to access the forum anyway, but I get an error in Firefox3:

    Redirect Loop

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    The browser has stopped trying to retrieve the requested item. The site is redirecting the request in a way that will never complete.
    * Have you disabled or blocked cookies required by this site?
    * NOTE: If accepting the site's cookies does not resolve the problem, it is likely a server configuration issue and not your computer.

     

    There is no .htaccess in the WordPress directory or in the bbPress directory. bbPress was installed in a subdirectory of WordPress.

    /var/www/htdocs/ch/wordpress

    /var/www/htdocs/ch/wordpress/forums

    Any ideas?

    #68106
    chrishajer
    Participant

    Right, it is more complex than that. Since the function returns an array it’s up to you do figure out how to display it. Also, looking at the widget code is a pretty good start of how to go about getting the data out of that array. And the readme file is also good.

    #68105
    patung
    Member

    Fair enough I don’t know php from my elbow, it’s just with other plugins, including some you can use as a widget, if you don’t use the widget they tell you what code to stick in the sidebar and it’s usually just like <?php call_to_some_function(); ?> but if this is more complex than that then ok.

    Btw ignore what I said about cpu usage, I can’t re-create it so must have been something else.

    chrishajer
    Participant

    Looks like the key I posted in the beginning there is not properly escaped within code blocks either. You can see the original key here, and how I posted it. If you check the source of that post, you can see how bbPress parsed it.

    More info here, in the original format:

    http://www.chrishajer.com/bbpress/wp-key.txt

    chrishajer
    Participant

    d\EtHv;aK&V9;)L@rZ7-{P~u}~C~”N4O]=Cnw1pl=c2 !6-~b6!VHt9n;>&Tj-

    That was my AUTH_KEY for WordPress 2.6.2 which was working fine. When I tried to integrate bbPress, it apparently read that key, but on step three of the installer, I saw this error:

    http://www.chrishajer.com/bbpress/installer-step-3.png

    As you can see, part of that key is displayed there (&Tj-) and I suspect it shouldn’t be, and was not being used properly in this case.

    I wonder if this is why so many people are having log in/log out issues with WordPress integration. I am going to try a plain vanilla key (alphanumeric only) and see how that works.

    #68104
    chrishajer
    Participant

    It’s not a secret, it’s just not bbPress specific, it’s PHP. You need to loop through the array that is returned by that function. If you’re not comfortable learning enough PHP to accomplish that with the function, maybe you’d be better off the the widget. That’s why WordPress created widgets in the first place. It’s for people who don’t want to mess with PHP code. It’s drag and drop. Maybe enabling widgets in your theme would be easier than learning the proper way to loop through this array.

    #64335
    myu
    Member

    hi,

    tried the mb_encode_mimeheader() thing.. but can’t get it to work as desired. :(

    could i please get a bit more of instruction where to put it in with what parameter(s)?

    —-what i have tried


    towards the end of function bb_mail() in bb-includes/pluggable.php

    $headers = trim(join(defined('BB_MAIL_EOL') ? BB_MAIL_EOL : "n", $headers));

    //--added--
    $headers = mb_encode_mimeheader($headers, 'utf-8', 'B', defined('BB_MAIL_EOL') ? BB_MAIL_EOL : "n");
    //--end add--

    return @mail($to, $subject, $message, $headers);

    Although it shows fine as it comes on my Apple Mail, as momo-i and somebody else mentioned, utf8 can get garbled…

    Thank you in advance

    #68103
    patung
    Member

    Ok, so it’s a secret… ;)

    This is what I tried <?php bbpress_live_get_topics(); ?>

    and also <?php bbpress_live_get_topics("1"); ?>

    Don’t know if they are right, but anyway I just noticed it says it needs 2.6.2 and I just use 2.6.

    Also, would this plugin make any special claims on cpu and load average, because I suspect it might, just by activating, not even using it on a page?

    #68249

    In reply to: No avatars show up

    chrishajer
    Participant

    Avatars are turned on the the admin settings?

    Do you have this in your template’s post.php:

    <?php post_author_avatar_link(); ?>

    Also, this appears in profile.php:

    <?php if ( $avatar = bb_get_avatar( $user->ID ) ) : ?>

    <div id="useravatar"><?php echo $avatar; ?></div>

    <?php unset($avatar); endif; ?>

    #68261

    In reply to: wordpress Header

    chrishajer
    Participant

    Follow the instructions in the last section of this page:

    https://bbpress.org/documentation/integration-with-wordpress/#func

    You want access to the WordPress functions get_footer() and get_header() so you need to include WordPress in your bbPress.

    #51607

    In reply to: Google Adsense

    lenen-nl
    Member

    I’m a bit scared messing around with the adsense code.

    #68235
    Shagalaga
    Member

    no volunteers? :-(

    #4120
    agitainment
    Member

    Hi.

    I recently installed bbPress on my WordPress site here at http://agitainment.com/ics/forum/.

    I’ve built a theme based on 1col_fixed 1.1 (I believe it’s kakumei with most of the CSS stripped out). In any case, when I go to my forums I can see my Gravatars and default avatars in kakumei, but when I switch on my theme they disappear.

    Is there a php file I’m missing or a block of code somewhere I need to copy over from the kakumei theme to get these to work? If so, where should I put the code?

    Thanks!

    #4115
    wiseacre
    Member

    Hi. This si not a true plugin – just a stupid script for removing “deleted” topics and posts from the DB. Thanks in advance for any feedback.

    $link=mysql_connect("host","user","password");
    mysql_select_db("database");
    //delete topics metadata
    $res=mysql_query("SELECT topic_id FROM bb_topics WHERE topic_status>0;") or die(mysql_error());
    while($row=mysql_fetch_row($res)) {
    mysql_query("DELETE bb_meta.* FROM bb_meta WHERE object_type='bb_topic' AND object_id=$row[0];") or die(mysql_error());
    };
    mysql_free_result($res);

    //delete posts metadata
    $res=mysql_query("SELECT post_id FROM bb_posts WHERE post_status>0;") or die(mysql_error());
    while($row=mysql_fetch_row($res)) {
    mysql_query("DELETE bb_meta.* FROM bb_meta WHERE object_type='bb_post' AND object_id=$row[0];") or die(mysql_error());
    };
    mysql_free_result($res);

    //delete topics & posts
    mysql_query("DELETE bb_topics.* FROM bb_topics WHERE topic_status>0;") or die(mysql_error());
    mysql_query("DELETE bb_posts.* FROM bb_posts WHERE post_status>0;") or die(mysql_error());
    mysql_query("DELETE bb_meta.* FROM bb_meta WHERE meta_key='deleted_posts';") or die(mysql_error());

    //some extras - attempt to "correct" autoincrement
    $row=mysql_fetch_row(mysql_query("SELECT MAX(topic_id) FROM bb_topics;"));
    if($row[0]!="") {
    $correct=$row[0];
    }
    else {
    $correct=1;
    };
    mysql_query("ALTER TABLE bb_topics AUTO_INCREMENT=$correct;") or die(mysql_error());

    $row=mysql_fetch_row(mysql_query("SELECT MAX(post_id) FROM bb_posts;"));
    if($row[0]!="") {
    $correct=$row[0];
    }
    else {
    $correct=1;
    };
    mysql_query("ALTER TABLE bb_posts AUTO_INCREMENT=$correct;") or die(mysql_error());

    $row=mysql_fetch_row(mysql_query("SELECT MAX(meta_id) FROM bb_meta;"));
    if($row[0]!="") {
    $correct=$row[0];
    }
    else {
    $correct=1;
    };
    mysql_query("ALTER TABLE bb_meta AUTO_INCREMENT=$correct;") or die(mysql_error());

    mysql_close($link);

    #4112
    meitershaker
    Member

    Hello,

    i have a problem with the rss feed of topics: many topics have only the title displayed, with “1/01” date :/ why?

    Bye

    #68221
    threevisual
    Member

    thanks, I download the latest zip file from the link provided but I’m now getting the following error:

    Warning: bb_install(/home/wired/public_html/bbpress/bb-includes/backpress/functions.core.php) [function.bb-install]: failed to open stream: No such file or directory in /home/wired/public_html/bbpress/bb-admin/class-install.php on line 106

    Fatal error: bb_install() [function.require]: Failed opening required '/home/wired/public_html/bbpress/bb-includes/backpress/functions.core.php' (include_path='.:/usr/php4/lib/php:/usr/local/php4/lib/php') in /home/wired/public_html/bbpress/bb-admin/class-install.php on line 106

    #68098
    patung
    Member

    I don’t have widgets enabled….so what do I do with this – bbpress_live_get_topics()

    I mean what code do I actually put in the sidebar theme file?

    #68228
    restivz77
    Member

    I have been googling around for solutions to this issue for like 10 hours straight and I can’t find anything :( any help would be really appreciated. thanks!

    #4108
    threevisual
    Member

    Hey, I thought I’d try out the latest 1.0 alpha release (2) but when I go to install I get the following error:

    Fatal error: Call to undefined function: bb_glob() in /home/wired/public_html/forums/bb-admin/class-install.php on line 322

    Any idea how to fix this? One for the bugs list?

Viewing 25 results - 26,726 through 26,750 (of 32,466 total)
Skip to toolbar