Group Admins

  • Profile picture of Boone Gorges

buddypress.org Ninjas

Public Group active 1 day, 4 hours ago ago

Dedicated to the squashing of bugs and the blooming of features on buddypress.org

Post code between backticks (14 posts)

Started 1 year, 8 months ago by: Boone Gorges

  • Profile picture of Boone Gorges Boone Gorges said 1 year, 8 months ago:

    The use of backticks for displaying code in forums has now been activated on buddypress.org. Check it out!

    function tell_the_truth() {
         global $current_user;
         get_currentuserinfo();
         if ( $current_user->user_login == 'boonebgorges' )
              echo '<a href="http://teleogistic.net">Boone,</a&gt; you are the bomb dot com.'
    }
    add_action( 'wp_head', 'tell_the_truth' );
  • Profile picture of Paul Gibbs Paul Gibbs said 1 year, 8 months ago:

    Syntax highlighting?

    Also, it’d be helpful if the patch for checking for closed tags were implemented on here: http://trac.buddypress.org/ticket/2359

  • Profile picture of Roger Coathup Roger Coathup said 1 year, 8 months ago:
    function really () {
          echo "so it would seem";
    }
  • Profile picture of Boone Gorges Boone Gorges said 1 year, 8 months ago:

    Yup, tag closing should be next :)

  • Profile picture of rich! @ etiviti rich! @ etiviti said 1 year, 8 months ago:

    schweet!

  • Profile picture of Roger Coathup Roger Coathup said 1 year, 8 months ago:

    something doesn’t seem right – everything is now in italics!

  • Profile picture of Jeff Sayre Jeff Sayre said 1 year, 8 months ago:

    Very cool. I guess we can’t be ticked anymore.

    function i_am_ticked() {
           global $bp, $whose_ticked;
    
           if( $whose_ticked == 'you' && $bp->backticks != false ) {
                  echo "We're sorry, you can no longer be ticked";
           } else {
                  echo "Yep! You're ticked!";
           }
    }

    This is an important improvement. Thanks, Ninjas!

  • Profile picture of Hugo Hugo said 1 year, 8 months ago:

    The backticks are back; all hail the Boone, prince amongst men

  • Profile picture of Boone Gorges Boone Gorges said 1 year, 8 months ago:

    @djpaul – Decided to go with the straightforward backtick before worrying about syntax highlighting, as the most popular option (Syntax Highlighter) (a) requires you to specify the language in order for highlighting to work correctly, which is a bit onerous for first time users, and (b) requires an extra click to get the popup with copyable, plaintext code, which again might be confusing for some. Maybe it makes sense to enable Syntax Highlighter as an undocumented feature, with backticks in place as a fallback? Thoughts?

  • Profile picture of @mercime @mercime said 1 year, 8 months ago:

    ‘?php backtick_is_back(); ?’

  • Profile picture of Hugo Hugo said 1 year, 8 months ago:

    For mercime:

    <?php $backtick = str_replace(''', '´', $backtick ) ; ?>

  • Profile picture of @mercime @mercime said 1 year, 8 months ago:

    Thank you @hnla, I shall add that in BP Codex :-)

  • Profile picture of paulhastings0 paulhastings0 said 1 year, 8 months ago:

    :woot:

  • Profile picture of Zen Gonzaga Zen Gonzaga said 9 months, 3 weeks ago:

    i typed ‘backticks’ but its not working. how am i gonna use this?