Viewing 15 replies - 16 through 30 (of 41 total)
  • Kafkaesqui:

    <?php if($user->user_msn) : ?>
    MSN ID: <?php echo $user->user_aim; ?>

    <?php endif; ?>

    <?php if($user->user_aim) : ?>
    AIM screen name: <?php echo $user->user_aim; ?>

    <?php endif; ?>

    the top one should be user_msn.

    Copy & paste can be evil.

    Thanks for catching that fatalcure. I’ve corrected the various user_* which incorrectly displayed $user->user_aim.

    Note to WordPress 2.0 users: This template will NOT work as advertised for you. I’ll make an update available after 2.0 is released.

    Can someone mod the code so post count is where status = published.. It is displaying me as post count = 88 when I have only published 38..

    If there’s a problem with user post count you should file a bug report on it. I’m only using get_usernumposts() to collect it in the template.

    And though I could add a query for this, I’d rather keep the code in a template like this–where non-programming folk are forced to dig if they need to customize to their design–at a bare minimum. As well as WP-specific as possible.

    Bon Nadal!

    Can anyone mod it so it does not include drafts in post count for me then? I am sure it wouldn’t be that difficult.

    It’s not difficult. However, I looked through the code iterations in get_usernumposts() and though it appears this was a problem in 1.2.x, 1.5 should be reporting the correct number of posts. At least, get_usernumposts() in 1.5.2 (what’s the version you’re running?) shows to be checking post_status to verify a post is ‘published.’

    This is a duplicate of the function–place it somewhere at the beginning of the template:

    <?php
    function get_userpublishedposts($userid) {
    global $wpdb;
    return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid' AND post_status = 'publish'");
    }
    ?>

    Then change the place in the template which displays it to:

    <?php if(get_userpublishedposts($user->ID) > 0) : ?>
    Number of posts: <a href="<?php get_author_link(true, $user->ID, "$user->user_nicename"); ?>"><?php echo get_userpublishedposts($user->ID); ?></a>

    Thanks champ, running version 1.5. not 1.5.2

    That worked perfectly…

    Okey dokey, made some time tonight to clean up the profile Page template for WordPress 2.0. So here is version 2 of my All Authors Template:

    https://guff.szub.net/source/page-authors-2.0.php

    It still checks user level to decide who an “author” is (anyone above level 0). This should work well enough for now, but I’ll add more flexibility into it later by having it work a little more completely with the new usermeta table.

    I just recently upgraded to WP2.0 And I absolutely love it. I have managed to create a hacked up author.php page. It’s a work in progress but just thought you could take a look at it and know that TONS can be done with the author.php page.

    sample: https://viscomcreatives.org/?author=12

    note: if you go poking around the rest of the site, i am doing a mad dash to get all my styles updated. so if something looks out of place… im working on it.

    Damn, JoeyE that does look good..

    Well, author pages are quite accepted now, however, WP2.0 only supports contact info in the form of E-mail, website, AIM, Yahoo IM, and Jabber, while the DB supports MSN and ICQ too. Is there some way to activate these two too? Maybe a mod or something?

    I am currently trying to work on a hack for this myself. I also am trying to add a field for users to add their avatar/gravatar url. (yea i know there are avatar plugins but sometimes a simple field is all you need.

    I’ve added the field in the profile.php page, it can read the data from the db but I cannot write to the db. I must not have my sql insert statement correct. oh well… i’ll keep hacking at this one. I need all the messengers listed as well.

    Joey, can you possibly add the date when a registered member last visited the site? Or is this a plugin idea? I’ve been wondering if I would ever find a plugin that would tell the admin when a member’s last activity (date) was. I really believe in the importance of this one feature.

    Well, I have managed to “activate” the MSN & ICQ and even added a field for an AVATAR URL. And it works fine however, I fudged somewhere or I am not understanding something:

    I now can’t delete entirely a profile field. For example, if I have something in my YIM field then decide to delete it completely and leave a blank field and then update my profile it will still be there. HOWEVER, I CAN modify the entry and type in ‘n/a’ or whatever and it will update it that way. It just won’t allow an empty field… odd.

    Soooo, at least I got it to this point. Now to figure out the empty field bit.

    As for the memb last visit thing, I would favor to say that it would probably be best if that were in a plugin. I can try to include that in my hack but the way my profile code is turning out– it’s looking pretty damn ugly. ?? But it its working… kinda. ??

Viewing 15 replies - 16 through 30 (of 41 total)
  • The topic ‘Get Authors Profile Page’ is closed to new replies.