|
The No-Avatar Avatars
|
| Yxos |
Posted on 12-04-2007 18:57
|

Senior Member

Posts: 290
Joined: 04/10/2006
|
Various infusions provide lists in the side panel exposing users who fulfil various criteras like eg. "Top forum users"; "Most recently seen" etc.
Usualy along with the avatars of the users in question.
Most of these can cope with users who have not yet overcome their shyness and inserted an avatar by providing a default avatar, usualy named noav.gif or similar, showing a silhouette with a questionmark on it.
Or similar...
I am sick and tired of that "#¤¤%"#&%"¤% silhouette on 60% of my users !!!
I have replaced the silhouette with a photo of a disgusting looking fat a**h***, that way encouraging those users with no avatar, in a friendly way, to insert some sort of avatar.
You know what ???? IT WORKS !!! 
I order to help you people with the same problem, I hereby provide a small collection of not-so-attractive avatars to be used instead of the oh-so-borring standard noav.gif.
he he !!!
Edited by Yxos on 14-04-2007 18:55
Yxos
The best solution is not necessarily a technical solution !
|
| |
|
|
| Drago |
Posted on 12-04-2007 19:39
|

Junior Member

Posts: 13
Joined: 02/11/2006
|
WoW, I never thought of that, good thing to know. And a good idea. |
| |
|
|
| Yxos |
Posted on 12-04-2007 19:51
|

Senior Member

Posts: 290
Joined: 04/10/2006
|
Actually, why not make the noav.gif a standard feature and provide a noav.gif in standard, just like a banner.gif is provided?
Maybe along with an Admin-option to use it or not...?
Then the noav.gif could be shown everywhere; where no avatar would normaly not be displayed... Eh... Or displayed... Where an avatar would normaly be displayed, but doesn't... No... Darn... YouknowwhatImean...! 
Is it too late for requests for 7.00 ?
Yxos
The best solution is not necessarily a technical solution !
|
| |
|
|
| XPetras |
Posted on 13-04-2007 09:08
|

Newbie

Posts: 6
Joined: 24/10/2006
|
couldnt they just make it required to upload an avator when registering? |
| |
|
|
| BBK |
Posted on 13-04-2007 15:46
|

Member

Posts: 105
Joined: 07/07/2006
|
im not sure but do those avatars not blowing up the theme?^^ |
| |
|
|
| jofolk |
Posted on 21-04-2007 13:07
|

Newbie

