Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Can User Add her won Avatar in Profile??

  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    27
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Can User Add her won Avatar in Profile??

    hello,

    On the user profile can they add his or her avatar from they pc or the web?

    I ask because i see there is an avatar, but i can only change if I replace it from the avatar folder.

  2. Thanked by:


  3. #2
    Member runnertalk's Avatar
    Join Date
    Aug 2009
    Location
    Sweden
    Posts
    47
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    At the moment the users can't change their avatar on the Hotaru site. If you have the gravatar plugin enabled they can go to gravatar.com and change their picture if they uses the same email address on both the hotaru site and gravatar.com.
    If I'm not mistaken you can also install the RPX plugin and your users will be able to use the same photo they use on other sites such as facebook, twitter etc.
    Runnertalk.net - Social News For Runners, follow me on Twitter

  4. #3
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,914
    Blog Entries
    88
    Thanks
    519
    Thanked 845 Times in 550 Posts

    Default

    The RPX API offers the ability to import profile pictures from Facebook, etc., but it's not part of the current RPX plugin we use here. That's solely for log in/registration in at the moment.

  5. #4
    Senior Member baadier's Avatar
    Join Date
    Jan 2010
    Location
    Cape Town, South Africa
    Posts
    263
    Thanks
    80
    Thanked 14 Times in 10 Posts

    Default

    Its not a bad system and I think it probably reduces server load because you are loading from the gravatar server. It also gives you more flexibility with regards to avatar usage on the site ie. You could have a avatar of size 20px on the top user bar and one of size 10 in the latest activity widget and use size 40 for the who voted and comment plugins.using an internal system with the php image module you would have to keep copies of all those size images on the server and they would also have to be created each time a user changes his avatar. I think "outsourcing" the avatars is an excellent way to make hotaru effecient. I will be adding a gravatar section in my site faq though to make sure users know how to and possibly a link in the user settings page.

  6. #5
    Member runnertalk's Avatar
    Join Date
    Aug 2009
    Location
    Sweden
    Posts
    47
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    Quote Originally Posted by Nick View Post
    The RPX API offers the ability to import profile pictures from Facebook, etc., but it's not part of the current RPX plugin we use here. That's solely for log in/registration in at the moment.
    Oh, now I remember!
    Runnertalk.net - Social News For Runners, follow me on Twitter

  7. #6
    Member apfind's Avatar
    Join Date
    May 2010
    Location
    New York City
    Posts
    56
    Thanks
    24
    Thanked 7 Times in 6 Posts

    Default

    I would love to get a upload and change your avatar option working in the user page. My site won't have too much traffic and this would really help out the site a lot. I might try to program it myself, but I'm such a newbie this is going to take some time. Let me know if there are any developments in that area.

    By the way, I am coming from Pligg and I love you guys here! This is like breath of fresh air. You guys rock. Go Hotaru!

  8. #7
    Member apfind's Avatar
    Join Date
    May 2010
    Location
    New York City
    Posts
    56
    Thanks
    24
    Thanked 7 Times in 6 Posts

    Default

    Ok, I'm sold on using Gravatar. But, I still want to help users to upload their own images, so I am going to put an official gravatar signup button right under the default hotaru avatar... it will take their email and send them directly to the Gravatar page that will confirm their sign up and alert them to the signup confirmation email. (I will obviously explain what is happening to users so they are not surprised. )

    Here is the code, I tested it on a blank html page on my site and it works.
    <form action="http://en.gravatar.com/accounts/signup" method="post">
    <p>
    <label for="email_address">Email:</label>
    <input class="text" id="email_address" name="email" size="30" type="text" value="" />
    </p>
    <p class="label_align">
    <input class="button" name="commit" type="submit" value="Submit" />
    </p>
    </form>

    The problem is that I have no idea where to put it, I just spent a long time searching for the user page and even went through all the plugin case studies. I started building a plugin, but I must be too much of a newbie to get it. :P Please help help!

    P.S. I also extracted the CSS for the button, but I have no idea what to do with that either. It all works great in my stupid HTML file though!

  9. Thanked by:


  10. #8
    Former lead dev Nick's Avatar
    Join Date
    Jun 2009
    Location
    Kakamigahara, Japan
    Posts
    2,914
    Blog Entries
    88
    Thanks
    519
    Thanked 845 Times in 550 Posts

    Default

    Make a file called gravatar.php and put the code in it. Upload that file to your theme folder and then you can access it like this:

    example.com/gravatar (url friendly)
    example.com/index.php?page=gravatar (url unfriendly)

    Then, you'll want to put a link to that page somewhere, maybe on the user account page?

    Copy /content/plugins/users/templates/users_account.php into your theme folder. Open the copy and add:

    PHP Code:
    <a href="<?php echo $h->url(array('page' => 'gravatar')); ?>">Click here to get an avatar</a>
    That php code is better than hard-coding the url because it works with both friendly and unfriendly urls and isn't specific to your site.

    One thing to remember is that the email your users send to Gravatar in the form will need to match the email address they registered with in order for their avatars to show up. The best thing to do would be to prefill the email field of the form with their email address, like this:

    PHP Code:
    <input class="text" id="email_address" name="email" size="30"  type="text" value="<?php echo $h->currentUser->email?>" />
    Have fun!

  11. Thanked by:


  12. #9
    Member apfind's Avatar
    Join Date
    May 2010
    Location
    New York City
    Posts
    56
    Thanks
    24
    Thanked 7 Times in 6 Posts

    Default

    This is amazing! Thank you so much Nick! You are officially the man! You fixed my problem in an hour. On a Pligg forum that would have been unanswered for months! I love Hotaru cms!!!
    Last edited by apfind; 05-06-2010 at 04:35 AM.

  13. #10
    Member apfind's Avatar
    Join Date
    May 2010
    Location
    New York City
    Posts
    56
    Thanks
    24
    Thanked 7 Times in 6 Posts

    Default

    One quick question. Based on the above, I have been adding links to my users_profile.php page such as "Click Here To Add Your Own Avatar". But the only issue I have now is that when I go to another user page I still see the links.

    Was noticing that plugins have a way to check. I found this code and thought it would work but I think I might be mixing HTML and PHP.

    This seems like it checks for the current users profile...
    PHP Code:
    if ($h->currentUser->loggedIn && $h->vars['user']->name != $h->currentUser->name) {      

    So I am doing research on PHP syntax so I can translate the links I added to users_profile.php from HTML to PHP. I tried revising the below with lots of echos but it didn't really work. Is there is a way to save all of the HTML into a $variable and then just echo $variable.

    Here's an arial view of the situation...

    PHP Code:
    <?php
    if ($h->currentUser->loggedIn && $h->vars['user']->name != $h->currentUser->name) {
    ?>

    <b><a href="<?php echo $h->url(array('page' => 'gravatar')); ?>">Click here to upload your own avatar</a></b> <br>

    echo   <a href="<?php echo $h->url(array('page' => 'gravatar')); ?>"><img src="<?php echo BASEURL?>content/themes/<?php echo THEME?>images/uploadimage.png" title="<?php echo SITE_NAME?>"></a> <br> <br>

    <?php
    echo  <b><a href="<?php echo $h->url(array('page' => 'feedburner')); ?>">Click here to automatically send your APFIND posts<brto your twitter account!</a></b>

    echo <
    br><a href="<?php echo $h->url(array('page' => 'feedburner')); ?>"><img src="<?php echo BASEURL; ?>content/themes/<?php echo THEME; ?>images/rsstosocial.png" title="<?php echo SITE_NAME; ?>"></a>

     } 
    ?>
    Last edited by apfind; 05-16-2010 at 09:50 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Docs] Adding Extra Profile Fields
    By Nick in forum Design and Layout
    Replies: 1
    Last Post: 03-15-2010, 03:00 PM
  2. Where's the link to my profile?
    By nothingman in forum How-To and Troubleshooting
    Replies: 12
    Last Post: 11-20-2009, 01:16 PM
  3. [Docs] Changing the Default Avatar
    By Nick in forum Design and Layout
    Replies: 0
    Last Post: 11-08-2009, 10:00 AM
  4. [Done] Profile page
    By runnertalk in forum Plugin Suggestion Box
    Replies: 5
    Last Post: 10-08-2009, 03:46 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •