Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 27,151 through 27,175 (of 32,481 total)
  • Author
    Search Results
  • #66606
    _ck_
    Participant

    If you look at the instructions, you can get a list of names by using <?php mini_track(2); ?> instead of (1)

    I’ve updated the code to link to profiles.

    That’s all I’m doing on that plugin, if you want more, you need to learn PHP.

    #66612

    In reply to: Pilates Digest Forums

    thion
    Member

    @_ck_ – you of all people should know that you can do amazing things with bbPress ;).

    @gio500000 – nice and clean design – I like it.

    #3746
    djp
    Member

    Hi all

    After much tweaking & relatively extensive style changes, I finally went live with my website.

    I needed to make bbpress fit in with the clean, simple style of the rest of the site & to be completely honest, I think I did a great job. Please have a look at the forum as well as the rest of the site to get a feel of what I mean by ‘fitting in’.

    Comments are most certainly welcome, good & bad :)

    http://www.mastercleanse.co.za/forum

    #66594
    810798
    Inactive

    thanks _ck_,

    It seems to be a problem with when you include the wp-config… There must be a check somewhere in one of the files included in it that checks if that has been registered or is a banned blog, and wp-admin must be hardcoded in somewhere to be a safe directory.. i just havent had time to go through and look for where that happens.. been making a bunch of other customizations instead, as this problem can be solved by just using sub-domains..

    James

    #66605
    Null
    Member

    Okay, I’ve tested the new one. I see there is a hyperlink now and when you click it, I see this (statuspage?):

    There are 1 total users online. 1 of them are members: Admin. 1 of them are on this page.

    Admin (1) - 1 minutes ago - /mssp/?mini_track_display

    The last part /mssp/etc is a link too? I think this is a bug.

    Sec:

    Is this also possible?

    These members are currently on this page: jhon, kim, jack, etc

    Third: It would be cool if the names are clickable and you go to their profile while clicking them.

    #66609

    In reply to: Pilates Digest Forums

    _ck_
    Participant

    Very nice! For a moment I was almost going to accuse you of advertising a non-bbpress forum here, LOL. It fooled me :-)

    #66600
    _ck_
    Participant

    Well I started to write some code but I then remembered why I did it completely on my own. There are many problems you encounter with trying to do this efficiently with as few DB queries as possible. Using the built in bbpress functions when there’s only a couple people online are fine, but when it gets to many times that, it’s too inefficient.

    There’s also the issue of tracking NON members. Much more tricky than authenticated users.

    I recommend you modify simple online list to track position. Much easier.

    If you know PHP, here’s the process:

    1. take the IP of the current user, change it into ip2long and make that the index of an array or object

    2. store the request_url for that index

    3. store the time() for that index

    4. if they have a user id# (a member) store that

    5. save the array via bb_update_option (not usermeta)

    6. on every bbpress load, do a bb_get_option for the usertracking, which is the array of all the above

    7. comb through the time() for timestamps older than 30 minutes and discard them

    8. count the remaining items to see how many online in past 30 minutes

    9. comb the request_url to see if it == your bbpress front page and count

    #66599
    _ck_
    Participant

    If you know some basic PHP this is a very easy thing to store/track but you’ll need some more extensive code to print it out.

    Essentially what you’d want to do is store in the usermeta the bb_location and timestamp on every load of bbpress via a simple plugin.

    Then to count the number of users in the front page you’d do a mysql query to limit by time and count the number of “front-page” that appear.

    I’ll give you some rough code in a minute, it’s fairly straightforward.

    #66598
    Null
    Member

    Yeah about that plugin of yours, hurry up with it, many people want that one :):)

    I can also test it if you like on my board

    But back on topic: lets say I want to use bb_location since I ONLY want to track users on the frontpage. Is this possible without extending the users table?

    If a user goes to another page or leaves the bb_location will change. Thats not a problem since I only want the people from the frontpage.

    And how would you update this? At page load or something? Perhaps I should request this in the plugin section since I have no idea how to make a clean plugin of this…

    #66416
    _ck_
    Participant

    Oh shoot, you are correct, I allowed them in the end by default. I might remove that.

    update: oh wait, BMP is only allowed for admin, no one else has that allowance – so it’s not an issue, I forgot I did that. The reason you got “denied mime” is because it’s a bug where I didn’t add “image/bmp” to the allowed mime types for admin. I’ve reposted 0.1.9 with that fixed.

    But that’s a strange error I need to explore on the png. Apparently “Error Occurred While Processing Request” is a mysql error? Interesting.

    Did the filename have any strange characters? Quotes? Apostrophies? Unicode?

    #66595

    In reply to: Install error

    chrishajer
    Participant

    I’m not really sure why, but I can guess. Do you have a file in bb-includes called compat.php? /bb-includes/compat.php

    In that file, line 10 says “if this function does not exist, create it.” That PHP function is available in newer PHP versions only (greater than or equal to 5.1.2). So, for compatibility, if the function is not available on your server, bbPress creates it in compat.php.

    Do you have that file, and does line 10 look like this?

    if ( ! function_exists('hash_hmac') ):

    What bbPress version did you install, if it’s not the latest 0.9.0.2 release? Are you certain all the files were uploaded properly?

    #66415
    chrishajer
    Participant

    IIRC, I uploaded the BMP and got the denied mime. Then, at a totally separate time when uploading a PNG I got the error described here.

    I never tried to upload more than one image at a time.

    I would totally disallow bitmaps as well, since they’re really not designed for the web. I was thrown off by this note from the saying they’re allowed:

    allowed uploads: bmp (500 KB), doc (500 KB), gif (500 KB), gz (500 KB), jpeg (500 KB),
    jpg (500 KB), pdf (500 KB), png (500 KB), txt (500 KB), xls (500 KB), zip (500 KB)

    #57099

    In reply to: Code backtick bug

    _ck_
    Participant

    It’s archived here:

    http://code.google.com/p/llbbsc/wiki/HTMLTagAttributesValidatorPlugin

    http://web.archive.org/web/20071227175025/http://www.livibetter.com/it/topic/plugin-html-tag-attributes-validator

    http://llbbsc.googlecode.com/svn/trunk/bbPress/HTMLTagAttributesValidator/HTMLTagAttributesValidator.php

    That’s actually a fairly decent plugin, too bad it’s not in the extend section.

    #66414
    _ck_
    Participant

    BMP is not an allowed mime by default because they tend to be huge and uncompressed. You can force it to be allowed though by adding it to the mime (and extension types).

    This bug bothers me though, if you can give me steps to reproduce it that would be very helpful:

    [png] Error_Occurred_While_Processing_Request.png (17.7 KB, 0 downloads) [x]

    Did it happen when you uploaded a PNG and a BMP at the same time?

    #57098

    In reply to: Code backtick bug

    Indojepang
    Member

    livibetter link is dead :(

    #64631
    chriskalani
    Member

    hmmm… yeah. So it sounds like everyone wants it. Now we just need to find someone awesome who can make it happen.

    On a side note… it would be really cool if they released a 3rd product focused more around community. Basically just an integrated bundle of bbpress and wordprss with maybe some additional integrated features. That would kick so much butt!! Drupal sucks… so does everything else. But I might end up using it if the main feature I am looking for doesn’t exist. :(

    #3741
    810798
    Inactive

    I installed muwordpress (with directories not subdomains) and bbpress and integrated them.. I added

    RewriteRule ^(.*/)?forum/(.*) forum/$2 [L,R]

    to the .htaccess in the wp directory and it worked before i added the code

    define(‘WP_BB’, true);

    if ( !defined(‘DB_NAME’) ) {

    require_once(‘/home/.atrax/armsteadj/myiowa-news.com/blogs/wp-config.php’);

    }

    into the bb-config.php file to get integration to work.. now it gives me a loop error..? any ideas on how to get the htaccess file to forward the directory to it?

    Thanks!

    James

    #66586
    thion
    Member

    Show last registered user? Here y’go:

    <?php include_once("bb-includes/statistics-functions.php"); ?>

    Our newest member is <?php if ( $users = get_recent_registrants(1) ) : foreach ( $users as $user ) : ?>
    <a href="<?php user_profile_link( $user->ID ); ?>"><?php echo get_user_name( $user->ID ); ?></a>
    <?php endforeach; endif; ?>

    #66025
    kirabug
    Member

    The problem I’m having is that I’ve had is that my blog is 4 years old but I only started adding tags less than a year ago and bbpress install is only a few months old. So I’m adding new tags to old posts (because I’m a borderline obsessive compulsive organizer) and they’re becoming the top posts on bbpress even though they’re years old. I’m almost done, but it’s still crazy. If I were smart and had realized what was going to happen I’d’ve finished my tagging and then installed bbpress. But I’m not ;)

    Anyway, thanks for the tips and the info :)

    #3739
    csseur3
    Member

    Hello,

    in the front-page, i want to show the name and the link of this profile, of the membre have joined in last the forum, but how please ? :)

    thanks,

    Fred

    #3738
    csseur3
    Member

    Hello,

    in the pages of the posts, for the all users, i want to show:

    – the date of the user have joined

    – the number of posts of the user

    – if he is online or offline

    how to do that?

    i want to add this in the

    <div class="threadauthor">

    <?php post_author_avatar_link(); ?>

    <p>

    <?php post_author_link(); ?>

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

    <?php report_post_link(); ?>

    </p>

    </div>

    thanks,

    Fred

    #55236

    In reply to: Favourites

    thion
    Member

    Hmm… bbSuperCache plugin could be useful, muhaha! Thanks ;)

    #65573
    _ck_
    Participant

    Here try this – completely untested – let me know!

    update: forget this one, use the 2nd one below it

    function delete_own_post($retvalue, $capability, $args) {
    global $bb_current_user, $bb_post;
    if ($capability=="delete_post" && $bb_current_user->ID && $bb_post && $bb_post->post_id && $bb_post->post_id ==intval($args[1]) && $bb_post->poster_id && $bb_post->poster_id==$bb_current_user->ID && bb_current_user_can( 'edit_post', $bb_post->post_id) {return true;} // lots and lots of double checks
    return $retvalue;
    }
    add_filter('bb_current_user_can', 'delete_own_post',10,3);

    .

    This checks if the user can still edit the post, and if so, allows them to delete their own post too.

    This plugin could be enhanced by checking if the user has been marked as blocked or inactive and prevent them from deleting it at all.

    Update: I may have “over engineered the above function, this may be a much more simplified approach:

    function delete_own_post($retvalue, $capability, $args) {
    if ($capability=="delete_post") {return bb_current_user_can( 'edit_post', $args[1]);}
    return $retvalue;
    }
    add_filter('bb_current_user_can', 'delete_own_post',10,3);

    This second method simply allows delete if the user can still edit a post. Once the edit times out, so does the delete.

    #65548
    _ck_
    Participant

    There are plenty of threads/posts about this, try this:

    Hiding Subforums’ Subforums from Subforum Pages

    You want code like this:

    <?php $forum_parent=$forum_id; ?>
    <?php while ( bb_forum() ) : ?>
    <?php if ($GLOBALS['forum']->forum_parent==$forum_parent) { ?>
    <tr<?php bb_forum_class(); ?>>
    <td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><small><?php forum_description(); ?></small><?php bb_forum_pad( '</div>' ); ?></td>
    <td class="num"><?php forum_topics(); ?></td>
    <td class="num"><?php forum_posts(); ?></td>
    </tr>
    <?php } ?>
    <?php endwhile; ?>

    #66547

    In reply to: Listing of the forums

    _ck_
    Participant

    You have to first have the list of the forums for that to work.

    add this to the top of that:

    <?php $forums = get_forums(); ?>

Viewing 25 results - 27,151 through 27,175 (of 32,481 total)
Skip to toolbar