fel64 (@fel64)

Forum Replies Created

Viewing 25 replies - 301 through 325 (of 1,001 total)
  • @fel64

    Member

    Did you try the action ‘post_form’ and echoing the desired HTML?

    I’m not sure there’s one that does the same for edit_form(), which is probably an oversight.

    @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?

    In reply to: bbSync

    @fel64

    Member

    Interesting. Can you comment out line 262? Actions and filters are a nice system but a nightmare to debug. Invisible gotos.

    I would really, really like to be able to tinker more with a setup that has problems. Can you give me the full details of what you’re running? What OS, what thing to run PHP, what version of PHP and the like?

    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.

    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. :)

    In reply to: AdityaNaik.com

    @fel64

    Member

    Yes, so what sort of hacks did you use?

    In reply to: AdityaNaik.com

    @fel64

    Member

    I like it :) How’d you achieve this level of bb integration? Are you includeing bbP or have you written a bunch of functions to emulate all that?

    @fel64

    Member

    I think switching entirely is planned.

    @fel64

    Member

    jQuery is there but not everything uses jQuery yet. You could speed things along by rewriting the prototype code for jQuery if you like.

    @fel64

    Member

    The first line of the first post? Or do you mean the first thread in the first thread listing?

    Sure, just do something like this. <?php if( !$is_foist_topic ) { echo ‘ class=”first-topic”‘; $is_foist_topic = true; } ?>

    The first time it checks it won’t be true, so it echoes code to change the class of the HTML. Then it sets it to true, so the next times it will be true and it’ll skip that.

    You want the code to set the class of the tr I believe, so put it in the HTML for that. Play around.

    In reply to: Freshness Linked

    @fel64

    Member

    Interesting, at least that eliminates some things.

    Why do they break bb-admin? That’s really awful behaviour anyway, but it would be good if you could try to deactivate them at least. Deleting them will of course work but if that breaks bb-admin then that’s a bad idea I guess.

    @fel64

    Member

    I mailed mdawaffe in the mailing list but no response. He knows and I assume he’s working on it, or going to.

    @fel64

    Member

    By having ck stripslashes on it. It seems to be something he’s gotta fix.

    None of these are dumb questions … just ask ’em and don’t worry about it. :)

    In reply to: Limit long words

    @fel64

    Member

    You want

    .post { overflow: auto; }

    which isn’t actually the automatic setting – but it’s the one that automatically adds a scrollbar if the post is too wide. Like multiline code here, it’ll add the scrollbar only if needed. Also handy for images.

    And lol at everyone suggesting something else. :P

    @fel64

    Member

    Cool. :) Can you post the entirety of the code you’re using now, in case someone else will be looking through the forums for a full solution?

    @fel64

    Member

    That’s great! Passing parameters is just giving the function some data to work with.

    $latestpost->topic_id is the topic ID. There are probably some functions like topic_title() and link_to_topic() or similar that you can use to get the title and link. They too will need the topic ID passed as a parameter, so if those are the actual functions it could be topic_title( $latestpost->topic_id ); :)

    @fel64

    Member

    Use the port of a pretty cool wp server diagnostics plugin. https://bbpress.org/forums/topic/front-page-takes-50-mysql-queries?replies=15#post-9140

    Just add define( 'SAVEQUERIES', true ); to your config.php and activate this. Then go to View > Page Source and scroll to the bottom to see the diagnostics. (You can ignore all the stuff about queries. Just check out query time, page time, page render time. This tells you about the server bottlenecks.)

    I just checked the numbers on my server, and I had 3.399 once and about twenty minutes later I had 0.436. This sort of thing can vary a lot, especially on shared hosting.

    @fel64

    Member

    I don’t know which ones you had problems with but it’s worth noting that some automatically echo and some don’t.

    <?php user_profile_link(); ?>

    =

    <?php echo get_user_profile_link(); ?>

    If they’re get_anything then you have to echo them yourself, if they don’t have get_* then it’ll echo on its own.

    [Edit] Also remember most functions don’t need a $user_id passed as parameter but won’t work in this case unless you do pass it.

    @fel64

    Member

    Never had a problem. There’s occasionally a bug in it but I’ve never noticed it and it was invariably fixed within a day or two. It’s fine running it.

    @fel64

    Member

    Not a problem as long as you have access to the databases. :) Open phpMyAdmin through your administration panel of your web hosting account, go to your database, open wp_usermeta and then click the ‘Search’ tab. Put into the “search conditions” field user_id = 1 AND meta_key = 'bb_capabilities' (this should be the user_id of your admin account). Edit the (hopefully) one result that comes up, and change the meta_value to a:1:{s:9:"keymaster";b:1;}. Then you should be keymaster.

    In reply to: Emoticons For bbPress?

    @fel64

    Member

    It’s Javascript. PHP files are just like HTML files, and anything outside the <?php ... ?> is treated as HTML. Calling the particular function around that makes it go to that place and then go through and output the HTML (which happens to be JS).

    @fel64

    Member

    Sure that’s possible. :)

    You want a query that gives you the last post. Forget anything messing around with the forum or the topic. You want the last post, right?

    There’s no API function to do this AFAIK, so you will have to use a query. I think the structure could go something like this:

    $latestpost = $bbdb->get_row("
    SELECT *
    FROM $bbdb->posts
    WHERE post_status = 0
    LIMIT 1
    ");

    And then $latestpost has $latestpost->post_text, poster_id and so on. But unfortunately not filtered, so you’d need to apply all those. Which is a bit nasty.

    But this is all unchecked and unresearched, you’ll need to play around with it. :P All this is is a bare start.

    @fel64

    Member

    $forum_one_topics is not an array which is why it’s failing (although I’m surprised it’s not).

    Do you actually want the 1 latest topic from forum 1? Then use $bbdb->get_row() instead of get_results() and stop treating it as an array (basically, just take out the foreach part since you don’t have several, and replace $topic with $forum_one_topics).

    If you want all the topics from forum one, then take out the LIMIT 0, 1 bit from the query which as I understand it would give you only one result.

    Also, you have some malformed HTML just under span gray.

    In reply to: subforums and markup

    @fel64

    Member

    fel64, the string is internal to bbpress, not the template loop.

    Fair enough, shoulda checked that. So I went and looked through the code, you know, to find the problem. bb has quite an interesting structure there. Couldn’t find the problem, though, so I looked at the code in the .8.2.1 version and it’s missing a bit.

    It’s fixed in trunk. Claire, upgrade to the latest version and it’ll work just fine.

    @fel64

    Member

    What does it say at /Library/WebServer/Documents/bb-templates/superbold/front-page.php on line 13? Also the significant surrounding lines. Would be kind of useful to know.

Viewing 25 replies - 301 through 325 (of 1,001 total)