Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 32,126 through 32,150 (of 32,314 total)
  • Author
    Search Results
  • #50769
    Aaron
    Participant

    Theere is this,

    https://codex.wordpress.org/User:RobLa/bbPress_Auth_for_MediaWiki

    it might be a little old, but I think it is relevant. MediaWiki / WP /bbPress

    #831
    n0mer
    Member

    Hi again, what about grouping forums?

    F.ex. if 10 forums already exist (http://jug.org.ua/forum/forums/list.page , i want to switch this forum to bbPress), it is handy to sort them out in some way.

    Or just add smth. like “separator” :) between forum groups

    And, do smth. with forum deletion; it can be quite complex and painful process to place existing topics, tags and comments somewhere.

    #830
    #50524
    AphelionZ
    Participant

    Make a my-templates folder, and inside of it copy front-page.php from your bb-templates folder. In the new file, move some stuff around :)

    The templates are nice and simple so anybody that can read a small, I stress simple piece of HTML with a few embedded PHP tags can understand them.

    #49596

    In reply to: Emoticons For bbPress?

    AphelionZ
    Participant

    n22 – in your forums folder there’s a folder called bb-templates. make a new folder called my-templates and copy these files from bb to my template folder – edit-form.php, post-form.php

    Edit those files – find the only instance of textarea in them and put that php code (just copy and paste, it’s ok!) in a reasonable spot nearby. For example, they said above, but i chose below because i thought it worked better. All depends on the template.

    PS – GREAT JOB! It worked perfectly for me

    #50775

    In reply to: Img tag plugin

    https://bbpress.org/plugins/topic/5

    (The plugin browser you’ll see at that link is still in the early stages of its development. Go easy on it :) )

    #50766

    nolageek, That information will mostly be useful to plugin authors. You probably won’t need to know that in order to customize your site.

    I hope not, anyway :)

    #50765
    ear1grey
    Member

    Thx Mike; perfick.

    @nola: the short version is that if you already have the topic (which I do because I’m using this in the topic.php template), then instread of saying: echo bb_get_topicmeta($topic->ID, "mykey"); whichis what I was expecting, there is the somewhat easier echo $topic->my_key;

    #50764
    Nola1974
    Participant

    Unlike WP, topic meta is accessed throught the topic object.

    update_topicmeta( 5, 'my_meta', 'yay' );

    $topic = get_topic( 5 );

    echo $topic->my_meta; // outputs: yay

    Um. What? I see this isn’t going to be a fun forum system to customise if you’re not a PHP programmer. I have NO IDEA what the above means. (I dont mean that as a slam, just a declaration that I’m in over my head at this point.)

    #50773

    In reply to: Img tag plugin

    Nola1974
    Participant

    why between code tags? I thought the point of the code tag was that it outputted code instead of performing it?

    #50042

    In reply to: Can’t Login…

    wiimanes
    Member

    Having the same difficulties. You can check what I mean by registering on my website and trying to log on:

    http://gopokewiids.com/boards

    I set up an integrated bb and wordpress message board, and the integration is definitely working. Sadly, I can’t log in at all. No idea what’s wrong. I log on as the admin, and it just goes back to the index.php as if I never logged in. If I try logging in with false info, then it says: Login failed, this username does not exist. It’s defintely running some sort of script after I press submit, but it isn’t logging me in :(

    Suggestions? Mdawaffe, you seem to have a good undertanding, being the key master and all :D

    #680
    Hyper123
    Member

    I’m trying to install bbpress and the config file is correct. The error I receive is,

    microsoft.com/kb/q176113/ if ( !function_exists(‘wp_redirect’) ) : // [WP4273] function wp_redirect($location, $status = 302) { global $is_IIS; $location = preg_replace(‘|[^a-z0-9-~+_.?#=&;,/:%]|i’, ”, $location); $location = wp_kses_no_null($location); $strip = array(‘%0d’, ‘%0a’); $location = str_replace($strip, ”, $location); if ( $is_IIS ) { header(“Refresh: 0;url=$location”); } else { status_header($status); // This causes problems on IIS header(“Location: $location”); } } endif; if ( !function_exists(‘bb_verify_nonce’) ) : function bb_verify_nonce($nonce, $action = -1) { $user = bb_get_current_user(); $uid = $user->ID; $i = ceil(time() / 43200); //Allow for expanding range, but only do one check if we can if( substr(wp_hash($i . $action . $uid), -12, 10) == $nonce || substr(wp_hash(($i – 1) . $action . $uid), -12, 10) == $nonce ) return true; return false; } endif; if ( !function_exists(‘bb_create_nonce’) ) : function bb_create_nonce($action = -1) { $user = bb_get_current_user(); $uid = $user->ID; $i = ceil(time() / 43200); return substr(wp_hash($i . $action . $uid), -12, 10); } endif; // Not verbatim WP, bb has no options table and constants have different names. if ( !function_exists(‘wp_salt’) ) : function wp_salt() { global $bb; $salt = $bb->secret; if ( empty($salt) ) $salt = BBDB_PASSWORD . BBDB_USER . BBDB_NAME . BBDB_HOST . BBPATH; return $salt; } endif; if ( !function_exists(‘wp_hash’) ) : function wp_hash($data) { $salt = wp_salt(); if ( function_exists(‘hash_hmac’) ) { return hash_hmac(‘md5’, $data, $salt); } else { return md5($data . $salt); } } endif; if ( !function_exists(‘bb_check_admin_referer’) ) : function bb_check_admin_referer( $action = -1 ) { if ( !bb_verify_nonce($_REQUEST, $action) ) { bb_nonce_ays($action); die(); } do_action(‘bb_check_admin_referer’, $action); } endif; if ( !function_exists(‘bb_check_ajax_referer’) ) : function bb_check_ajax_referer() { global $bb; $cookie = explode(‘; ‘, urldecode(empty($_POST) ? $_GET : $_POST)); // AJAX scripts must pass cookie=document.cookie foreach ( $cookie as $tasty ) { if ( false !== strpos($tasty, $bb->usercookie) ) $user = substr(strstr($tasty, ‘=’), 1); if ( false !== strpos($tasty, $bb->passcookie) ) $pass = substr(strstr($tasty, ‘=’), 1); } if ( !bb_check_login( $user, $pass, true ) ) die(‘-1’); do_action(‘bb_check_ajax_referer’); } endif; if ( !function_exists(‘bb_break_password’) ) : function bb_break_password( $user_id ) { global $bbdb; $user_id = (int) $user_id; if ( !$user = bb_get_user( $user_id ) ) return false; $secret = substr(wp_hash( ‘bb_break_password’ ), 0, 13); if ( false === strpos( $user->user_pass, ‘—‘ ) ) return $bbdb->query(“UPDATE $bbdb->users SET user_pass = CONCAT(user_pass, ‘—‘, ‘$secret’) WHERE ID = ‘$user_id'”); else return true; } endif; if ( !function_exists(‘bb_fix_password’) ) : function bb_fix_password( $user_id ) { global $bbdb; $user_id = (int) $user_id; if ( !$user = bb_get_user( $user_id ) ) return false; if ( false === strpos( $user->user_pass, ‘—‘ ) ) return true; else return $bbdb->query(“UPDATE $bbdb->users SET user_pass = SUBSTRING_INDEX(user_pass, ‘—‘, 1) WHERE ID = ‘$user_id'”); } endif; if ( !function_exists(‘bb_has_broken_pass’) ) : function bb_has_broken_pass( $user_id = 0 ) { global $bb_current_user; if ( !$user_id ) $user =& $bb_current_user->data; else $user = bb_get_user( $user_id ); return ( false !== strpos($user->user_pass, ‘—‘ ) ); } endif; ?>

    Fatal error: Call to undefined function: bb_current_user() in forums/bb-settings.php on line 146

    I got the exact same kind of error yesterday while I was trying to install wordpress 2.0.5 but was able to install 2.0.4 no problem then upgrade to 2.0.5. Any help would be greatly appreciated.

    #50666

    In reply to: Installation problems

    Some of your settings aren’t quite right.

    $bb->domain = ‘http://domain.com’;

    $bb->path = ‘/cms/forums/’;

    $bb->wp_prefix = ‘wp_’; // or whatever the prefix is. It should not be true

    Try that on, and let us know.

    Also, I’m not sure what you mean by the links being broken in the bbpress-integration WordPress plugin. Can you explain it differently?

    #50748

    In reply to: img tags

    I’m not sure how the plugins work, but this would be a good candidate, so the core code doesn’t have to be hacked.

    #50747

    In reply to: img tags

    heh.. didn’t notice that. It is exactly the same.

    oh well, at least one can place images now. Glad we got this one figured out. If I ever implement bbpress on a wide scale, that will be the first thing users ask me. :)

    #828

    Topic: Img tag plugin

    in forum Plugins
    AphelionZ
    Participant

    Somebody should take the work done here and make it into a plugin, preferably one that will allow the use of img tags between code tags.

    You will be a hero.

    #50746

    In reply to: img tags

    AphelionZ
    Participant

    but that’s exactly what I did but I plugin-ified it instead of just hacking the code…

    I just tried what you did and it works! Excellent. There must be something wrong with my plugin approach (aka i don’t fully understand filters).

    Great work – my users will be excited.

    #50745

    In reply to: img tags

    in formatting-functions.php I added this under the function encode_bad:

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

    under function bb_allowed_tags() I added this:

    'img' => array(

    'src' => array(),

    'alt' => array(),

    'title' => array()),

    for an example see this post I made where it succeeded.

    http://meeciteewurkor.com/bbpress/topic/7?replies=2#post-21

    I added the /bb-images/bbpress.png image in a post. yay!

    #50742

    In reply to: img tags

    yeah, regex is confusing sometimes. I just bought a book on them off of Amazon. I’ll get back with you in a week or so. :) jk. I’ll keep fiddling and see what I can turn up, if anything.

    #50741

    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…

    #826
    #50739

    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?

    #50738

    In reply to: img tags

    what about the encode_bad function in the same formatting-functions.php file?

    It has the same list of default allowed html tags. I don’t know enough php yet to understand what it does, though?

    Maybe the img tag needs to be placed here as well?

    function 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('|
    |', '
    ', $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;

    #50500

    In reply to: post count – 1

    Shawn Maddock
    Participant

    Whoops, I should have specified that the code I posted replaced ear1grey’s. If you keep both then there are two filters being added to your “get_topic_posts”, which would cause the -1’s you’ve been seeing. Sorry ’bout that!

    #50736

    In reply to: img tags

    nevermind, that list is hard-coded into post-form.php. That would have to be changed, too, just to let people know the tag is allowable. If we can get it to work, of course. :)

Viewing 25 results - 32,126 through 32,150 (of 32,314 total)
Skip to toolbar