Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 24,251 through 24,275 (of 32,468 total)
  • Author
    Search Results
  • #76513
    Gautam
    Member

    Hey! Plugin fixed :D

    Posting the link in a few mins

    #76339
    deadlyhifi
    Participant

    I do this on one of my forums (a classified forum that I didn’t want users ‘bumping’ on constantly.) Just add

    <?php
    if ($forum_id == 3) {
    $limit = bb_get_option('page_topics');
    $offset = ($page-1)*$limit;
    $forum_one_topics = $bbdb->get_results("SELECT * FROM $bbdb->topics WHERE forum_id = $forum_id AND topic_status = 0 AND topic_sticky = 0 ORDER BY topic_id DESC LIMIT $limit OFFSET $offset");
    $forum_one_topic_posts = get_thread( $topic->topic_id);
    $topics = $forum_one_topics;
    }
    ?>

    to the top of the forum.php file in your template. Take out the if ($forum_id == 3) { and trailing } if you want to apply it to all your forums.

    To show topic creation date instead of freshness replace topic_time(); with get_topic_start_time(); in the forum.php, and front-page.php template files – though I haven’t tested that bit.

    #76498
    Markus Pezold
    Participant

    Puh … so easy.

    In my theme for the profile menu was lost. :(

    <?php if ( bb_is_profile() ) profile_menu(); ?>

    #74256

    Just finally got around to doing this. The .htaccess method worked awesomely.

    To clarify for anyone else reading this, you’ll want to put the above .htaccess code in your WordPress .htaccess file, because that’s where the bbPress requests will still be hitting. You can remove the .htaccess file in your bbPress directory using this method.

    grassrootspa
    Member

    Hey fellow bbPress enthusiasts,

    I have just spent forever playing with PHP trying to get the name generated by “Last Poster” in Latest Discussions on Forum or Front-Page to link to THAT user’s bbPress profile.

    My apologies if I am missing an easy “<a href=” command to surround the php in:

    <td class="num"><?php topic_last_poster(); ?></td>

    Nothing seems to work.

    Many thanks as my brain has been fried working on this.

    #76525
    chrishajer
    Participant

    I think bb_head() calls bb_template_scripts() and I think bb_template_scripts() enqueues jquery when you are on the profile-edit.php page. So, I think just just need to ensure this is in your header.php in your template:

    <?php bb_head() ;?>

    If you already have that, then I’m not certain what the problem is. You could always hard code the call to jQuery, but that seems lame.

    #76467
    chrishajer
    Participant

    Shouldn’t it be:

    define( 'BB_LANG', 'ja' );

    Underscore between BB and LANG?

    And, you should be installing the language file in a “my-languages” folder, on the same level as my-plugins and my-templates.

    #76522
    _ck_
    Participant

    A little curiosity and trial and error will take you far when learning how to accomplish things.

    If you look on front-page.php you’ll see it uses forum_description() so you can try

    <?php forum_description(); ?> in your topic.php template.

    If that doesn’t work, you may need to specify the $forum_id

    <?php forum_description($forum_id); ?>

    #67805

    In reply to: Enhanced Profile

    ArnyVee
    Member

    Link does not work :(

    #75763

    Yes, you’ll just have to fetch the username and then have the same username in bbPress and then edit your comments-template.php inside your WordPress template. :) I don’t have the time to fully explain it though, but i will do it myself soon actually so… :)

    #15396
    jdschu
    Member

    I’ve been digging through a lot of the bbPress code trying to find a way to do this with no success. I want to require people to have a certain email address (_____@certainwebsite.com) in order to register. I feel like this should be really easy to do, but I’m still not very skilled in both bbPress and PHP.

    #76501
    _ck_
    Participant

    Since bbPress 1.0 is now making directories on it’s own from PHP it will cause problems for people on many hosts, because it will be created by the root/nobody owner and a local ftp will not be able to delete it because you don’t have the permissions as a regular user.

    You’d need a short PHP program to delete those as the PHP owner.

    <?php
    rmdir("/var/www/vhosts/illuminatus.tv/httpdocs/illuminatus/bbpress/my-templates");
    rmdir("/var/www/vhosts/illuminatus.tv/httpdocs/illuminatus/bbpress/my-plugins");
    ?>

    I expect quite a bit of problems because of this from people on shared hosts.

    The proper way for it to be done is with posix_setuid before file disk activity but I doubt they will ever do that (or just let people put the files in place like they did with 0.9)

    ps. actually your directory names seem too long, what happens if you try to

    rm /var/www/vhosts/illuminatus.tv/httpdocs/illuminatus/bbpress/my-templates
    rm /var/www/vhosts/illuminatus.tv/httpdocs/illuminatus/bbpress/my-plugins

    #15394
    okso
    Participant

    Apache has created these two directories with permission rwx r-x — I get the following when trying to delete them:

    Error: Unable to remove file /httpdocs/illuminatus/bbpress//var/www/vhosts/illuminatus.tv/httpdocs/illuminatus/bbpress/my-templates: filemng failed: rm: cannot chdir from .' to/var/www/vhosts/illuminatus.tv/httpdocs/illuminatus/bbpress/my-templates’: Permission denied

    filemng: Error occured during /bin/rm command.

    Error: Unable to remove file /httpdocs/illuminatus/bbpress//var/www/vhosts/illuminatus.tv/httpdocs/illuminatus/bbpress/my-plugins: filemng failed: rm: cannot chdir from .' to/var/www/vhosts/illuminatus.tv/httpdocs/illuminatus/bbpress/my-plugins’: Permission denied

    filemng: Error occured during /bin/rm command.

    How do I delete them as Apache? Thanks in advance.

    #15392
    kickerman360
    Member

    Hi,

    I was wondering how I could display the bbPress plugin, Avatar Upload, in WordPress. Software: bbPress 1.0.1, WordPress 2.8.1

    I am using bbPress as the profile’s home so to speak since I’d rather not use WordPress’ Dashboard and want to display the avatar of the user on the home page.

    I have done deep integration both ways by using this snippet of code in [wp/bb]-config.php

    if ( !defined( ‘ABSPATH’ ) ) {

    include_once( ‘/home/path/to/forums/[bb/wp]-load.php’ );

    }

    Then pasted this bit of code where I want the avatar.

    <?php avatarupload_get_avatar(ID); ?>

    However, as I expected it doesn’t work with the error

    Fatal error: Call to undefined function avatarupload_display() in blah3 on line x

    I tried adding <?php bb-head ?> and <?php if ( bb_is_profile() ) profile_menu(); ?> to the header but both result in an error

    I am no programmer but I don’t think bbPress is being load correctly. Can anyone offer a solution or some advice?

    #76494
    kickerman360
    Member

    Thanks _ck_, nice work with your plugins as well, you’re basically building the other half of bbPress :D

    #76466
    ArnyVee
    Member

    Thank you so much _ck_ :D

    #76465
    _ck_
    Participant

    wrap any html or javascript (or even php) that you only want guests to see in this

    <?php if (!bb_is_user_logged_in()) { ?>

    blah stuff here

    <?php } ?>

    #76380

    In reply to: admin panel warning

    Elias
    Member

    I think that this problem occurs in forums w/o posts, when the various numbers are divided by the number of posts, which is zero. But it is a bug, the code must test for zero as denominator…

    #76403
    Design Maroc
    Member

    ok stupid question… it’s working… :)

    sorry for that

    #76281
    Rohan Kapoor
    Member

    Hey you need to integrate the cookies using the plugin bbpress Integration for WordPress. Just google it and insert the code the plugin gives you into the wp-config.php and bb-config.php files.

    #15378
    incirus
    Member

    I just converted my forum from phpBB.

    Everything looks like working fine except the admin panel warning about the statistics

    It is probably because the forum start date is not configured correctly somewhere but I couldnt find it so far.

    Can anybody help me?

    here is the warning message I get;

    Warning: Division by zero in /home/hosting/public_html/forums/bb-includes/functions.bb-statistics.php on line 214

    Warning: Division by zero in /home/hosting/public_html/forums/bb-includes/functions.bb-statistics.php on line 194

    Warning: Division by zero in /home/hosting/public_html/forums/bb-includes/functions.bb-statistics.php on line 174

    Warning: Division by zero in /home/hosting/public_html/forums/bb-includes/functions.bb-statistics.php on line 244

    #76350
    _ck_
    Participant

    First try switching your theme to the alternate and back again.

    If that does nothing, temporarily deactivate any plugin you may be using and see if that does it.

    Oh wait, you’ve been hacking at your theme.

    <div id="discussions" align="left">

    There’s no way that’s the default, you must have edited that.

    Replace the theme files from the original.

    So far it only looks like you edited front-page.php, so try replacing it with this in bb-templates/kakumei

    http://svn.automattic.com/bbpress/trunk/bb-templates/kakumei/front-page.php

    #72358

    In reply to: Bulgarian translation

    Translations for branches 0.9 and 1.0 updated! Available in the SVN repository:

    http://svn.automattic.com/bbpress-i18n/bg_BG/branches/0.9/

    http://svn.automattic.com/bbpress-i18n/bg_BG/branches/1.0/

    Ами, радвайте :) Преоводите са вече в официалното хранилище. За версия 1.0 е 98% завършен, но непреведените неща се виждат само при инсталиране на bbPress.

    Ще гледам да го поддържам занапред :)

    #75196
    Gautam
    Member

    Can you give me the current source of the plugin you have made?

    You can get the post text (of the first post of the topic) by:

    global $bbdb;

    $topic_id_ft = get_topic_id(); //topic id for getting text of first post of the topic

    $first_post = (int) $bbdb->get_var("SELECT post_id FROM $bbdb->posts WHERE topic_id = $topic_id_ft ORDER BY post_id ASC LIMIT 1");

    $content = urlencode(substr(strip_tags(strip_shortcodes(get_post_text($first_post))),0,300));

    $content = str_replace('+','%20', $content);

    $content = str_replace("’","'", $content);

    $post_summary = stripslashes($content);

    #74856
    plrk
    Member

    Editing the .mo file directly is possible but hardly recommended. I’ll make sure to change “sullat” to “tappat” my next update of the files though.

    The &auml; things are called HTML character entities. I use them to make sure the correct characters will show up regardless of character encoding difficulties. However, not all (but most) e-mail clients parse this HTML, so they may show up in their &-form. Have you experienced this?

Viewing 25 results - 24,251 through 24,275 (of 32,468 total)
Skip to toolbar