Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 29,051 through 29,075 (of 32,458 total)
  • Author
    Search Results
  • #56915
    You can also alternatively get rid of it all together just by taking this line out of bb-settings.php:

    require( BBPATH . BBINC . 'bozo.php');
    &&
    require( BBPATH . BBINC . 'akismet.php');

    YMMV.

    Why would I need to take out the akismet.php as well?

    #60507

    In reply to: tr td .num font size?

    chrishajer
    Participant

    In your theme’s style.css (or the default theme style.css) you want to find this at around line 255:

    .num, #forumlist small {
    font: 11px Verdana,Arial,Helvetica,sans-serif;
    text-align: center;
    }

    That controls the styling of <td class=”num”>.

    I also recommend you use the Firefox web browser with the Web Developer add-on by Chris Pederick for finding things like this.

    #60493

    In reply to: Unread Topics

    henrybb
    Member

    Cool!

    Yeah, I haven’t really done much in PHP. And I basically hacked this plugin up in two evening sessions.

    Thanks for the suggestions, I’ll have a look at the code again. =))

    Actually the number of posts stuff was an idea that didn’t pan out.

    The two functions for new/unread were actually that there initially was just the unread stuff, then I added the “new” check so it would bold new topics. I need a different one for the topic_link filter, cause I don’t want to change the link for brand new topics.

    #60492

    In reply to: Unread Topics

    fel64
    Member

    Err, no. :P I read your description here. I thought about that approach before but I like the time-based implementation, especially as my hosting is a bit creaky (and edit: having come to the finish of this post, I realise that it’s actually not that bad at all! Maybe it is a good idea, especially as it’s a lot more convenient). It’s good that you’ve done it though, and cool that you’re sharing it (in the face of adversity :P). I hope you don’t mind; here’s some suggested changes that could speed things up a lot.

    For installing the table, you may want to use bb_dbDelta() (should work exactly as wp’s implementation: https://codex.wordpress.org/Creating_Tables_with_Plugins ).

    There are also a lot of queries made that you could probably avoid. For example, in the topic listing the current topic will be in the global $topic, and you can get its last_post_id by this:

    $last_post_in_topic = $topic->topic_last_post;

    You can do the same for the number of posts.

    Every column in the table will be available as a member variable (don’t know how familiar you are with PHP? Member variables are just like above, $member->!!!member_variable!!!) – that’s true for users, posts, topics and forums alike. (Meta entries are too, if there’s an entry topic_colour in the topicmeta table you can call it by $topic->topic_colour.)

    Right now you’re making at least three additional queries per topic:

    if ( utplugin_is_topic_unread($topic, $user) || utplugin_is_topic_new($topic, $user) )

    utplugin_is_topic_unread() makes three queries. If it’s not unread, it’ll check if it’s new, too, which is another two. For the default 30 topics, that’s 90 – 150 additional database queries per single view of a page. Since db queries are usually the bottlenecks in website speed that could be a problem. (_ck_ would probably blow an artery.)

    By using the already-queried stuff from global $topic you can cut that down to one or two topics per query. Also, in utplugin_is_topic_new() you’re using exactly the same value again, but making a new query for it, if I see that right. You could either move the check to utplugin_is_topic_unread() (which would return true for unread and for new) or make that a global itself.

    That would make it at most one query per topic.

    Finally, IIRC data for all topics on the page is being called in a single query. If you can find the right filter or hook, you may find that you can get all the relevant topic_ids at once, at the start, then do a _single_ query on your table that gets data for all of them, make that a static (so it’s preserved every time the function is called) and use that data every time. Then the overhead generated by your plugin wouldn’t even be so bad.

    #60491

    In reply to: Unread Topics

    henrybb
    Member

    Well I’m allowed atleast one misconception aren’t I? :)

    WordPress has the same weird approval stage. But what I don’t get is that I wasn’t given a chance to upload either the plugin or the readme, I just input the name of the plugin and the whole process hinges on that one name.

    Started wondering if I was at all comfortable with “Unread Topics” as a name :P

    Anyway, did you look at the plugin fel?

    #60095

    In reply to: top 100 bbPress sites

    _ck_
    Participant

    Don’t get too comfortable on your position in the list ;-)

    As I get more time to code it and add more data, the positions keep slipping. Now almost 1500 sites with ~1100 or so listed.

    #52914
    fel64
    Member

    I don’t understand. PHP5 runs PHP4 code just fine; if it runs on 4, it will run on 5. (Other way around may be a problem, but that doesn’t seem to be it?) The plugin might not use features of 5, but it will run under 5.

    #52913
    Heliotropen
    Member

    What a cool guide, – huge shoulder claps from me to you!

    There is one HUGE problem though;

    1.this plugin is no longer avaible?

    https://codex.wordpress.org/User:RobLa/bbPress_Auth_for_MediaWiki

    2. this IS, BUT, it is wrtiten that it dosn’t suport php5 (therefor any useable media wiki installations right now.)

    http://hery.blaogy.org/2007/02/21/mediawiki-wordpress-integration/

    Is there any plugin or way out there, to make the step nr. 4 in the guide possible. – The mix is not soo cool, with wordpress & bbpress intigration only.

    In advance thnx.

    /Helio

    #60474
    chrishajer
    Participant

    OK – everything appears to be in the correct location now. I think there is just a simple problem with the config.php database details now. Can you verify that these 4 are absolutely accurate in your config.php?

    define('BBDB_NAME', 'xxxxxxxx');
    define('BBDB_USER', 'xxxxxxxxx');
    define('BBDB_PASSWORD', 'xxxxxxxx');
    define('BBDB_HOST', 'xxxxxxxx');

    The host might not be localhost. Mine is not. And you don’t have a syntax error in the file (like a missing or extra quote) but something like one of those values is inaccurate. Posting it here in edited form won’t help, you have to verify that the database name, user, password and host are all accurate. You’re the only one who can do that. Once you have that, we need to get back to the original problem.

    #60191
    neyoung
    Member

    I found this to trace functions. But I don’t have access to the php.ini file so there’s no way I can install it :(

    #60190
    neyoung
    Member

    I’m using wordpress mu so I’m sure that there is a big discrepancy :(

    Is there a way that I can trace which functions are called when a post is made? That why I can follow the execution with and without the wordpress functions loaded and find out what the difference is?

    #60470
    chrishajer
    Participant

    regarding your setup

    1. did you install phpMyAdmin yourself, or is it part of a control panel?

    2. did you edit any config files by hand?

    3. what do your installation directories look like (i.e. where did you install phpMyAdmin in relation to the other directories you have for your WP and bbPress installations?)

    is it something like

    /home/llab/public_html/wordpress/

    /home/llab/public_html/wordpress/forums/bbpress/


    (why the extra directory here ^?)

    /home/llab/public_html/phpMyAdmin/

    Is your config file for bbpress in the forums directory or the bbpress directory? (IMPORTANT)

    I think the forums directory is extra, and maybe that’s causing problems?

    #60456
    benbeltran
    Member

    Try Using XAMPP, it works for windows :)

    #60188
    neyoung
    Member

    ok. I’ve figured out whats causing the problem. It comes down to the Default Role Plugin. There is nothing wrong with the plugin itself other than the fact that it relies on wordpress functions. Thus you need to load wp along with bbpress. To do so I have the following added to the top of my config.php file.

    require_once('../wp-blog-header.php');
    define('WP_BB', true);

    With the two lines in the config.php file the allow images plugin does no work. I even tried disabling the Default Roles plugin and leaving the 2 lines in config.php to make sure the plugin wasn’t the culprit. If I remove the two lines the Allow Images plugin works as expected.

    I don’t know much, but I could take a stab at whats happening. Is it possible that when a reply/topic is made, bbpress is calling wordpress functions instead of bbpress functions?

    #60411

    In reply to: Inline Images?

    kdma
    Member

    Would you mind giving me a quick instruction on how to do that? I mean, are we talking a simple search and replace get_option() to bb_get_option() in particular files? or even one file? If that’s the case, easy enough, so be it. but..? :)

    In all honesty, I really just want to be able to have people upload a zip file and have it extract and post thumbnails to a thread. Anyone should/would be able to do this. Sadly with NGG, you can only have the admin do it. :(

    Are there any other mods out there that allow this?

    #60445
    chrishajer
    Participant

    And, the previous one, 20 seconds :)

    #59909
    benbeltran
    Member

    @_ck_: Wasn’t there a plugin already to change the style unread posts? I think it could be easily adapted.

    but then again,

    @Trent: Good work :P

    #59882
    benbeltran
    Member

    Practice makes perfect and you have a great headstart. I’ll talk with my associate about shell access and everything and see if we can reach a nice agreement :)

    #60092

    In reply to: top 100 bbPress sites

    _ck_
    Participant

    I don’t want any kind of “phone home” plugin as that can be accidentally considered spyware as that’s not my style at all. I’d rather do it passively. I’ll eventually make a way for people to submit new sites or manually update stats if they need to.

    I’ve taken the fake numbers game into account.

    Anyone with a sharp increase in members or posts after each month will be examined carefully ;-) I’ll remove anyone permanently that I catch “faking”. It’s kinda silly anyway, it’s not like you get anything for being higher.

    #60090

    In reply to: top 100 bbPress sites

    fel64
    Member

    posts and users over time is the only thing you don’t have – and all I meant was since launch, anyway. Everything else you do have.

    #60435
    wpitn2shape
    Member

    It works now to style login.php in my template folder, NOT login-form.php, but I swear it didn’t work before. I had put the same code in both of those template files. Weird.

    #60434
    wpitn2shape
    Member

    If when I put my WP log in form into bb-login.php and when that redirects to wp-login.php but shows a 404 (when the file is there), should I go to WordPress MU forums to ask for help?

    >>>>

    OK It also happens when I put bb-login.php into the code instead of wp-login.php, but I’m sure it’s still a WP/MU thing.

    Putting my WP login box on the sidebar of the main page of the forum works however, so what I really need is to be able to change the log in message at the bottom of those pages.

    #51642
    henrybb
    Member

    This is still happening. If a user is marked a bozo once, there’s some nook in the system that never allows him to post again without yelling “spam” unless you remove the meta record from bb_usermeta. Really annoying.

    Also anyone know why bozo status isn’t just a checkbox in the Kakumei theme??

    EDIT: Removing the meta tag didn’t work either :(

    #59908
    Trent Adams
    Member

    From our fearless leader!

    /*
    Plugin Name: Recent Stickies
    Author: Micheal Adams
    Description: Adds a class to recent sticky posts
    */

    function recent_sticky_class( $class, $topic_id ) {
    $topic = get_topic( $topic_id );
    if ( !$topic->topic_sticky )
    return $class;

    if ( get_topic_start_time( 'timestamp' ) < time() - 604800 )
    return $class;

    $class[] = 'recent-sticky';
    return $class;
    }

    add_filter( 'topic_class', 'recent_sticky_class', 10, 2 );

    Trent

    #60085

    In reply to: top 100 bbPress sites

    _ck_
    Participant

    @Trent Oh that’s weird, how did I miss that one! Thanks!

    @chrishajer right now it’s ranked based on activity, not prettiness but user voting for 1. style 2. content will come eventually

    @fel64, I might release it under creative commons after I fix it up some more. There are some problems – excluded sites, repeated sites, etc. Plus I want to add more stats to them like tie them to alexa data, etc. I’m just low on time and have too many projects going on :-(

    I need to figure out an anonymous donate system too, all this is starting to chew into my regular work!

Viewing 25 results - 29,051 through 29,075 (of 32,458 total)
Skip to toolbar