ardentfrost (@ardentfrost)

Forum Replies Created

Viewing 25 replies - 51 through 75 (of 225 total)
  • Your answer is in the database. Try to find it, but if you can’t, I’ll give you the answer :)

    There is no instructions on how to write plugins as far as I know. You just gotta do it like the rest of us: look through the code and figure out how it’s written. It’s not too hard and it’s written logically. You need to be able to either grep or search inside the files (there’s a way to search inside php files using windows search). If you want to look for hooks, look for add_action or add_filter and see where they all are. If you want to see how to use them, look through other plugins.

    And if you have specific questions, these forums are here and there are plenty of people who try to help :)

    change $user to $bb_current_user

    If you’re in a function, be sure to add that to the globals. If you’re in just a template file, no need to.

    I was referring to scale. Unless it’s in the core, it’s too large to expect others to make their code friendly with your code. If you have a thousand plugin authors and 10% of them do that, it just seems unreasonable that the other 900 will add 100 different things to their code to be friendly with other plugins. And if those 10% each write multiple plugins that way, it’s even MORE things the other 900 have to add to all their plugins.

    It’s nothing against YOU, it’s just that you have to think about scale, and what you’re asking isn’t scalable.

    I do this on my page. Code looks like this:

    <h1><a href="http://www.rayd.org/"><?php option('name'); ?></a></h1>

    Perhaps, but if you’re looking for ease, it’s WAY easier to get the user to add what they want than to ask all plugin creators to add variables into their plugins. The second request is probably unreasonable even… especially when bbpress REALLY takes off and there are 98120948124 plugins available.

    Anything is possible.

    Instead of doing it the way you’re suggesting, why not have what you’re doing interact with s010’s site options plugin and let the end user add what pages he wants to the menu system. Then you simply put the values needed into an array and foreach them out dynamically. The user can call the pages whatever they want and link to whatever page they want in the menu.

    In reply to: Quote Option

    No matter what, you’ll need blockquote stuff in your css file, but this plugin is something I’ve been meaning to tackle for a while (it’s on the to-do list on my site even). So I’m sure it’ll be done one of these days, if not by me, by someone.

    make it so that when someone is using ie6, it says “upgrade dammit!” :)

    In reply to: Time Format

    BTW, that displays something like this:

    01/05/07 at 10:21:21

    In reply to: Time Format

    Here’s how I do it in my private messages plugin

    strftime("%m/%d/%y at %r",strtotime($timevar)+($bb->gmt_offset * 60 * 60))

    Where $timevar is the time that I passed to the function.

    Hmm, I don’t think any bbpress functions are loaded when your WP is loaded is it? If not, then you’ll have to build the link from scratch. Link building in bbpress is one of those things you just gotta figure out from doing it a few times (and staring at core code).

    Since you’re doing it specifically for your forums, it doesn’t necessarily have to be in plugin form (which is preferable for me since I never made WP plugins). So I would do something like this:

    Look at the code used to get the logged in user’s name.

    Get the ID of that user anyway you can (you can search the db for the username or use a wp function that I don’t know about).

    Start the link formation like $link = “http://zenhelix.us.to/forums/profile/&#8221;

    Then you can either add the user ID directly to the end using a regular expression ( add a .$userid to the end of the previous line) or just do $link += $userid;

    Setup the link with the a href and all that junk.

    I wish I could give you more specific code, but like I said, I’ve never done much WP coding.

    I didn’t know jack about much of this stuff 2 months ago. I had programmed before, but nothing super special (I did an RSS parser for me and my friends’ main webpage, rayd.org). I just kinda got ambitious with this stuff.

    Everything you need to know to do this stuff is in the core code (I’ve pulled so many stylistic and methodological things from preexisting code) and php.net. The only thing you need beyond that is ambition. Mine pretty much peeked when I did Private Messages. I can’t think of another project that will require that much work (though I’m sure there are, I just can’t think of any for now). :)

    I never get annoyed :)

    I’ve been so busy at work I haven’t had a chance to update my PM plugin yet. It’s still next on my docket. I’ll add your request to my list of things to do.

    Last time I sat down to work on it, I was having trouble adding a user search feature… so there’s still that ;)

    $first_post = $bbdb->get_results("SELECT * FROM $bbdb->posts WHERE topic_id = $topic->topic_id AND post_position = 1");

    That will give you the post OBJECT… from there you can pull out the text like this:

    echo $first_post->post_text;

    Or since it seems you want to pull out just the first little bit, just use a php string function to make it look and act like you want it to.

    It’s not the most eloquent method, but it’s certainly simple.

    One of these days I’ll do it… I’ve been super busy at work. Should slow down soon

    Install my Member List plugin. It makes it VERY easy to delete users. I spend 30 seconds doing it every few days.

    If you couple it with the onlinelist by… who did that one, mbyte? Anyhow, if you install that one too, you can see if the user has ever visited your site from their profile menu so you don’t delete any REAL users.

    I know it’s not the best solution (the best being one that is automatic) but it’s a quick one.

    In reply to: Wap version of bbPress

    Man, looks like I’ll have to move to some better forum software in the year 6354 then :D

    Same thing happened to me in one of mine. I was using get_header instead of bb_get_header. Silly mistakes are the worst when you need help finding them ;)

    Users being ACTUALLY deleted looks like the only big change I’ll have to make on a plugin.

    get_top_tags($recent, $limit) will return an array of tag objects… each object contains the tag ID, tag (tag all lower case), raw tag (tag how it was typed), and tag count (how many times the tag is used). To get the link to a specific tag, you use get_tag_link(). You’d want to use the get_top_tags function like this: get_top_tags(false, X) where X is the number of tags you want displayed.

    You can also pull the tags straight from the database. Here’s the code used in functions.php:

    $tags = $bbdb->get_results("SELECT * FROM $bbdb->tags ORDER BY tag_count DESC LIMIT $limit")

    I’d take out the limit part if you want all the tags. Then, if you want a drop down menu, you can just do this (this is from my head and untested, so it might not work if copy and pasted):

    if(!empty($tags) ) :

    echo '<select name="userid" id="userid">';

    foreach( $tags as $tag) :

    echo "<option value='$tag->raw_tag'>$tag->tag</option>";

    endforeach;

    echo '</select>';

    else:

    echo "No tags exist";

    endif;

    Then you just gotta figure out how to either redirect to the desired page using POST data or something like that. Not exactly sure how I’d go about it.

    An earthquake in Taiwan knocked out my box in Atlanta? :)

    Run a tracert on the server and paste it to me ( tracert www.rayd.org ). A lot of China is blocked off at the firewall due to spammers, so if you give me that info I should be able to make it available to you.

    Good catch d3x7ro.

    And I didn’t see all that back and forth between spencer and nitallica til now (sorry). I have to fix the PM plugin for better WPMU support like I did memberlist. That’s next on my list, I just haven’t had a chance yet. Hopefully soon though.

    In reply to: Plugin – Member List

    yeah, so, this is what’s in functions.php (core file)

    function bb_get_option( $option ) {

    global $bb;

    switch ( $option ) :

    case 'uri' :

    return $bb->domain . $bb->path;

    break;

    ...

    So, all it does it return those exact two things you posted concatenated together. It makes no sense for the developed link to have a /forums/ in it.

Viewing 25 replies - 51 through 75 (of 225 total)