Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26,176 through 26,200 (of 32,495 total)
  • Author
    Search Results
  • #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 ;-)

    #70457

    In reply to: button for guests

    _ck_
    Participant

    You almost have it. Try it this way:

    <?php if (bb_is_user_logged_in()) : ?>
    <li id="register_now"><a href="<?php bb_option('uri'); ?>register.php" class="pagelink">Join Now</a></li>
    <?php endif; ?>

    #70456

    In reply to: button for guests

    And using <?php login_form(); ?> to show login info with the register link won’t do?

    #69963
    _ck_
    Participant

    Make a directory called test, go in there and put this version of the script in there:

    <?php
    /*
    Experimental NFS detector - upload this file to server and chmod 777
    Script should take less than one second to run.
    If it takes more than one second, then it's likely NFS (or Windows or a bad configuration)
    Any error means the time is unreliable as the script has failed.
    */
    error_reporting(E_ALL);
    $file=dirname(__FILE__)."/test.txt"; file_put_contents($file,'');
    $time=strtok(microtime(),' ')+strtok('');
    for ($i=0; $i<=9999; $i++) {if (touch($file)) {clearstatcache(); filemtime($file);} else {break;}}
    echo ((strtok(microtime(),' ')+strtok(''))-$time)." seconds";
    ?>

    #67553
    _ck_
    Participant

    I am changing the behavior to be more intuitive.

    If they have highlighted text, it will create a link for them by just asking for the link.

    If there is no highlighted text, it will first ask for the link, then it will ask for the text for the link.

    Replace this function by with it’s one new line in BBcode-Buttons.js

    function edInsertLink(i, defaultValue) {
    if (!defaultValue) {defaultValue = 'http://';}
    if (!edCheckOpenTags(i)) {
    var URL = prompt('Enter the URL' ,defaultValue);
    if (URL) {BBcodeButtons.tagStart = ''; edInsertTag(i);}
    if (edCheckOpenTags(i)) {var myValue = prompt('Enter the text for the link', ''); edInsertContent(myValue); edInsertTag(i);}
    }
    else {edInsertTag(i);}
    }

    Or download 0.0.8 shortly.

    #67552
    _ck_
    Participant

    No I think they mean specifically the URL button.

    I see the problem too.

    Investigating…

    Okay the problem is you either have to highlight text you want to make into a link, or finish the link with the close URL button again. And there has to be text within the . I guess I need to make it less sensitive/work more intuitively.

    #67551
    chrishajer
    Participant

    @fernandot: this worked fine for me. I see the buttons and used them and it works just fine. See my test post. Firefox 3.0.5

    http://ayudawordpress.com/foro/

    #69962
    chrishajer
    Participant

    On a Windows server (GoDaddy) there isn’t such a thing as 777 permissions is there? It looks like 777 in my FTP client anyway, even though they’re not shown as such.

    I get this error there:

    Warning: touch() [function.touch]: Utime failed: Permission denied in D:Hosting123456htmlgodaddynfs.php on line 9
    0.00044894218444824 seconds

    This is a GoDaddy Windows hosting account.

    #67550
    Fernando Tellado
    Participant

    Same problem. I see the markups but doesn’t work :(

Viewing 25 results - 26,176 through 26,200 (of 32,495 total)
Skip to toolbar