Posts: 6
Joined: 03/02/2006
|
I like that idea. I put the following code in my user_info_panel.
Code
if ($userdata['user_avatar'] != "") {
echo "<center><img src='".IMAGES."avatars/".$userdata['user_avatar']."' alt='".$locale['567']."'></center>\n";
} else {
$images = array("../images/avatars/avatar1.gif",
"../images/avatars/avatar2.gif",
"../images/avatars/avatar3.gif",
"../images/avatars/avatar4.jpg",
"../images/avatars/avatar5.jpg");
$size = count($images);
srand(time());
$random = (rand()%$size);
echo "<center><img src=$images[$random]></center>";
echo "<center><a href='http://avatars.jurko.net'=_blank'>Get An Avatar Here</a></center></a>";
}
just below
Code
if (iMEMBER) {
openside($userdata['user_name']);
I am no PHP guru or anything and I am sure the code is really dirty, just a bunch of cutting pasting, but it works. It shows a random avatar and has a link for a website that gives out avatars.
Edited by jofolk on 07-05-2007 12:58
|
| |
|
|
| helmuth |
Posted on 22-04-2007 00:26
|

Senior Member

Posts: 307
Joined: 19/05/2004
|
I had some trouble making this code work properly, but I managed to fix it:
Code
if ($userdata['user_avatar'] != "") {
echo "<center><img src='".IMAGES."avatars/".$userdata['user_avatar']."' alt='".$locale['567']."'></center>\n";
} else {
$images = array("images/avatars/avatar1.gif",
"images/avatars/avatar2.gif",
"images/avatars/avatar3.gif",
"images/avatars/avatar4.jpg",
"images/avatars/avatar5.jpg");
$size = count($images);
srand(time());
$random = (rand()%$size);
echo "<center><img src=$images[$random]></center>";
echo "<center><a href='http://avatars.jurko.net='_blank'>Get An Avatar Here</a></center></a>";
}
the change was to delete ../ 5 times in the array :-)
EDIT
well ... the change did only fix it at root level :(
can someone crack this ?
Edited by helmuth on 22-04-2007 01:57
|
| |
|
|
| Yxos |
Posted on 22-04-2007 08:33
|

Senior Member

Posts: 290
Joined: 04/10/2006
|
Right.
Except, the last line is faulty. The link doesn't work.
Should be like e.g.:
Codeecho "<center><a href='http://avatars.jurko.net' target='_blank'>Get An Avatar Here</a></center><br>";
Yxos
The best solution is not necessarily a technical solution !
|
| |
|
|
| itsmi |
Posted on 12-05-2007 17:36
|

Junior Member

Posts: 22
Joined: 11/11/2006
|
Hello,
I'd like to have an infusion which allows users to make their own avatar on line. May be someone here could be interested to work on it ? I'm not good enought myself I'm afraid 
Follow the link to try my script PHP+GD+javascript, you'll see it is nice working but I don't know how to use it as infusion (using user-ID and saving result as user-avatar directly)
The script allows upload, crop and resize jpg files :
http://musiqueori...adform.php
What I don't know is how to do for saving result as avatar using functions and DB users. I also have positionning problem with the crop area when using the script in a custom-page instead of external page |
| |
|
|
| chr1831 |
Posted on 13-05-2007 00:56
|

Junior Member

Posts: 16
Joined: 14/09/2006
|
I just wanted 2 say thanks 4 my new avatar  |
| |
|
|
| itsmi |
Posted on 13-05-2007 03:17
|

Junior Member

Posts: 22
Joined: 11/11/2006
|
Welcome  |
| |
|
|
| jms1989 |
Posted on 26-07-2007 09:06
|

Junior Member

Posts: 33
Joined: 31/07/2006
|
I like this script. I changed it so it will use a "no-avatar.gif" file, that is then changed when the user either uploads an avatar or chooses an avatar from the avatar gallery.
Code
if ($userdata['user_avatar'] != "") {
echo "<center><img src='".IMAGES."avatars/".$userdata['user_avatar']."' alt='".$locale['567']."'><br></center><hr>\n";
} else {
echo "<center><img src='".IMAGES."no-avatar.gif'></center>";
echo "<center><a href='".INFUSIONS."avatar_gallery/avatar_gallery.php'>Get An Avatar Here</a></center></a><hr>";
}
I also cleaned it up.
|
| |
|
|
| temp_acc |
Posted on 26-07-2007 16:13
|

Junior Member

Posts: 46
Joined: 03/07/2007
|
2 helmuth
Your code healing:
Code
...
else {
$images = array("images/avatars/avatar1.gif",
"images/avatars/avatar2.gif",
"images/avatars/avatar3.gif",
"images/avatars/avatar4.jpg",
"images/avatars/avatar5.jpg");
$size = (count($images) -1); //look at this offset
//srand(time()); - not needed since PHP 4.2.0
$random = mt_rand(0, $size); //there was a BUG!
echo "<center><img src=$images[$random]></center>";
echo "<center><a href='http://avatars.jurko.net' target='_blank'>Get An Avatar Here</a></center>"; //there was BUG too
}
Tell me - does it work? |
| |
|
|
| Wanabo |
Posted on 22-08-2007 10:11
|

Senior Member

Posts: 354
Joined: 06/02/2006
|
I like the idea and tried to implement the solution given in this thread. But failed because I realised later I use the standard user info panel!
I figured out a different solution and post it here because it's about the no avatar.
Every member without an avatar will have a standard avatar and a link to an avatar design site.
I modified viewthread.php by adding just 1 line!
Code snippet starts at line 131 and I inserted a line beteween line 137 and 138. Just make sure to upload an avatar to your images/avatar directory and call it mystery.gif, or change the name accordingly in the code snippet.
Code
<td valign='top' rowspan='3' width='145' class='tbl1'>
<a href='../profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($data['user_level']))."</span><br><br>\n";
if ($data['user_avatar'] != "") {
echo "<center><img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."'><br><br></center>\n";
$height = "185";
} else {
[color=#009933][b]echo "<center><a href='http://www.avatargenerator.org' target='_blank'><img border='0' src='".IMAGES."avatars/[i]mystery.gif[/i]' alt='Enable an Avatar in your profile!'><br>Make your own Avatar!</a><br><br></center>\n";[/b][/color]
$height = "70";
}
echo "<span class='alt'>".$locale['502']."</span> ".$data['user_posts']."<br>\n";
if ($data['user_location']) echo "<span class='alt'>".$locale['503']."</span> ".$data['user_location']."<br>\n";
echo "<span class='alt'>".$locale['504']."</span> ".showdate("%d.%m.%y", $data['user_joined'])."</td>
<td>
You can see for yourself how it looks by visiting one of my websites from my signature!
|
| |
|