WordPress.org

Ready to get started?Download WordPress

Forums

Get Authors Profile Page (42 posts)

  1. dee
    Member
    Posted 9 years ago #

    Is there a plugin that will allow me to make a page that will list all authors, their profile description, and an image? Or is there a way to alter the get author image(s) and the Get Author Profile to make it so?

  2. Kafkaesqui

    Posted 9 years ago #

    Would be (moderately) easy to create a Page template for this. Interested? I'll see what I can cobble together...

  3. Karb
    Member
    Posted 9 years ago #

    What would be nice is to be able to design individual pages for each author so I could, for example, add a flickr badge and other individual snippett unique to the user.

  4. Kafkaesqui

    Posted 9 years ago #

    Karb, you can do that to some degree by using/modifying an author.php template with your theme; WordPress (1.5+) will use it when an author posts query occurs. The individual, non-WordPress bits of information for each author would require some custom PHP though.

  5. Karb
    Member
    Posted 9 years ago #

    Thanks for that Kafkaesqui,

    At present I have been adding xhtml to the user profile but that is not ideal.

    Do you have any pointers on custom PHP or is that something I would need to get a freelancer to do?

    Thanks a lot

  6. Kafkaesqui

    Posted 9 years ago #

    Keeping the additional information in the user's profile (with or without the use of "non-ideal" embedded HTML) simplifies to a degree what is needed for coding to retrieve it. There are examples on the forums on how to pull up author profile data either from the database or from a query var when on an author post page.

    If you do go with an author.php, just keep in mind it's intended for displaying author posts. A good way to go about creating one is to duplicate a theme's index.php, and add any elements for presenting the profile data.

  7. Karb
    Member
    Posted 9 years ago #

    OK thanks for that :)

    I saw your post and that works fine. Its a shame that we can't have x number of author.php for each author so I can layout unique features of each author.

    Thanks for the help anyway:)

  8. dee
    Member
    Posted 9 years ago #

    Oh, I would be *very* interested in getting something together for that, Kafkaesqui. How would I go about putting something like that together? I've got a multi-author blog that I would love to have an About page with all the authors on it with their user_description so they get edit their own profile. I suppose the images will have to be uploaded manually, but maybe named as nickname.jpg so that it will be automatically called up.

  9. kineda
    Member
    Posted 9 years ago #

    Any progress on this? If not, I'll probably start working on it.

  10. Kafkaesqui

    Posted 9 years ago #

    Oops, my fault. Just completely forgot. Here's a working version of the authors Page template:

    http://guff.szub.net/source/page-authors.php

    Several points to highlight:

    1. This is a Page template, meaning it's to be assigned through Edit > Pages to a WordPress Page. It is not intended as a modification to the author.php theme template. Just in case somebody doesn't get it.

    2. I've commented all through the file, so most of what's going on should be understandable through my notes. There are a few components you may need to configure (especially the author image stuff), so look through it first and make what changes you need to, especially for formatting and layout.

    3. Just about everything should degrade gracefully. For example if the AIM screen name is blank, this line is not displayed, and if there's no author image, this is passed up.

  11. Kafkaesqui

    Posted 9 years ago #

    Oops. I had the file extention variable ($file_ext) for the author image set to 'png', when in comments I note it's 'jpg'. Corrected.

  12. esky
    Member
    Posted 8 years ago #

    Edit: well i figured how to install this as a new page, but it seems that I can just view my own profile now... how exactly do I use this to link to other user's profiles?

    Ideally, I'd like to replace the links when you click a user's name in the comments to point to their profile page, not their website.

  13. jafer
    Member
    Posted 8 years ago #

    Kafka, where do you upload the template to? I tried uploading it to my themes-default directory, then created a new page using the allauthors template, but when I viewed it, it didn't show any author default information.

  14. fatalcure
    Member
    Posted 8 years ago #

    Working fine for me, is there a way to seperate a page for each users, if there is please explain as simply as you can.

    Also, the website field seems to auto fill in the http:// part... leaving a blank link sort of thing even if they didn't fill in that form...

  15. fatalcure
    Member
    Posted 8 years ago #

    Working fine for me, is there a way to seperate a page for each users, if there is please explain as simply as you can.

    Also, the website field seems to auto fill in the http:// part... leaving a blank link sort of thing even if they didn't fill in that form...

  16. fatalcure
    Member
    Posted 8 years ago #

    .... also... If I only fill in the msn filed in my profile and leave the others blank.. it displays MSN ID: (blank space) however if I change aim id to something, anything then it displays proplery.. I'm no coder so just tried to see if anything was different in the 2 sections of code "msn id and aim id" they seem exactly the same except for the identifying tag for msn, aim etc.. so I don't know what the problem is, I even switched around the order of these sections to see if it had something to do with the first or last code being ignored because of the other... still nothing, any hlep would be appreciated.

  17. fatalcure
    Member
    Posted 8 years ago #

    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.

  18. Kafkaesqui

    Posted 8 years ago #

    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.

  19. fatalcure
    Member
    Posted 8 years ago #

    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..

  20. Kafkaesqui

    Posted 8 years ago #

    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!

  21. fatalcure
    Member
    Posted 8 years ago #

    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.

  22. Kafkaesqui

    Posted 8 years ago #

    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>

  23. fatalcure
    Member
    Posted 8 years ago #

    Thanks champ, running version 1.5. not 1.5.2

  24. fatalcure
    Member
    Posted 8 years ago #

    That worked perfectly...

  25. Kafkaesqui

    Posted 8 years ago #

    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:

    http://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.

  26. JoeyE
    Member
    Posted 8 years ago #

    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: http://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.

  27. fatalcure
    Member
    Posted 8 years ago #

    Damn, JoeyE that does look good..

  28. CounterDax
    Member
    Posted 8 years ago #

    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?

  29. JoeyE
    Member
    Posted 8 years ago #

    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.

  30. Can
    Member
    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic