AphelionZ (@aphelionz)

Forum Replies Created

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

    @aphelionz

    Participant

    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

    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

    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

    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

    indeed…

    In reply to: freshness = -1 years

    @aphelionz

    Participant

    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

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

    In reply to: freshness = -1 years

    @aphelionz

    Participant

    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

    correct! works now!

    In reply to: bbPress 0.73 released

    @aphelionz

    Participant

    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

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

    @aphelionz

    Participant

    http://pastebin.com/814442

    cool site, btw!

    @aphelionz

    Participant

    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

    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

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

    @aphelionz

    Participant

    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

    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

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

    In reply to: hello from Russia

    @aphelionz

    Participant

    Hello from America!

    dyduiryuituio8t — you must explain your username to me!

    @aphelionz

    Participant

    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

    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

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

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

    @aphelionz

    Participant

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

    @aphelionz

    Participant

    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

    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)