The MU forums have moved to WordPress.org

WP-UserOnline 2.20 - PHP - Page Post (13 posts)

  1. bschwarting
    Member
    Posted 18 years ago #

    I'm trying to get the WP-UserOnline 2.20 plugin to work. I want to use the code:

    <?php if (function_exists('get_most_useronline')): ?>
    <p>Most Users Ever Online Is <?php get_most_useronline(); ?> On <?php get_most_useronline_date(); ?></p>
    <?php endif; ?>

    to display in a new page/post I've done. when I go to the code tab, copy/paste the code, hit save, it just disappears. i go check the database, and it's gone as well. the data never shows up on my page either. I've tried using the code tags, but no luck. suggestions?

  2. andrea_r
    Moderator
    Posted 18 years ago #

    It strips it out. That's default behaviour.

    Options:
    - hard code it in the theme or on a special page template for that theme.
    - create your own widget for it.

  3. bschwarting
    Member
    Posted 18 years ago #

    Andrea, I'm very new to wordpress, php, mysql. just jumped ship from microsoft, IIS, MS SQL server, and ASP to try this out. wordpress seems like it's just what i need.

    can you point me to a tutorial on either of your options?
    special page template or create your own widget, whichever is easier.

  4. andrea_r
    Moderator
    Posted 18 years ago #

    Where do you want it to show up? That'll help me determine what your best option is.

  5. bschwarting
    Member
    Posted 18 years ago #

    i want an independent page with all the available stats.

  6. andrea_r
    Moderator
    Posted 18 years ago #

    http://codex.wordpress.org/Pages#Creating_your_own_Page_Templates

    Short version:
    - look for a file called page.php in your theme's folder.
    - make a copy of it, call it stats.php or whatever.
    - delete the loop section and plunk in the code from your first post here and whatever else you want to say.
    - make sure the top of the file says Template Name: Stats in commments

    Go to your blog, create a new Page. Title it. choose Stats from the Page template option (one of the blue boxes on the right). Don't put any text in the post.
    Hit publish. go look at it. Bask in the glow.

    Php is not scary of you've done any work with C/C#/C++. A function is still afunction, regardless of the language. SQLServer is somewhat similar to MySql. You'll probably do fine, it's just learning where stuff is.

  7. bschwarting
    Member
    Posted 18 years ago #

    you are a genius! thanks! wordpress is starting to make some sense now. just some :)

  8. lunabyte
    Member
    Posted 18 years ago #

    As a note, as you've seen before:

    These are NOT the WP forums...
    http://wordpress.org/support/

    I mention this, again, because you said: "wordpress seems like it's just what i need", and "I'm very new to wordpress". That being the case, and if you are actually using MU, you really should start with WP first. MU isn't something to begin learning with. Not to be mean, but there's been such an influx of WP support questions here recently, that we're starting to get bitter over it as all it does is clutter up our forums for a completely different software. Yeah, it's based on WP, but it isn't WP and those WP questions need to be kept in the same place.

  9. bschwarting
    Member
    Posted 18 years ago #

    lunabyte,

    i'm interested in following the rules, my apologies. I'm an active member in several forums, so i understand your frustration. I'm starting a multi user site, so wordpress singular isn't for me. I'm trying to get all the MU plugins I can, but i guess this isn't one of them. i get confused between the single plugins and MU plugins. I'm new, so excuse my ignorance.

    now that i have your attention, maybe you can assist in educating me :)

    seems like there are a TON of wordpress plugins, but the MU plugins are limited. is there an easy way to convert these plugins so they can be administered via the the site admin as opposed to getting users to activate them? a lot of these i'm finding, i want to be universal to my site, and not something that has to be activated.

  10. lunabyte
    Member
    Posted 18 years ago #

    Please run a search through this site, through the link in the sticky up front, for some posts which run down /mu-plugins/ and /plugins/. It's too much to type yet again.

    As for plugins, most work just fine. Ya stick em in the plugins directory like always.

    MU-plugins are for very special case plugins, that have code that must be available to the core on every page load, of every blog.

  11. andrea_r
    Moderator
    Posted 18 years ago #

    And you can also search for how to have certain plugins (in the plugins folder) activated on blog creation. :)

    I will say, verey gently, even though you really need MU, you're still going to have to learn the ins and outs of regular WP. I'd suggest doing a test install of WQP soemwhere first, learning your way around that, then do more in MU.

    The learning curve will be less steep.

  12. bschwarting
    Member
    Posted 18 years ago #

    Andrea, i agree with the regular WP, if i had heard it two weeks ago :) I've got a a few years of IT under my belt which i believe will assist in the learning curve. Just might need your (MU Forum) help from time to time.

  13. andrea_r
    Moderator
    Posted 18 years ago #

About this Topic

  • Started 18 years ago by bschwarting
  • Latest reply from andrea_r