Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 29,426 through 29,450 (of 32,481 total)
  • Author
    Search Results
  • #59035
    Null
    Member

    How about “locking” a forum so that only admin/mods can create topics in it and members can ONLY reply on these topics? (so not create them)

    So making a forum half-private :)

    #59640
    Null
    Member

    ….. :)

    #59639
    fel64
    Member

    What? do_action syntax is like this:

    do_action( $tag, $function_name [, $priority] );

    $latlong is the value, in this case latitude/longitude.

    #59362
    Null
    Member

    I have that TortoiseSVN installed, still need to figure out how to let this update the trac aswell :)

    #59638
    Null
    Member

    Hmm also don’t forget the do action at the end of the function:

    do_action('bb_function_name', $topic_id, 'topic_geolocation');

    I also have a question about this:

    // To add
    bb_update_topicmeta($topic_id, 'topic_geolocation', $latlong);

    What does/should $latlong do/be used for?

    Greetz

    #59650

    In reply to: Caching in bbPress?

    fel64
    Member

    There is soft user/topic caching, but there’s no hard caching yet. If you look at the code, in cache.php, you’ll see that it’s written to enable file-based caching in bb-cache/, but doesn’t seem to do so at the moment. It probably will in future I guess? If you fiddle you could probably turn it on. mdawaffe is now working on xml-rpc when he’s working on bb at all, so it’s not the next feature at least. I also think he was planning something else for .8.4.

    #59360
    Null
    Member

    Testing this tomorrow after work…. nah after diner after work :)

    Thx for the help mate!

    _Null

    ps. how to open a .diff?? (windows machine)

    #56379

    In reply to: Plugin: bbMenu 1.1

    Null
    Member

    Testing this tomorrow after work…. nah after diner after work :)

    Thx for the help mate!

    _Null

    #59359
    M
    Member

    The new changes have been made:

    http://www.box.net/shared/cgrj1na0t7

    I think that should cover the problems. I took the liberty of changing other things as well… hope you don’t mind. I removed some redundancies in the CSS, and changed some little code things.

    There’s the modified bbmenu.php file, as well as the diff file to make it a little easier for you to see what I changed. If you cant make sense of the diff there are diff file viewers that color the text and make it more human-readable.

    #59619

    In reply to: AdityaNaik.com

    howtogeek
    Member

    so1o,

    I have been looking for something similar to the ChipIn gadget… I am so happy that I found your page just for that =)

    Very nice theme also.

    #59648

    In reply to: Caching in bbPress?

    _ck_
    Participant

    bbpress uses so few queries that caching has got to be a low priority, especially when the point of a forum is to have very dynamic updates customised for the logged in member – it’s very different than a wordpress environment

    as long as you have the mysql cache turned on, it should be very responsive – just look at the main wordpress support forum – eaccelerator would take care of caching the php opcode and that can’t be too far behind a static page

    the bonus is that on an active forum, everything will be very dynamic as it happens…

    #2194
    howtogeek
    Member

    Looking in the code, I see a lot of references to object caching, but I don’t think it’s actually used anywhere.

    Does anybody know the state of the caching system, or what the problems were that required disabling it? Will it ever be enabled again?

    And yes, I already posted to the mailing list quite a while ago and got nothing.

    #59635
    riddle
    Member

    Cool, this is exactly the kind of bbPress-specific best practices I need to know and am not going to get from “PHP and MySQL in 30 Minutes”!

    Is topicmeta documented anywhere? I’m looking at the code and can’t say it’s entirely clear…

    #51584
    fel64
    Member

    Turn the time-string into a timestamp to be turned into a time-string.

    <?php echo date( 'g:i A', strtotime( $latestpost->post_time ) ); ?>

    There’s a template function that gives you the link to the latest post in the topic. I believe it’s called get_topic_last_post_link() but I’m not sure.

    #52676
    fel64
    Member

    Actually, post_form is called immediately before the form is closed.

    https://trac.bbpress.org/browser/trunk/bb-includes/template-functions.php#L163

    #59634
    fel64
    Member

    Yeah, really avoid doing anything to the tables and use topicmeta instead. By far easiest for you and nicest for the users, too, plus the additional overhead is minimal.

    The metadata is returned when you call get_topic() like Sam said.

    $topic = get_topic();
    echo $topic->topic_geolocation; //echoes whatever

    #59616

    In reply to: AdityaNaik.com

    fel64
    Member

    Loading bb when you load wp, coolio. That’s what I wanted to know. :)

    #59358
    M
    Member

    @Null – Working on it…

    Don’t lose hope :)

    Sorry about the “day or so”…

    #58113

    In reply to: bbSync

    fel64
    Member

    Did you try downloading from the plugin browser? https://bbpress.org/plugins/topic/56

    Trent if you see this could you take out the rapidshare link from the first post and replace it please? :)

    #59633
    Sam Bauers
    Participant

    It might be a bit confusing, because it is a complex plugin, but the Support Forum plugin uses the topic meta table to store topic support status. This data used to be in a column in the topic table but was moved to the meta table a few versions ago.

    The basic usage is (with some guessing as to what you would call your data):

    // To add
    bb_update_topicmeta($topic_id, 'topic_geolocation', $latlong);

    // To delete
    bb_delete_topicmeta($topic_id, 'topic_geolocation');

    The topic metadata is automatically included in the results when you call get_topic().

    No table manipulation should be necessary.

    #51583
    outchy
    Member

    how does one filter the output for time in this example?

    <?php echo $latestpost->post_time; ?>

    i’d like it to be in the format of ( 'g:i A' )

    ps, my good, good people :)

    how would i turn this link into a link to the latest reply itself instead of just the topic:

    <a href="<?php echo get_topic_link($latestpost->topic_id); ?>"><?php echo get_topic_title($latestpost->topic_id); ?></a>

    #59629
    fel64
    Member

    dbDelta is in bb-admin/upgrade-functions.php, same as it is in WP. :)

    You are of course sure that you have to create a new table?

    #59628
    riddle
    Member

    More specifically: does bbPress have mechanisms for automatic table creation and updating like the ones described in the WordPress docs?

    See: https://codex.wordpress.org/Creating_Tables_with_Plugins

    Should I start my Foo plugin by creating a function foo_install()? And can that function call dbDelta()? (I don’t see dbDelta in my bbPress anywhere.) If not, what’s the recommended alternative model for creating tables to be used in plugins?

    #58109

    In reply to: bbSync

    fel64
    Member

    Crowspeaker, would you mind editing a core file? If you can edit line 257 of bb-includes/capabilities.php to this:

    $this->cap_key = 'foo_capabilities';

    Then save/publish a post as you always do and see if the entry foo_capabilities is created?

    That would bizarrely mean that the BB_User has an ID but no capabilities.

    #58108

    In reply to: bbSync

    fel64
    Member

    Guess these forums are seperate from the plugins after all – subscribed here but not there :/.

    Thanks for looking at that more closely, that’s helpful. :)

Viewing 25 results - 29,426 through 29,450 (of 32,481 total)
Skip to toolbar