AphelionZ (@aphelionz)

Forum Replies Created

Viewing 25 replies - 51 through 75 (of 84 total)
  • In reply to: img tags

    AphelionZ
    Participant

    @aphelionz

    function outlet_encode_bad( $text ) {

    $text = wp_specialchars($text);

    $text = preg_replace('|<(/?strong)>|', '<$1>', $text);

    $text = preg_replace('|<(/?em)>|', '<$1>', $text);

    $text = preg_replace('|<(/?a.*?)>|', '<$1>', $text);

    $text = preg_replace('|<(/?ol)>|', '<$1>', $text);

    $text = preg_replace('|<(/?p)>|', '<$1>', $text);

    $text = preg_replace('|<(/?img.*?)>|', '<$1>', $text);

    $text = preg_replace('|
    |', '
    ', $text);

    $text = preg_replace('|<(/?ul)>|', '<$1>', $text);

    $text = preg_replace('|<(/?li)>|', '<$1>', $text);

    $text = preg_replace('|<(/?blockquote.*?)>|', '<$1>', $text);

    $text = preg_replace('|<(/?code)>|', '<$1>', $text);

    $text = preg_replace(“|(.*?)|se”, “‘' . encodeit('$1') . '‘”, $text);

    return $text;

    }

    ..should work, but doesn’t.

    Ok, how bbPress does it is that it takes every < and > and replaces them with the &lt; and &gt; characters.

    Then, it goes through the above list (the exceptions) and turns the lt’s and the gt’s back to actual <‘s and >’s. I can’t get it to recognize the img tag though, because regular expressions confuse the hell out of me. If anybody can get it to recognize the img tags, you’d be making a lot of people happy. For now I am going to take a break…

    In reply to: img tags

    AphelionZ
    Participant

    @aphelionz

    Added this to the above function… still nothing

    function outlet_encode_bad( $text ) {

    $text = wp_specialchars($text);

    $text = preg_replace('|<(/?strong)>|', '<$1>', $text);

    $text = preg_replace('|<(/?em)>|', '<$1>', $text);

    $text = preg_replace('|<(/?a.*?)>|', '<$1>', $text);

    $text = preg_replace('|<(/?ol)>|', '<$1>', $text);

    $text = preg_replace('|<(/?p)>|', '<$1>', $text);

    $text = preg_replace('|<(/?img)>|', '<$1>', $text);

    $text = preg_replace('|
    |', '
    ', $text);

    $text = preg_replace('|<(/?ul)>|', '<$1>', $text);

    $text = preg_replace('|<(/?li)>|', '<$1>', $text);

    $text = preg_replace('|<(/?blockquote.*?)>|', '<$1>', $text);

    $text = preg_replace('|<(/?code)>|', '<$1>', $text);

    $text = preg_replace(“|(.*?)|se”, “‘' . encodeit('$1') . '‘”, $text);

    return $text;

    }

    add_filter( ‘encode_bad’, ‘outlet_encode_bad’, -1, 3);

    There’s also the bb_autop function but that unfortunately is beyond me… I can barely understand regex as it is.

    Anyone?

    In reply to: img tags

    AphelionZ
    Participant

    @aphelionz

    hmm.. thats essentially just a print statement in edit-form.php in the templates folder… I added it but it did not help.

    In reply to: img tags

    AphelionZ
    Participant

    @aphelionz

    I just tried plugin-izing that but it didn’t work either… what are we missing?

    <?php

    /*

    Plugin Name: Allow <img> tags in posts

    Plugin URI: https://bbpress.org/forums/topic/149

    */

    function outlet_bb_allowed_tags() {

    $tags = array(

    'a' => array(

    'href' => array(),

    'title' => array(),

    'rel' => array()),

    'img' => array(

    'src' => array(),

    'alt' => array(),

    'title' => array()),

    'blockquote' => array('cite' => array()),

    'br' => array(),

    'code' => array(),

    'em' => array(),

    'strong' => array(),

    'ul' => array(),

    'ol' => array(),

    'li' => array()

    );

    return apply_filters( 'bb_allowed_tags', $tags );

    }

    add_filter( 'bb_allowed_tags', 'outlet_bb_allowed_tags', -1, 3);

    ?>

    In reply to: img tags

    AphelionZ
    Participant

    @aphelionz

    indeed…

    In reply to: freshness = -1 years

    AphelionZ
    Participant

    @aphelionz

    https://bbpress.org/forums/topic/30?replies=5

    looks like this is already being discussed – the time zone isyour server time, not yours. the two may be different. My server is in California while I like on the east coast… i had to set it to -7.

    In reply to: bbPress 0.73 released

    AphelionZ
    Participant

    @aphelionz

    Now you guys just need to make a wiki, and a gallery!!! :-D

    In reply to: freshness = -1 years

    AphelionZ
    Participant

    @aphelionz

    I’m having this same problem – little bit of patience/debugging shows that it stops reading “-1 years” after some time and starts behaving normally, but the time is still incorrect (off by some hours)


    AphelionZ
    Participant

    @aphelionz

    correct! works now!

    In reply to: bbPress 0.73 released

    AphelionZ
    Participant

    @aphelionz

    Great work! You and the rest of the bbPress team (whoever that might be) should be commended for your fast, quality development.

    PS. the plugin works now and i’m so PSYCHED!


    AphelionZ
    Participant

    @aphelionz

    ok, no worries! I’m itching for it… itching!


    AphelionZ
    Participant

    @aphelionz

    http://pastebin.com/814442

    cool site, btw!


    AphelionZ
    Participant

    @aphelionz

    the beauty of the .htaccess approach is that users wont be able to access *anything* inside of the forums directory without a password or intermediate to advanced haXXing skillz.

    Is there anything in your control panel that allows you to do this? Look into it.


    AphelionZ
    Participant

    @aphelionz

    This is very hacking debugging but I put another print statement in, this time inside the custom function which prints “the code is being executed”

    when the wpbb_user_sanitize function and that does not display on the page at any point during any sort of login, successful or unsuccessful.

    Is there anything else you can suggest?

    In reply to: sports template

    AphelionZ
    Participant

    @aphelionz

    I love seeing what people come up with for these forums! Good work.


    AphelionZ
    Participant

    @aphelionz

    the one-word-login thing is inferior to wordpress’ login, which allows spaces in usernames. This will become problematic to people who are integrating with WP.

    I agree though, that row should be added to the table.


    AphelionZ
    Participant

    @aphelionz

    http://www.javascriptkit.com/howto/htaccess3.shtml

    There’s a (not) trivial tutorial on there, but you can do it! Just focus. If you don’t want users to even try to access it, dont provide a link, just email your dudes with the URL.


    AphelionZ
    Participant

    @aphelionz

    It still does not work. My forum is at outletzine.org/forums2

    In reply to: hello from Russia

    AphelionZ
    Participant

    @aphelionz

    Hello from America!

    dyduiryuituio8t — you must explain your username to me!


    AphelionZ
    Participant

    @aphelionz

    The quickest way to hide the forums is to simply delete the elements from the UI in the templates. Do you edit HTML or know somebody that does?

    Just use <!– and –> to comment out the registration link, or comment out the php that renders it

    You can also use an .htaccess file to make your forums directory password protected with a master user:pass.

    If this is over your head, like i said, ask somebody. ask me! :)

    The login problem seems to be troubling a lot of people, including myself.


    AphelionZ
    Participant

    @aphelionz

    I got that and since it was a fresh install I just over wrote all of the files and re-uploaded it.

    that seemed to work. __ is part of the i10|n thing which is probably in bb-includes…. debugging this would be a major pain, I’d say just copy the files over again.


    AphelionZ
    Participant

    @aphelionz

    Lucky for you, there’s already a thread about this –

    https://bbpress.org/forums/topic/3?replies=18


    AphelionZ
    Participant

    @aphelionz

    Has nobody else had this problem with spaces in the username?


    AphelionZ
    Participant

    @aphelionz

    Is the server returning any other database driven info anywhere else on your site? like is there anything else besides your forums that requires mysql data, and is that behaving properly?


    AphelionZ
    Participant

    @aphelionz

    define(‘BBDB_NAME’, ‘themboy7_bbpres’)

    not “themboy7_bbpress”?

    if that’s not the case then you should perhaps contact your ISP to see if the database server is up and running (unless you can tell because your page is successfully completing other mysql queries)

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