Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 20,701 through 20,725 (of 32,481 total)
  • Author
    Search Results
  • #90609

    I tried this code but not working as expected.

    Could you tell us what it is and is not doing?

    We can not help you if you don’t tell us whats wrong :)

    #90608
    sureshdrim
    Participant

    Hello zaerl..

    There’s something wrong.I tried this code but not working as expected.

    #90423
    mr_pelle
    Participant

    Here’s a more complete non-core-hacking solution:

    <?php
    /*
    Plugin Name: Customize User Profile
    */

    add_filter( 'get_profile_info_keys', 'customize_user_profile', 10, 2 );

    function customize_user_profile( $fields, $context ) {
    /**
    * Remove undesired fields
    *
    * Commented = left
    * Uncommented = removed
    */
    // unset( $fields['first_name'] );
    // unset( $fields['last_name'] );
    unset( $fields['user_url'] );
    // unset( $fields['from'] );
    unset( $fields['occ'] );
    unset( $fields['interest'] );

    /**
    * Add new fields
    *
    * Quoting functions.bb-core.php, line 906:
    * meta_key => (required?, Label, hCard property). Don't use user_{anything} as the name of your meta_key.
    */
    $fields['my_meta_key'] = array(
    false,
    __( 'My meta key' ),
    'text'
    );

    return $fields;
    }
    ?>

    Of course, as usual, replace < and > with angular parentheses.

    #90607
    zaerl
    Participant

    Curtesy of the ajaxed-quote plugin:

    function replay_link() {
    if ( !bb_is_topic() ) return false;

    global $page, $topic, $bb_post;

    if ( !$topic || !topic_is_open( $bb_post->topic_id ) || !bb_is_user_logged_in() || !bb_current_user_can('write_posts') )
    return false;

    $post_id = get_post_id();

    $add = topic_pages_add();
    $last_page = get_page_number( $topic->topic_posts + $add );

    if ( $page == $last_page ) return '#post_content';
    } else return get_topic_link( 0, $last_page ) ) . '#postform";
    }

    Not tested.

    zaerl
    Participant

    You can use only a-z, A-Z, 0-9 and the - in login names. After registration you can set up the so-called “display name” (name, surname) where you can insert all the fancy unicode characters you want.

    #89397
    Cathy Mitchell
    Participant

    I am also trying to change the order of the topics on the front page

    #90587

    In reply to: Kakumei Black theme

    chrishajer
    Participant

    I don’t see subscribe to topic here either. It’s supposed to be near the tags according to kevinjohngallagher, but I don’t see it when I am logged in.

    What is your question about themes? You upload with FTP or SCP to your bbPress installation, into a folder called my-templates. Be sure the my-templates folder has 755 permissions, then your new theme folder has 755 permissions. And be sure it’s not inside ANOTHER folder. So, it should be like this:

    bb-config.php
    my-templates/
    ----bbpressblack/
    style.css (with your header)

    Should not be like this:

    bb-config.php
    my-templates/
    ----bbpressblack/
    bbpressblack/
    style.css (with your header)

    I don’t think that would work

    #90393
    pagal
    Participant

    @ Kev

    It will be a tiny networking tool, for those who want personally interactions (beyond Private Mesg Plugin ).

    People will be able to add each others, block, ignore. Can share photos, videos, links.

    Register users can posts on other walls by their permission.

    Email notification to the user on every wall posting.

    Captcha secturity, words limitations, Like it, points, rating.

    That’t it.

    My little Wish :-)

    #90482
    mr_pelle
    Participant

    Thank you Kevin for the SAVEQUERIES trick!

    #90554

    Unread post/topics – Is it really hard to made this?

    1) Yes

    2) There’s a plugin for this for just over 2 years.

    Quoating and Posting reply

    Roughly 2 years. But uses JavaScript.

    i cant stay manual formatin of text with HTML. Its such waste of our time!

    Loads of plugins for this. I know mine are from early 2008, and I’m sure _ck_’s bbcode lite and bbcode buttons are from before then.

    Allowed quicktags.

    That function. I dont know how change allowed tags. Right now Its not soo important…

    “Tags are over-rated. People simply don’t use them – especially non-techy people who see the value. We have 7038 topics on bbPress.org and yet 35/39 Tags have less than 25 topics, the other 4 have more (but pagination doesn’t work in the new theme). Even if we don’t attempt to count duplicates, bbpress.org has less than 10% of all topics tagged. If we were to check for duplicates, it would definately half”

    -https://trac.bbpress.org/ticket/1243

    Automatic tags

    Apart from my answer above.

    There has been a plugin for this for 2 years.

    Slug

    I see where you’er coming from on this, but it’s not a great idea.

    A forum is an N-to-N system. A blog is a 1-to-N (or few-to-N) so control of such things is needed and easier.

    I am sure there will be some folks out there with good examples, but I’ve never ran into an issue with a slug of any forum I’ve used in all my years.

    Thanks for your suggestions and time though :)

    Kev

    #90481
    _ck_
    Participant

    I know of at least one very complex, very high volume bbpress site that uses cloning very well. And stand-alone makes the site much more responsive. It even uses several installed copies of bbpress linked very well.

    It’s the cost of the environment you chose. If you absolutely insist on using WordPress, you better be ready to throw a ton of hardware at it if you need to scale and insist on deep integration.

    It’s perfectly possible to create cached portions of a site or common segments that can be included across WP and bbPress. It’s a matter of intelligent design.

    When you start banking on 1mb of code loading per instance and a few dozen queries per user per page because of deep integration, you are guaranteed growth failure sooner or later – it just won’t scale.

    #34641
    tukz
    Member

    i’m trying to create a div class by requesting user role title, but it actually return an empty string on source code each time when web page is loaded. i’m using :

    echo user_title();

    What i’m trying to do this? I want to show a picture (ads) only for members, all other role will hide this ads via CSS style. Does there is a way to do this? can someone help please echo user title proprely?

    note: i’m also using “role-manager” plugin, i don’t know if this can cause trouble.

    edit: can’t display the code properly. 😡

    #90392

    Pagal,

    Could you tell us what the plugin is supposed to do?

    Someone might be able to make an alternative, but not if we don’t knoe what the plugin is for. Help us, help you :)

    #90391
    pagal
    Participant

    Oops! Sorry _ck_ dear, don’t be rude. I don’t want to start nagging here….And I don’t have any evil intentions, Also I’m not willing to destroy your paid work, I just asking if it is possible to share it or can anyone make alternative? You can close this topic if you are afraid. I’ll never ask again about it.

    @Kev, Thanks for your interest

    What functionality is it you want us to create for you?

    I don’t have any personal intentions, I don’t want to make it just for me. And I don’t really know how many people need for such a plugin.

    I’ve some ideas, I want to share it with you, But I think Mod is not happy with this topic. :(

    #86239
    zaerl
    Participant

    Hi Kevin. I found a “solution”. But I’m not proud of my code:

    add_action('bb_topic.php', 'the_function');
    add_action('bb_edit-post.php', 'the_function');
    add_action('bb_forum.php', 'the_function');
    add_action('bb_front-page.php', 'the_function');
    add_action('whatever_other_template_page.php', 'the_function');

    Basically speaking I hook those template pages that I need. The files in the root folder call:

    bb_load_template('template_file.php', some_stuff);

    in the very last line. That function calls the action bb_template_file.php, include() template_file.php and than calls the action bb_after_template_file.php

    Maybe there’s a better solution. I’m not a bbPress expert.

    #90551
    zaerl
    Participant

    Quoating and Posting reply: https://bbpress.org/plugins/topic/ajaxed-quote/

    Allowed quicktags: You mean the html tags that can be used in posts? bb_allowed_tags()

    Automatic tags: ?

    XU3E
    Member

    Hello to developers,

    I really love bbPress! Simple and fast! Integration options to WordPress is good way but I really love a idea about stand alone forum solution. Before that, there is few things that should be consideret to next release.

    Unread post/topics – Is it really hard to made this? This is main problem of all lightweight forums scripts – no marknig of unread post and parent topics. Just put that to the core and give options to admin. If they are interested about that fetahure they’ll enable it. Or just give us some up-to-date plugins that works and are supported by official dev team.

    Quoating and Posting reply – Light weight doesnt mean “no bbcode” or another nice code like !Texy. But please, no HTML or worst – XHTML STRONG tag as formating for messages! I really like simple way to add comments but i cant stay manual formatin of text with HTML. Its such waste of our time!

    And where is Quoting support like WP has?

    Allowed quicktags – Please, give me options set allowed tags from admin. Or just give better documentation! WordPress is the best because good documentation! I cant spend all day looking for right file just because its not at documentation and sometimes its impossible find some reasonable answers on google.

    Automatic tags – This is not serious problem. Just consider…

    Slug – Slug like WP. I miss this feathure. Its hard to fix slug problem if i cant directly acces to that from admin. Only way i can do it is mysql.

    Thats it! Nothing more. I am new here and i dont follow main goals of project but this is my opinion why is bbPress so uncomfortable to me and my friends.

    Its just my opinion and I hope you will consider make some serious progress on it.

    Sorry for my english.

    Thanks

    PS: I hope there will be more good ideas. Topics like this should be general, sticked.

    #90479
    Greg
    Participant

    _ck_, I would agree if it were just a matter of a clone theme. I operated our site like that for a couple of years. But when your customization goes beyond just a theme, then the costs of “cloning” get high in their own way.

    To repeat this thread, the duplication results in higher dev cost, more complexity to maintain and more bugs (to use a Rails-ism, the code isn’t very DRY).

    No question that it gets more performance and uses less resources though.

    #90478
    _ck_
    Participant

    I’ve been talking about this for years.

    The “performance” tag has a few gems in there I’ve written over time.

    bb-benchmark will also show you all the queries via the same method and a few other details, unfortunately the newest version is not in the plugin section right now because of how bbpress.org is broken.

    Part of the problem on the WP side is many times the plugins do not set their options to autoload (and have a whole bunch of options). I believe bbPress 1.x now has the same problem (it was avoided in 0.9 but re-introduced with backpress).

    I have a mini-plugin somewhere for 1.x to load all options with one query.

    Some setups can take hours to get the queries down, it’s exhausting

    Next you should notice that WP 3.0 + bbPress 1.x takes nearly 1 megabytes of code per instance and in some cases won’t even run on shared hosts because it goes over the PHP ini default setting of 32MB during runtime.

    If you are using a tag cloud, my “hot tags plus” will cache the complex query for the tag cloud and all rendering becomes static.

    ps. the real answer is not to do deep integration – just make a clone theme for bbpress, it’s worth the effort – the good thing about that is if WP is down, bbpress can still run

    Really helpful “Reboot Now”, thanks alot.

    Your first issue about the nonce value, I’ve never had it on any normal/shallow integration since I started specifying the all the keys in my config file. Yes it’s double handling but it’s made a huge difference.

    the bb-config file asks for this info:

    define( 'BB_AUTH_KEY', 'put your unique phrase here' );
    define( 'BB_SECURE_AUTH_KEY', 'put your unique phrase here' );
    define( 'BB_LOGGED_IN_KEY', 'put your unique phrase here' );
    define( 'BB_NONCE_KEY', 'put your unique phrase here' );

    The bb-config file tells you to get it form this location: https://api.wordpress.org/secret-key/1.1/bbpress/ . But really what you should have in the bbPress config file should be from the wordpress salt generator https://api.wordpress.org/secret-key/1.1/salt/

    I make sure I have an exact copy of my WordPress keys and a copy of my wordpress keys with “BB_” infront of them – and bam, that little issue went teh way of the dodo.

    define('AUTH_KEY',         '1');
    define('SECURE_AUTH_KEY', '2');
    define('LOGGED_IN_KEY', '3');
    define('NONCE_KEY', '4');
    define('AUTH_SALT', '5');
    define('SECURE_AUTH_SALT', '6');
    define('LOGGED_IN_SALT', '7');
    define('NONCE_SALT', '8');

    define('BB_AUTH_KEY', '1');
    define('BB_SECURE_AUTH_KEY', '2');
    define('BB_LOGGED_IN_KEY', '3');
    define('BB_NONCE_KEY', '4');
    define('BB_AUTH_SALT', '5');
    define('BB_SECURE_AUTH_SALT', '6');
    define('BB_LOGGED_IN_SALT', '7');
    define('BB_NONCE_SALT', '8');

    FYI incase anyone new to bbPress is reading this: If I do a clean bbPress install I strongly strongly advise using https://api.wordpress.org/secret-key/1.1/salt/bbpress/ instead which returns 8 lines (we get salts too) which WordPress has needed for 2 years.

    #86237

    Thank you Gautam!

    EDIT: Actually I’m looking for an action that gets called on every page after the options and database hits have been done, and before any info has been sent to a browser.

    I’ve tried:

    bb_options_loaded
    bb_plugins_loaded
    bb_send_headers

    EDIT 2: Actually, fingers crossed bb_index.php_pre_db will work.

    #90476
    Greg
    Participant

    I have now (1) figured out how to measure the number of queries correctly for both sides and (2) removed some very silly overhead that was immediately revealed after I achieved (1).

    The result is that both Kakumei and my custom theme do around 40 queries on the front page of the forum.

    Apologies for all the noise in the two posts before this one — a great illustration of more haste less speed.

    ps. One mod to Kevin’s extremely useful suggestion regarding the use of SAVEQUERIES to see where those queries are going… in bbPress you need to print the queries for BOTH the bbPress and WP databases. In other words, you need the following in your forum footer:

    global $wpdb, $bbdb;

    print_r($wpdb->queries);

    print_r($bbdb->queries);

    Or just to get the number of queries for both…

    global $wpdb, $bbdb;

    echo ‘WPDB Queries: ‘ . $wpdb->num_queries;

    echo ‘BBDB Queries ‘ . $bbdb->num_queries;

    Of course, the “>”s that appear in my code above should be greater than signs.

    #86236
    Gautam Gupta
    Participant

    Use bb_topic.php_pre_db action.

    Ryan’s plugin is nice, very nice indeed.

    It works in the same way as my hack/plugin for WP2.3 bbP0.8 in that it outputs a hardcoded file (obviously Ryan’s code it a heck of a lot better, and more up to date). Whats not great for me is that (the last time I checked) it attempts to output a hardcoded file once every hour, so any changes you make take 60 mins to appear on the bbpress site. You can lower that time ofcourse, but in that instance you’re going to struggle with things like SEO etc.

    #90474
    Greg
    Participant

    [EDIT] Scratch the below. It seems I was only counting the bbpress-related queries. I now see 51 queries (for a logged in user), which is a lot to pay for the convenience of calling wordpress functions. I look forward to hearing more about what you come up with during those two weeks.


    These stats are not consistent with my experience.

    I have a site with deep integration between bbPress 1.0.2 and WordPress MU 2.9 (BuddyPress). The number of queries for the front page is:

    18: logged out

    23: logged in

    I switched the theme back to Kakumei and this drops to:

    14: logged out

    19: logged in

    The deep integration here is requiring ‘wp-load.php’ from bb-config. How did you do the deep integration to get the results above?

    Or is WP3.0 doing something odd when integrated with bbP?

    Also, although 56 queries is really heavy for a standard deep integration, I wouldn’t be overly concerned about that number for a sophisticated site. And you really want to know what those queries are. Not all queries are created equal.

Viewing 25 results - 20,701 through 20,725 (of 32,481 total)
Skip to toolbar