Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

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

    #4466
    johnnydoe
    Member

    hello,

    i’d like to add an extra register button to the frontpage of bbpress, i tried the following code, but i had no luck (not to mention that my php knowledge is more than just basic)

    <?php if ($user->user_exists != 0) : ?>
    <li id="register_now"><a href="register.php" class="pagelink">Join Now</a></li>
    <?php endif; ?>

    thanks a bunch

    #69961
    _ck_
    Participant

    Well we don’t need to pinpoint exactly the server configuration as the timing will never be exactly the same twice on the same machine. But it will be within a very close range. What we are looking for are times that are way beyond one second.

    I’ll do some more digging over the weekend against some of the more popular hosts.

    I want to see it run on godaddy though. That will be interesting. I’m sure I can find a good discount coupon code to get the first month very cheap so I’ll give that a go if so.

    #69960

    Turns out mine aren’t the same (exactly).

    Server 1

    Operating system 	Linux
    Kernel Version 2.6.9-55.0.9.ELsmp
    Apache version 1.3.41 (Unix)
    PERL version 5.8.8
    PHP version 5.2.4
    MySQL version 5.0.67-community

    Server 2

    Operating system 	Linux
    Kernel Version 2.6.9-67.0.4.ELsmp
    Apache version 1.3.37 (Unix)
    PERL version 5.8.8
    PHP version 5.2.1
    MySQL version 5.0.51a-community

    #69959
    _ck_
    Participant

    They could find someone else to run it.

    Or some hosts have a free trial period (though that is less and less thanks to spammers).

    Your linux desktop is why it is so fast.

    So my theory is right, under 1 second is excellent, around 1 second is good.

    Anything much higher is suspect.

    But I need more NFS candidates, will have to see if I have access on some of these old servers.

    Let’s see if I can run it on NearlyFreeSpeech.

    Aha! They are NFS. 13.26 seconds

    For those that get an error even when the file is chmod 777, you’ll have to create a testing directory and move the file into there. Then chmod 777 the directory and change the first line to

    error_reporting(E_ALL); $file=dirname(__FILE__)."/test.txt"; file_put_contents($file,''); $time=strtok(microtime(),' ')+strtok('');

    #70447
    _ck_
    Participant

    Headers already sent is a useless error in itself, it’s always the result of another error (unless the very rare case someone meant to send a custom header of some kind).

    In this case at least you posted the real error:

    Warning: parse_url(http://#postform) [function.parse-url]

    Any chance you are testing this on a localhost or something like that?

    Kind of a strange error that it’s getting a bad url like like, there’s no domain name at all.

    #69957
    _ck_
    Participant

    Thanks for the feedback Ipstenu and Chris!

    When you say “1&1 root server” is that a dedicated or vps or something like that?

    Interesting your desktop is very fast compared to mine, is it Windows or Linux? If it’s Windows, is it NTFS or FAT32? I wonder what my windows bottleneck is, or maybe basically it just doesn’t cache the filetables on FAT32.

    I should enhance that code to show if the server is in safemode or not and what functions are disabled in PHP. Could be a handy tool for evaluating potential hosts.

    #70440
    ganzua
    Member

    I actually realized that I have a problem when using wordpress searcher after deep integration because it doesn’t work if you are browsing bbpress.

    I have wp searcher in the wp header and I load this header into bbpress. Whenever you try to search while being in bbpress yo get a 404 error because the link of the search is this one;

    /wordpress/bbpress/index.php?s=lorem

    #4462
    ganzua
    Member

    Is there any plugin or anyway that allows wordpress searcher search bbpress topics?

    I saw CK super-search plugin but it seems it is only for bbpress :(

    #70439

    Wild. It sounds like something got corrupted or not uploaded. Glad it’s working now! I love your site design :)

    #70148

    I just checked and I can reproduce that error logged in as Key Master when I go to edit their profile.

    If someone registers via WordPress, all the roles show up as:

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in <b>/domain.com/forums/bb-includes/functions.bb-template.php on line 2021

    Below that, under ‘Allow this user to …’ I get this

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/jorjafox/public_html/forums/bb-includes/functions.bb-template.php on line 2036

    It’s not pulling the data correctly, since if I manually set them to Member, it works fine. Previously on 1.0alpha1 and alpha2, when I had users on bb with ‘no’ role, I could re-apply the WordPress Role link up (just click save) and magically everyone was fixed.

    #69954
    _ck_
    Participant

    I’d like to see some feedback on my experimental NFS detector below.

    Be sure to chmod 777 it after you upload or it won’t work.

    Delete after you are finished with it for security.

    Dreamhost takes over 7 seconds, sometimes more.

    My apache servers with local storage take less than one second.

    My Windows XP with XAMPP takes 12 seconds (old slow IDE drives)

    <?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=__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";
    ?>

    #70276

    Well, the best little part about installing bbPress in a sub directory, is that in WordPress if you’re using the pretty permalinks and make a “Forums” page, the slug will be “forums” and when clicked it will just route the users right to the forums instead of to the WP page. :)

    #70275
    _ck_
    Participant

    >> bbPress installed in a sub-directory of WordPress

    That’s almost cheating, it’s too easy ;-)

    You should do it off a different directory from the webroot.

    But good idea in general, someone did this awhile back with 0.8 (and then stuffed a bunch of ads in it).

    #70144
    Justin Tadlock
    Participant

    The biggest issue I’m having with this version and the latest version of the WP/BB Integration plugin is that the user roles aren’t being carried over to bbPress when a user registers in WordPress.

    They always end up with no role set.

    This is the error when editing the user’s profile when no role is set:

    <select name="role">
    <option value="keymaster"<br />
    <b>Warning</b>: array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The second argument should be either an array or an object in <b>/domain.com/forums/bb-includes/functions.bb-template.php</b> on line <b>2021</b><br />

    >Key Master</option>
    <option value="administrator"<br />
    <b>Warning</b>: array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The second argument should be either an array or an object in <b>/domain.com/forums/bb-includes/functions.bb-template.php</b> on line <b>2021</b><br />
    >Administrator</option>
    <option value="moderator"<br />

    <b>Warning</b>: array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The second argument should be either an array or an object in <b>/domain.com/forums/bb-includes/functions.bb-template.php</b> on line <b>2021</b><br />
    >Moderator</option>
    <option value="member"<br />
    <b>Warning</b>: array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The second argument should be either an array or an object in <b>/domain.com/forums/bb-includes/functions.bb-template.php</b> on line <b>2021</b><br />

    >Member</option>
    <option value="inactive"<br />
    <b>Warning</b>: array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The second argument should be either an array or an object in <b>/domain.com/forums/bb-includes/functions.bb-template.php</b> on line <b>2021</b><br />
    >Inactive</option>
    <option value="blocked"<br />

    <b>Warning</b>: array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The second argument should be either an array or an object in <b>/domain.com/forums/bb-includes/functions.bb-template.php</b> on line <b>2021</b><br />
    >Blocked</option>
    </select>

    Aside from this, everything else has been working great for me.

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