Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 31,526 through 31,550 (of 32,462 total)
  • Author
    Search Results
  • #53175

    the guest posts should be automatically marked as deleted for moderation (if spam = no action, if no spam = undelete) same for new guest topics :)

    #53082
    spencerp
    Member

    Nevermind, much props goes to boyevul on GoogleTalk! ;) ;D The login codes were placed in the theme’s header2.php file, directly after an “onclick” action, which was the culprit.

    So this:

    <div id=”header” onclick=”location.href='<?php bloginfo(‘url’); ?>’;” style=”cursor: pointer;”>

    <h1><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a></h1>

    <?php login_form(); ?>

    <div id=”memlist”><a href="<?php bb_memberlist_link(); ?>">Member List</a></div>

    </div>

    Was changed to this:

    <div id=”header”>

    <h1><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a></h1>

    <?php login_form(); ?>

    <div id=”memlist”><a href="<?php bb_memberlist_link(); ?>">Member List</a></div>

    </div>

    And all was peachy! I didn’t however upload the latest files of bbPress to the online copy, and I didn’t upload the new changes I just made here either.. I will then .. ;) :D

    Either way, problem is solved!

    spencerp

    #50375
    chrishajer
    Participant

    That’s different from my install, my magic_quotes_gpc are “on” and “on”. Now to find out how to get around that for your server…

    What version of PHP are you using? That phpinfo() will tell you, or from the command line, I think php -v

    Also, do you have the ability to use a .htaccess file?

    #52534
    Null
    Member

    Can someone make it as a plugin then :)

    Or some page we can put on our site, but that pulls al the plugins from this site for display?

    #50373
    chrishajer
    Participant

    larmir, do you have an example URL where we can register and test this out? Also, does Dreamhost have a phpinfo() where we could see about magic_quotes_gpc and magic_quotes_runtime? If they do not have that file, can you create a file on your server called info.php or phpinfo.php (name does not matter so long as you know it) and then, in that file, put this:

    <?php

    phpinfo();

    ?>

    That will give all sorts of useful information, including your magic_quotes settings.

    Thanks.

    #53172
    chrishajer
    Participant

    I also agree that posts should be locked after a while to prevent editing. I hate rereading a post I thought I already read, and finding new information there because they edited it after I read it the first time. Maybe the post_time could be updated when it’s edited? Then it would keep bumping to the top?

    I don’t know how to make a plugin yet, but here is what you would change in the core bb-includes/capabilities.php, comment out lines 348 and 349. That seems to do it for me.

    if ( $curr_time - $post_time > bb_get_option( 'edit_lock' ) * 60 )

    $caps[] = 'ignore_edit_lock';

    #52533

    Probably not. There’s a lot of custom code talking to two different servers via http, cron jobs, svn actions and a dozen other things.

    It’s not terribly well abstracted for use on arbitrary sites. To be honest, it’s a little spaghetti :)

    My plan was for bbpress.org/plugins to be open by this past Friday. It will open tomorrow (Monday Jan 8th).

    #53166
    Nicki Faulk
    Member

    so1o, you’re a doll, thank you! :)

    #53171
    Nicki Faulk
    Member

    I’m not sure, but then again I don’t want my users to go back and keep editing posts. I’m kind of control-freaky like that. :)

    Perhaps there’s something that can be added to the code to allow that, or a plugin to do this?

    #53169
    Nicki Faulk
    Member

    There is :)

    In your config.php

    // A user can edit a post for this many minutes after submitting.

    $bb->edit_lock = 60;

    Simply change that value.

    #49605

    In reply to: Emoticons For bbPress?

    Nicki Faulk
    Member

    eek, I take that back, it breaks again when editing a post.

    I hardcoded my install path because I couldn’t find the function name for the home install.

    #1204
    Nicki Faulk
    Member

    This may not need a plugin, but I haven’t seen an easy way to implement via code …

    What I’d like is to redirect a user to the forums index page when he/she logs out. Is this possible?

    Thanks! :)

    #53130
    so1o
    Participant

    ok..

    try this plugin

    <?php

    function your_function_name($where) {

    global $topic;

    if ($topic)

    return $where . ' AND topic_id = ' . $topic->topic_id;

    else

    return $where;

    }

    function get_first_post_of_current_topic() {

    global $bb_post;

    add_filter('get_latest_posts_where','your_function_name');

    $bb_post = get_latest_posts(1);

    if(count($bb_post) == 1 ) {

    $bb_post = $bb_post[0];

    post_text();

    }

    }

    ?>

    where you want call get_first_post_of_current_topic();

    #1203
    Geezerjim
    Participant

    I’ve installed the bb Ratings plugin and put the following code on the front page:

    <h2><?php _e('Highest Ratings'); ?></h2>

    <table id="highest"><col class="wide" />

    <tr>

    <th>Highest Rating</th>

    <th>Rating</th>

    </tr>

    <?php bb_top_topics();

    foreach ($topics as $topic) : ?>

    <tr<?php alt_class('forum'); ?>>

    <td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a>

    </td>

    <td class="num"><div class="rating-holder"><?php bb_rating();?>

    <span class="count"><?php bb_rating_count(); ?>

    </span>

    </div>

    </td></tr>

    <?php endforeach; ?>

    </table>

    The stars show up, the counts are correct, but instead of displaying horizontally which would allow the color to display properly the stars are stacked one on top of the other with the count at the very bottom.

    I know the display works on the plugin repository page, but I haven’t been able to track down what I’ve been doing wrong.

    #52334
    Anonymous User 133554
    Inactive

    I can’t promise anything since I’have never seen IPB database structure nor code, but I can give it a try. Drop me a line at jaime at iteisa dot c0m with the public URI and I’ll have a look at it if you are still interested.

    Jaime.

    #53039

    Changing the ‘name’ value (line 125) from your bb-includes/capabilities.php file would be enough

    #53104
    Nicki Faulk
    Member

    D’oh! I see the upgrade notes now. I swear, they weren’t there before! (I hope, LOL) :)

    #53103
    Nicki Faulk
    Member

    Ok, thought so. Thanks, Trent. :)

    I have one plugin which has init in it (Online List), so I just change that to bb_init, right?

    #53102
    Trent Adams
    Member

    Just code changes. Just file overwrites. Obviously, in the download, there is no:

    .htaccess

    config.php

    /my-templates/

    /my-plugins/

    If you have those files, just keep them and overwrite the rest. I am sure you knew that already, but I thought I would post it in case others come across this thread!

    Trent

    #53111
    spencerp
    Member

    Nice!! I’ll try that out then.. Thanks for updating it, and sharing it! ;) :)

    spencerp

    #53123
    spencerp
    Member

    I agree.. I’d like to see this too!

    +1 for a plugin.. ;) :)

    spencerp

    #53128
    so1o
    Participant

    try this..

    create a plugin with this code..

    function your_function_name($where) {

    global $topic;

    return $where . ' AND topic_id = ' . $topic->topic_id;

    }

    function get_first_post_of_current_topic() {

    add_filter('get_latest_posts_where','your_function_name');

    get_latest_posts(1);

    }

    call get_first_post_of_current_topic in the loop where you show tipc name.

    let me know if works.. this is just a hunch

    cheers

    #53121

    The speed difference is negligable.

    I would always use bb_get_option() so that a “power-user” can softcode the option value into the $bb variable if they want to avoid the extra database hits. bb_get_option_from_db() is mostly useful when you want to override data that has been softcoded (which probably isn’t very often).

    PS: bb_get_option() is the function, ‘bb_get_option_{blah}’ is the filter.

    bb_get_option( ‘my_option’ ) grabs the value for my_option and filters it through anything you’ve defined in the ‘bb_get_option_my_option’ filter. The filter is probably pretty useless for data that plugins store since you probably won’t have to modify on the fly the data that you provided in the first place.

    The filter may be useful for data the core bbPress provides (you might want to filter ‘bb_get_option_page_topics’, for example, so that whenever bbPress core calls bb_get_option( ‘page_topics’ ), you can modify the returned value on the fly).

    #53118

    Here’s some info: https://bbpress.org/blog/2007/01/bbpress-options-api/

    You shouldn’t access the data from the tables directly. It’s possible that at some point we’ll change where the data is stored, so use the API :)

    #53081
    spencerp
    Member

    Alright, I uploaded a copy of my actual Localhost now, to my domain name: http://localhost.spencerp.net/forum/

    You can see what I’m talking about there, well hopefully lol! =P Also, please keep in mind, things might be broke, still screwy.. just register if you can, only for testing purposes.. ;) :)

    Also, this isn’t even near done yet lmao. I got a lot of nice things in mind for this baby.. LoL! =P

    spencerp

Viewing 25 results - 31,526 through 31,550 (of 32,462 total)
Skip to toolbar