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.
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.
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
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.
Search the Forums | Read the Documentation
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.
Runnertalk.net - Social News For Runners, follow me on Twitter
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!
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!![]()
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:
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.PHP Code:<a href="<?php echo $h->url(array('page' => 'gravatar')); ?>">Click here to get an avatar</a>
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:
Have fun!PHP Code:<input class="text" id="email_address" name="email" size="30" type="text" value="<?php echo $h->currentUser->email; ?>" />
Search the Forums | Read the Documentation
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.
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...
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.PHP Code:if ($h->currentUser->loggedIn && $h->vars['user']->name != $h->currentUser->name) {
}
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<br> to 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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks