Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26,251 through 26,275 (of 32,586 total)
  • Author
    Search Results
  • #70167
    chrishajer
    Participant

    Wow, this thread has attracted some really well-known (infamous?) WordPress people. :-)

    #70526
    _ck_
    Participant

    bbPress has an advanced WHERE filter on every mysql query.

    You could write a plugin that simply tallys their post (and cache that cause you don’t want to do it each time) and then manipulate the WHERE filter based on the result.

    It’s a very strange request so don’t expect me to do it for you ;-)

    See my Hidden Forums plugin to see how the filters work.

    #70460
    nuttycoder
    Member

    haha that makes 2 of us then :) just adjusted the stylesheet as I noticed when lot logged in the login form went over the header section, been fixed now.

    #70461
    Trent Adams
    Member

    You could pretty much make a codex out of your plugins and tips _ck_ :) Another great one!

    #70450
    Huda Toriq
    Member

    Thank you for your response. I’ll take a deeper look into the BB_Query class.

    After reading this question, do you think of a plan to extend the bbPress live plugin so it can transport the query as well?

    I think it’s a great idea. Just my opinion :-)

    #4477
    adam613
    Member

    A little about me: I’m working on a hobby web site. It was going to have a forum, a few database-based applications I’ve written the back-end for, and in the process of deciding what should go on the front page, I figured I should start a blog too. I have a version of the site sort of written using phpBB as the the forum and the templating engine for the web apps, but it’s very frustrating getting phpBB to do what I want it to do…you really can’t do much without editing the core code. On the recommendation of a co-worker, I decided to check out WordPress/bbPress. I’m not sure WP/bbPress is the right solution, but I haven’t found anything I like better….it seems like it’s pretty easy to rearrange things on the page and add new elements as needed.

    What I want: My forum should appear on the site similar to a Page. I don’t think I need “deep integration”…I’m not terribly concerned about data integration, other than the fact that signing into WP should sign you into the forums and vice versa. I don’t need the forum to be able to interact with other pages on the site…if I need data from my other apps in the forum, I’ll just grab it from the database using a forum plugin. But I am concerned about appearance integration…I want the WP header and footer, including my logo and nav bar, to show up at the top of the forum page, and I want the forum theme to be similar to (if not identical to) the WP theme.

    What’s the safest way to make this happen? I’m very new to WP/bbPress, but I’m not afraid to write code…a certain major website pays me a good bit of money do so during the week :)

    #69885
    chrishajer
    Participant
    <div>
    <h3>Backtick test</h3>
    <p>This is in a P block</p>
    This is not
    <?php echo bloginfo(); ?>
    </div>

    #63122

    In reply to: Super Sticky Problem

    _ck_
    Participant

    I think it’s confusing too and I am not sure why they did that.

    You could try at the start of the forum.php template

    global $super_stickies;

    or maybe

    $stickies=array_merge($stickies,$super_stickies);

    but php may renumber the topics causing it to fail.

    or try

    $stickies=$stickies+$super_stickies;

    Of course this will show all super stickies in each forum.

    A real plugin would have to be written to do this properly.

    #63121

    In reply to: Super Sticky Problem

    Yes, I am having the same problem :/

    Even though it is intended to behave like this many users find that confusing.

    I’ve tried modifying the code in forum.php to include the $super_stickies like on the front page but without success…

    <?php if ( $topics || $super_stickies || $stickies ) : ?>

    Is there a workaround?

    #58952
    _ck_
    Participant

    Never hack the core.

    Especially when that function is right there designed to be filtered.

    see this apply_filters( 'get_profile_info_keys', array(

    It means you can make a simple plugin to modify the info keys on the fly.

    Untested but should work as a plugin:

    /*
    Plugin Name: Allow Title Edit
    */
    add_filter ('get_profile_info_keys', 'allow_title_edit');

    function allow_title_edit($array) {
    if (bb_current_user_can('participate')) {
    global $bbdb;
    $array[$bbdb->prefix.'title']= array(0, __('Custom Title'));
    }
    return $array;
    }

    #69973
    _ck_
    Participant

    I think vannak did that, and it’s 10 seconds:

    https://bbpress.org/forums/topic/bbpress-is-slow-like-godaddy-says/page/2#post-21978

    What happens if you upload a random file and name it test.txt ?

    Since it can’t modify the php file, I guess it won’t be able to modify the text.txt file either but maybe it’s only because the php file is open by the same process.

    #69969
    chrishajer
    Participant

    _ck_

    Sorry, that didn’t work. More errors this time. It’s making GoDaddy look worse and worse.

    Warning: fopen(D:Hosting123456htmlgodaddytesttest.txt) [function.fopen]: failed to open stream: Permission denied in D:Hosting123456htmlgodaddytestdefault.php on line 9

    Warning: fclose(): supplied argument is not a valid stream resource in D:Hosting123456htmlgodaddytestdefault.php on line 9

    Warning: chmod() [function.chmod]: No such file or directory in D:Hosting123456htmlgodaddytestdefault.php on line 9

    Warning: touch() [function.touch]: Unable to create file D:Hosting123456htmlgodaddytesttest.txt because Permission denied in D:Hosting123456htmlgodaddytestdefault.php on line 11

    0.00039196014404297 seconds

    #70386

    It was a legal thing that stemmed from their split with YABB (they used to be YABBSE) and people taking their code and claiming it was theirs. How rude! YABB, by the way, stored passwords in CLEAR TEXT at the time that all went down. I think it was 8 years ago?

    Anyway, it’s not an inability, it was a decision based on a bunch of jerks. They’re good coders, and decent peoples.

    #70443
    ganzua
    Member

    Thanks for the code John :) Half the results but it actually could solve the 404 problem.

    However, adding a get_settings(‘home’) to the search form makes this search;

    /wordpress/wordpress/bbpress/?s=

    I had in mind that perhaps anybody developed a wordpress plugin that could search both, wp and bb and then display the results, first all the wp entries and next all the bb entries.

    Or maybe a conditional in the wp template where I placed wp searcher; first the wp searcher with anything similar to John’s get_settings(‘home’) and then a conditional; if this is bbpress then use bbpress searcher and append the results. I already have a function to create bb conditionals in wp;

    function is_bbpress() {
    global $bb;
    return $bb ? true : false;
    }

    There is another search plugin for bbPress that appends a WordPress search to the bbPress search.

    I wanted all the contrary :) a wp plugin that appends bb results at the end of the search.

    BTW, after finding the searcher issue I realized that 404 templates need integration too.

    #4469
    _ck_
    Participant

    You might want to create a static page outside of your bbPress installation that still uses the matching header and footer you have in bbPress. Well it’s very easy.

    Make yourself a directory above bbPress with any name you’d like, let’s say “/about/”

    In “/about/” make an index.php with this content:

    <?php
    require('../forums/bb-load.php'); // change /forums/ to your actual forum path
    add_action('bb_head','about_css');
    include(bb_get_active_theme_uri()."header.php");

    function about_css() { // put any custom CSS you want in here
    echo '<style>
    img {border:0;}
    </style>';
    }
    ?>

    <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; About</h3>

    <h2>About</h2>

    Your "about" text goes here!

    <?php include(bb_get_active_theme_uri()."/footer.php"); ?>

    #70442

    Using deep integration, if you load the WordPress search box into the header of bbPress, you can still search WordPress alone if you use something like

    <form id="searchform" method="get" action="<?php echo get_settings('home'); ?>">

    This way the search form is using the WordPress root directory as it’s destination rather than trying to redirect to a bbPress file.

    As far as a unified search solution, the problem there really then becomes which engine do you use to display the results, WP or BBP? Either way it requires a plug-in on that relative side of the equation. It’s certainly possible, but you’re only making 50% of your audience happy at that point, because the other 50% will want it the other way.

    #69967
    _ck_
    Participant

    vannak, 10 seconds is very bad (the time is independent of where you access it from)

    chrishajer, something’s not right there, Windows must think you don’t have access rights to write to the directory. Whatever Windows’s equal to chmod has to be done.

    According to php.net the chmod in php actually does do something on some windows setups.

    So try replacing this line, like so:

    $file=dirname(__FILE__)."/test.txt"; $h=fopen($file, "wb"); fclose($h); chmod($file, 0777 );

    #69882
    Sam Bauers
    Participant

    Just found out that entities behave really strangely in bbPress. For some reason the standard behaviour is to take unencoded entities and encode them when editing a post.

    #67554
    chrishajer
    Participant

    Ah, sorry. The URL button specifically. Missed that.

    #69964
    chrishajer
    Participant

    _ck_

    I needed to change the /test.txt to \test.txt, but even once that was done, I get this error (prior to this, the filename and path were not right):

    Warning: file_put_contents(D:Hosting123456htmlgodaddytesttest.txt) [function.file-put-contents]: failed to open stream: Permission denied in D:Hosting123456htmlgodaddytestdefault.php on line 9

    Warning: touch() [function.touch]: Unable to create file D:Hosting123456htmlgodaddytesttest.txt because Permission denied in D:Hosting123456htmlgodaddytestdefault.php on line 11

    0.00028681755065918 seconds

    #69880
    chrishajer
    Participant

    I tried to post 1&1 and it comes up 1&1.

    edit Dec 20, 2008:

    this is fixed so the comment above looks like there was never anything wrong :-)

    #70384

    Vbulletin makes me want to cry, regularly. I used to use Invision (someone else paid for it) but their templating system made every upgrade a two day project. SMF similarly, though the code is much easier. That ain’t saying much :/

    Not that I think bbPress is perfect. If I had to pick anything but bbPress, I’d do SMF.

    #70458

    In reply to: button for guests

    johnnydoe
    Member

    thank’s a ton ck, that was the right one, with a little <?php else : ?> modification of course :)

    helpful as usual.

    @Ipstenu

    nope a button was really necessary, but thanks anyways :)

    #69879
    _ck_
    Participant

    Sam this is still broken. See the previous post. there are &38;‘s all over the site.

    #68538
    _ck_
    Participant

    Very nice and clean. Needs a tiny splash of color. Topic Icons plugin should do it ;-)

Viewing 25 results - 26,251 through 26,275 (of 32,586 total)
Skip to toolbar