The MU forums have moved to WordPress.org

Php code in widget (9 posts)

  1. gerbiloz
    Member
    Posted 15 years ago #

    I'm using Wordpress MU version 2.6.5 with BuddyPress combo. I have strange problem with Php code widget plugin by Otto. After enable in widget window i got nothing for my php code. I'm just press Save buttom after i write something like <?php echo 'a'; ?>, and then i got nothing. Empty window.

  2. andrea_r
    Moderator
    Posted 15 years ago #

    Yes, becasue MU will strip it out.

    HUGE security hole there.

  3. gerbiloz
    Member
    Posted 15 years ago #

    so is there some workaround?

  4. tdjcbe
    Member
    Posted 15 years ago #

    Create a widget to fill the function that you;re trying to do.

  5. gerbiloz
    Member
    Posted 15 years ago #

    tdjcbe, thnx for an advice, but i'm not good at PHP. I just have game_servers_monitor in PHP and all i need to do it's just include this php file in some widget (to put this widget anywhere i want)

  6. tdjcbe
    Member
    Posted 15 years ago #

    You may want to review the "Is Mu for Me?" sticky at the top of the forums than. Being familiar with PHP is pretty much a requirement for the software, especially if you;re providing support for your clients.

    You may want to look at some of the basic widget code like the Google search widget that's included with the mu download of google for some basic widget tutorials as well.

  7. gerbiloz
    Member
    Posted 15 years ago #

    omg.. i'm familiar with PHP, but i'm not a guru. so i just want to know some workaround for this issue. like it's done in not MU wordpress.

  8. SteveAtty
    Member
    Posted 15 years ago #

    The work round is to create a widget and put your code in there. Its remarkably easy.

    Allowing anyone to post raw script into your site is just asking fo trouble.

    So find the google search plugin and copy it, make the name changes needed and embed your php code in it

  9. gerbiloz
    Member
    Posted 15 years ago #

    thnx SteveAtty! i guess this is right solution for such problem.

About this Topic

  • Started 15 years ago by gerbiloz
  • Latest reply from gerbiloz