• Is there a plugin/hack that shows a user image of the poster (from a bunch of images of that poster) for each post, like in LiveJournal?
    Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Anonymous

    you could either use custom fields or an image named after the author id.

    Thread Starter Anonymous

    how would i do this? sorry i am not very good at computers

    I was wondering about that too – don’t like the idea of gravatar (good as it may be) because I don’t like the additional bandwidth and/or dependency generated from some other websites having hooks into my own.
    Perhaps a feature request for a future WP? A field for an ‘avatar’ in the user profile – that would have a size/spec limit? With a default for unregistered visitors? I’m not the programming guru like I have seen on here, or I might be able to figure this out instead of begging on the grace of the WP gods out there. ??
    ahhh – with pipe dreams like this – who needs drugs?

    i kinda made a hack for this, sorry i dont have instructions, as you’d have to be pretty familiar with php and css

    but to sum it up, i used the custom fields plugin, and in “the loop” i loaded a picture using that custom field to get the pic i wanted (when posting i’d select custom field, select posticon and set the value to the name of the pic i want.

    then using some CSS i placed it so that my pic was next to the entry so i didn’t waste space…

    you can see an example at my site: https://www.mattmartz.com

    use firefox to view it though… for some reason internet explorer puts the picture in the wrong place… i probably just have to clean up my code…

    Hmmm, I would recommend using Gravatars:

    https://www.gravatar.com/

    People can put up their global images – instead of a systembased one.

    how would you go about doing this using the custom fields for each post?

    If using Gravatars, I think you’d have to use the_author_email in conjunction with a Gravatar plugin or javascript. Should be doable.

    Read and be amazed – from:

    https://www.gravatar.com/implement.php#section_2_2

    WordPress Gravatar Plugin

    A plugin is available for WordPress 1.2 installations. The plugin makes available a tag called gravatar that, when used inside the Comment Loop, outputs the correct gravatar URL based on the commenters email address.

    Download wp_gravatar.zip

    Installation: Download and extract the above file to your WordPress plugins directory, located at <WordPress Install Dir>/wp-content/plugins. Once the file is placed in the plugins directory, login to your WordPress installation, and click the “Plugins” tab on the main administration panel. Look through the list of installed plugins to find the one called “Gravatar”. Under the “Action” column for this plugin, click on “Activate”. Installation is now complete.

    Usage: gravatar has the following syntax:

    <?php gravatar({rating{, size{, default{, border}}}}) ?>

    All of the parameters are optional. For example, the following will create a gravatar URL that allows all rating levels, is 80?—80 pixels, uses no default image, and has no border:

    <?php gravatar(); ?>

    If you wish to restrict your gravatars to R rated and below, you’d do this:

    <?php gravatar(“R”); ?>

    If you want the size of the image changed as well, supply the pixel dimension as the second argument (defaults to 80):

    <?php gravatar(“R”, 40); ?>

    If you want to use your own “Heat Vision and Jack” image as a default graphic (shows up when either no gravatar exists for a given user, or the given user’s gravatar exceeds the specified rating), you’d do this:

    <?php gravatar(“R”, 40, “https://www.somewhere.com/heatvision.jpg&#8221;); ?>

    You can also add a 1px border of any color you choose with the fourth parameter:

    <?php gravatar(“R”, 40, “https://www.somewhere.com/heatvision.jpg&#8221;, “FF0000”); ?>

    If you wish to leave a parameter at its default while supplying other parameters, simply pass an empty string as the argument.

    Remember that this only generates the URL, so you have to place the gravatar tag inside the src attribute of an img tag like so:

    <img src=”<?php gravatar() ?>” alt=”” />

    but how can i use this for an author post, not comments? cause my site has 2 authors.

    with the stuff i mentioned… somewhere there’s a plugin called (or at least it’s purpose) is to have an easy way to use the custom fields

    towards the bottom of your posting section (for writing post) there’s that section where you can add fields.

    the thing i did uses this… so each tim i post i would just say the field is posticon and value is suit (a pic name) and click add field, this stores those values with this blog entry, and then on the index.php i added some code in the loop that takes out the custom fields, and loads the pic you want (which i have stored in the images folder)

    so it’s kinda like that gravatar thing, except you can use your own uploaded pictures hosted on your own server

    using this method, each user can have their own pic, because each time they’d post they could put their own pics as values in the custom fields

    in fact, each author could have multiple pics…

    using that custom field plug-in you can also set things to be filled in as a value if it weren’t even set (so i always have a picture up even if i forget to set the value)

    alright… i broke down and found the plugin i used for custom fields:
    https://www.coffee2code.com/archives/2004/06/30/plugin-get-custom/

    using this and following their instructions, it’s similar to creating the mood/reading whatever examples… except you’re adding code before and after the custom field that loads a picture… then you put this within CSS (in your layout.css file) and you can place the picture where you want on the screen (this takes a bit of tinkering)

    good luck, i’ll try and remember to check back here if there are questions

    thanks for the link, just gotta get it to work now with a user picture.

    one question though, how can I get it so that the custom field value can be assigned to previous posts without going in and doing it by hand?

    also, is it possible to automatically tie it to the author who’s posting instead of having to pick each time?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘User photos like in LiveJournal?’ is closed to new replies.