• I’ve just installed WordPress 1.5, and there’s the Dashboard feature, is there any way that I could not show the stories from the WordPress developer blog, for authors that are not on level 10? I have looked at the index.php file in the wp-admin folder, but I don’t know which variable holds the data on the user’s level. Once I knew what it was, or what I needed to use to get it from the database, then I could easily change it, I think.
    I hope that made sense,
    Phill

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter blackheart

    (@blackheart)

    Aha, I’ve found it, the answer lies in the menu-header.php file. The variable is $user_level, kinda obvious really…
    All I’ve done is added an extra if statement:
    <?php if ($user_level != '10') { ?>
    Then closed it, so only level 10 users can see the information from the WordPress blog, everyone else gets a friendly welcome message 🙂

    Hey, I was just thinking how I could do that myself. Where do you put your “friendly welcome message” and the if statement? does it matter where exactly it is put?

    Thread Starter blackheart

    (@blackheart)

    What I did was I looke in the index.php file, in the wp-admin directory, then look for the line which says:
    <h2><?php _e('Dashboard'); ?></h2>
    This is where the main body of the dashboard starts. Then on the next line, you can put the if statement.
    <?php if ($user_level != '10') { ?>
    You can change the user level to anything you want really, you could make it so that it’s only for level one authors…etc.
    Then you can put your friendly welcome message, and after that, you must put:
    <?php } else { ?>
    This allows the real dashboard to be shown if the user level is 10.
    Below the line which says:
    <li><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a></li>
    You must close the if statement, else you get lots of errors, which are anything but friendly. You need the code:
    <?php } ?>
    Simple! If you run into problems, you can email me from my site.

    Excellent! Many thanks to you 🙂

    That’s pretty neat. My question, though, is why would someone want to do that?

    Satoshi,

    if you have multiple users using the same blog. it is like my.yahoo.com in a way.

    For example, I use view_level and post_level so I can post my secrets and only those that I trust can read them. But it is good to be able to post a disclaimer and a warning, such as “please log out after reading” and such. At least that’s what I wanted this for. 🙂

    Ah, cool, that makes sense. Good to know something like this can be done.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Admin Welcome Message WP1.5’ is closed to new replies.