fel64 (@fel64)

Forum Replies Created

Viewing 25 replies - 376 through 400 (of 1,001 total)
  • In reply to: plugin: Markdown

    @fel64

    Member

    Had a bit of a rewrite and now blockquotes are also possible, to infinite depth. Currently this is one blockquote:

    > block

    > quote

    because I figured if you were writing something and you had two paragraphs that’d be more likely. But I would *love* advice on the syntax or feedback from you tisme. New source is http://www.loinhead.net/files/felise and to check out how it works you can still use http://www.loinhead.net/files/felise.php (same basic code, just modified without bb).

    In reply to: bbSync

    @fel64

    Member

    Certainly there’s no code that does that in bbSync, nor in bbPress I think. Bizarre. post_title? Have you maybe got a plugin that adds titles to posts?

    If only errors included where in the PHP code it was :P

    @fel64

    Member

    The rush is that the project is “out there” and people are looking at it and coming to conclusions. Bad conclusions.

    One of these days you’re going to have to show us the crystal ball that tells you everything about the users and potential users of bb.

    What I find interesting is the belief around here that wordpress integration is not a major desire by most people evaluating it. How would we ever know the sheer number of people that have looked and been turned off?

    I think that tidbit (or at least, in my case) is based on a hand-me-down from Trent who’s pretty close to the folk at automattic and they’d be the ones to know.

    How would we ever know the sheer number of people that spontaneously combust when they use bb?! You make it sound like the entire internet trooped over and looked at bbPress yesterday, saw that there was no plugin for this or for that and decided that they would stick to phpBB.

    I think that the implied opposite of ‘overly sophisticated’ (is that a polite ‘bloated’?) can equally be ‘lean and mean’ rather than ‘underly sophisticated’.

    I think that bb just isn’t ready in a lot of ways for what you’re trying here. At 0.8.2.1 it doesn’t _need_ to have a full gallery of plugins yet just like it doesn’t yet have a full feature set. Sure more plugins are a good thing but it’s not urgent in the sort of firetruck way.

    @fel64

    Member

    But your workaround no longer gives you the display names, right? … So you cut out the penalty, but also lost out on any gain?

    Can’t you do what you said earlier and use a hook to get all the display names at once?

    Hehe, actually I thought calling him mdawaffle was pretty good ^^ Just when you kept doing it I was confused.

    In reply to: Number of users error

    @fel64

    Member

    I think – if I remember this right – that it’s a known issue caused by the pagination using the total number of accounts ever created instead of the number existing now and that it’s fixed in the latest.

    If you have phpMyAdmin, can you check the ID of the latest member? If that ID is 309, bingo.

    In reply to: bbSync

    @fel64

    Member

    Yup. Add global $bb_cache; to bbpress’ config.php.

    In reply to: bbSync

    @fel64

    Member

    No error messages you can see? Have you checked your error logs?

    @fel64

    Member

    5 forums, 30 threads, something like 10 dudes? But like you said it doesn’t really matter.

    I think Use Display Name just wasn’t written in the days of efficient usermeta caching, before “mdawaffle” (a dig?) implemented it. Obviously not kept up to date, of course. You can report it on the plugins trac.

    @fel64

    Member

    I’ve applied this plugin and I’ve only got 11 queries on the front page in kakumei, 13 in my theme (with an onlinelist and latest blog post). Are you running the latest? If not, that’s the likely cause.

    In reply to: Noobish CSS Question

    @fel64

    Member

    There’s no direct solution. You can do one of these:

    • Change <?php tag_heat_map(); ?> to <?php tag_heat_map('limit=30'); ?>. The default limit is 40 I think, if you set it to 30 or any appropriate number they won’t go so far down. But you’d want to change that again later.
    • Put the footer inside the wrapper. I’m not sure how your templates are arranged, but in kakumei you’d just have to open footer.php and move the codeblock that produces the div footer up a few lines, just above the previous </div>. Permanent change, now the footer is on the white, but the white will always stretch down sufficiently.
    • Wait it out – eventually there’ll be enough topics to stretch the page :)

    I think there are a few other things you could do, but that second point is probably the best if you need it changed now.

    In reply to: Custom fields

    @fel64

    Member

    You can use a hook to add an input field. Your code would look something like this:

    add_action('post_form', 'addmyinputfield');

    function addmyinputfield() {
    echo '<input type="text" name="mine" id="mine" />';
    }

    You would need another hook to then get the value when it’s been posted. I’m not sure about this one, but I think the hook would be pre_post. Again you use it in the same way as above: add_action('hook_name', 'function_name'); There’s a list of hooks here, http://bbpulp.org/wiki/API/actions if that wasn’t the one you wanted. Maybe post_form_pre_post?

    @fel64

    Member

    It’s in front-page.php at the very bottom. You can see at the start it checks if $forums is set, and if it isn’t (line 75, where it says else : $forums) it delivers the page to make a new topic (and in the background $forums isn’t set if the url has ?new=1). That’s where the post_form() is too. Finding that one out took a while :P

    I don’t know. Where is the you must log in to post text?

    @fel64

    Member

    I’m not making one yet and I’m not rubbishing your idea. Originally I thought _you_ were making one which would have been interesting. But you porting one isn’t interesting to me. That’s not to say it’s a bad idea … it’s just not interesting to me. That is all there was to it.

    @fel64

    Member

    But you’ve already got all the data you need right there in the date created. Post_position just makes things more awkward to move and is just not normal form. At least I’ve never seen an advantage to it, what are you thinking of?

    @fel64

    Member

    If you have to add it to the topic, messing with the post order could get ugly. Probably easier to just leave it as an option when creating the topic. You can then add an entry to topicmeta, and use a hook to check if the topic being called is such a wikitopic and add to the roles available to the current user (giving him the edit_topic or rather edit_post capability). That should let him and therefore anyone edit it.

    @fel64

    Member

    If I want to try to make one from scratch, there’s no need for you to do it. Because, you see, I’d want to make it. But thanks.

    @fel64

    Member

    You do the same thing, but in different templates. If you look at the code, if $h2 is empty (ie. you didn’t tell it what to set) then it checks where it is – in a topic, in a forum, on a tag page or on the front page. But you can always tell it what to put instead. So if you want something else on a tag page, open the tag pages (tags.php, tag-single.php I think) in your template, look for <?php post_form(); ?> and change it to <?php post_form('No pizza for you!'); ?>. That’s a change that will happen only on the pages whose template you modified.

    To add line breaks in HTML you use <br />. But I’m not sure you can have that inside an <h2> element. You can probably just put that right above the <?php post_form(); ?>, like so:

    <br />
    <br />
    <?php post_form('Macaroni Cheese'); ?>

    @fel64

    Member

    Thanks for posting it here anyway :) bugs go on trac for fixing, and this particular one’s already been addressed. I can’t tell if it went into the latest version (.8.2.1) or not but it should be fixed in trunk.

    @fel64

    Member

    yes, I’m not giong to modify a core

    buh – do I misunderstand you? You just modified a core file. template-tags.php is as core as anything else.

    But yes, submitting this as a feature request on trac I think is a good idea. :)

    @fel64

    Member

    Log In with the account you use here, then click New Ticket and describe the problem. :)

    @fel64

    Member

    Cool. You’ll find it is an improvement. :)

    That’s really simple. Just change post_form() to post_form('Take some Pizza') or whatever else you want in there.

    (The only reason I know this is I looked into template-functions.php and searched for post_form, then saw this:

    function post_form( $h2 = '' ) {

    which tells me it wants $h2 as an argument. $h2 is the <h2>text here</h2> as you can imagine.)

    @fel64

    Member

    The newest version is ALWAYS an improvement. A BIG improvement. There is NEVER a situation where you shouldn’t upgrade.

    You have a problem and you’re not running the latest version. What do you do? Go upgrade.

    You don’t have a problem. You’re not running the latest version. What do you do? GO UPGRADE.

    Upgrading might not even fix this problem, it’s not sure. But it does fix several security exploits and adds a bunch of featurs. Go upgrade!

    What’s worst is that you’re on a support forum asking for help and you’re not even on the latest version.

    If I wasn’t clear … GO UPGRADE

    @fel64

    Member

    The difference between actions and filters is unclear. In principle, filters are supposed to let you modify data and actions give you a chance to respond to events. This is reflected most in the fact that with a filter, you have to return some data which will be used instead of the data given to you in the first place. For actions, you don’t.

    The syntax is this:

    do_action('action_name', [$argument1, [$argument 2 [...]]]);
    apply_filters('filter_name', [$argument1, [$argument 2 [...]]]);

    I don’t recommend making changes to the core, of course. But if you have to, you would change the last line of topic_time() from this:

    echo _bb_time_function_return( $time, $args );

    to this:

    echo apply_filters('template_time', _bb_time_function_return( $time, $args ));

    and then change the line in the plugin further up to this:

    add_filter('template_time', 'freshness_latestlink', 101);

    taking out the // that comment it out. Also, I’m not sure what topic_class*() is?

    But yeah, don’t modify the core. Much better to stick to the template change from above. :)

    @fel64

    Member

    Don’t worry about it :)

    I’m sorry I wasn’t clearer, that was raw PHP code. So that PHP code runs, you have to put <?php and ?> tags around it.

    <?php
    global $page, $topic;
    $add = topic_pages_add();
    $last_page = get_page_number( $topic->topic_posts + $add );
    if( $page == $last_page ) {
    print( '<h2 class="post-form">POST A REPLY</h2>' );
    }
    ?>

    This just worked for me in my template’s topic.php.

    @fel64

    Member

    It’s a very bad idea to edit template-functions.php or any other core files. What will you do when the next version comes? You should always put custom code in your template or plugin. Did my code not work in your template?

Viewing 25 replies - 376 through 400 (of 1,001 total)