What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » General » Forum & Website » Changing Avatars

Pages: (3): « First [ 1 ] 2 3 » Last »
Changing Avatars
Author: Message:
twobluestripes
New Member
*

Avatar
"Pride of the King's Navy, you are."

Posts: 13
35 / Female / –
Joined: Apr 2004
O.P. Huh?  Changing Avatars
I noticed that some members have avatars that change each time the page is refreshed. I also saw a sig banner like this. I think this is really cool, and was wondering how it is done. Is it exclusive to higher up members? Or does it only work on this board? And is it like a code, for the sig banner? Let me know. :)
[Image: twobluestripes.jpg]
04-25-2004 09:53 PM
Profile E-Mail PM Web Find Quote Report
.blade//
Veteran Member
*****

Avatar

Posts: 2856
Reputation: 39
35 / Male / –
Joined: Jan 2004
RE: Changing Avatars
It's a PHP code hsoted on a site other than the forums. There are some sites that offer changing sig.s and av.s for free off of their site, but members such as Keystorm coded their own.
[Image: A%20Pointy%20Rock.jpg]
04-25-2004 09:56 PM
Profile PM Web Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: Changing Avatars
Yeah, right:

MPavatar.php: (with slight modifications)
code:
<?PHP
$pics["pic"] = array (
'avatar1.jpg',
'avatar2.jpg' ,
'avatar3.jpg'     //and so on
);

$pics["title"] = array (
'Bill Gates showing the latest Messenger Plus! Technologies',
'Vitto Corleone, the Godfather, proud of his MP! pin, as new member of the forum family',
'George W. Bush revealing the existance of evil code in MP! capable to destruct CIA\'s infrastructure'  //and so on
);


$pics["date"] = array (
'2004-01-17',
'2004-01-17',
'2004-01-19'    //and so on
);


$pics["author"] = array (
'KeyStorm' ,
'KeyStorm' ,
'KeyStorm'    //and so on
);




if($view=="gui"){
if(empty($i))$i=1;
$id=$i-1;

echo"
<html>
<head>
<title>KeyStorm's Dynamic Messenger Plus! Avatars - Showing $i of ".sizeof($pics["pic"])."</title>
</head>
<html>
<body bgcolor='#38688B' text='#CCCCCC'>
<basefont face='Geneva, Arial, Helvetica, sans-serif' color='#CCCCCC' size='2'>
<center>
<h2>
Keystorm's Messenger Plus! Dynamic Avatar Collection
</h2>
<h4>User Interface Environment</h4>
<hr>
<h3>Image $i of ".sizeof($pics["pic"])."</h3>
<br>
<img src='MPavatar.php?i=$i' alt='$pics[title][$id]'> 
<br><br>
Title: <b>".$pics[title][$id]."</b><br>
Author: <b>".$pics[author][$id]."</b><br>
Added: <b>".$pics[date][$id]."</b><br><br>
<hr>";

for($a=1;$a<=sizeof($pics["pic"]);$a++){
if($a==$i)echo "<font color=white>".($a)."</font> ";
else echo "<a href='MPavatar.php?view=gui&i=".($a)."' style='color:#CCCCCC; text-decoration:none'>".($a)."</a> ";
if($a!=sizeof($pics["pic"])) echo "| ";
}

echo "
<hr>
<font size=-1>
<b>Terms and Conditions:</b><br>
All images shown here are property of their respective authors (in this case: ".$pics[author][$id]."). You may freely use them under following conditions:<br>
Written permission of ".$pics[author][$id].", the author. (webmaster&nbsp;&part;&nbsp;keystorm&bull;net)<br>
Other terms and conditions will be notified thereafter.<br>
All images have a .psd (or equivalent) source-file that can prove the ownership of the image and the owner has therefore authority over it.

</font>

</center>
</body>
</html>
";


}else{
if(empty($i)) $i = time()%sizeof($pics["pic"]);
else $i--;
$filename = $pics["pic"][$i];

header ('Content-type: image/jpeg');
header( 'Content-Disposition: attachment; filename=avatar');
$f = fopen ($filename, 'rb');
fpassthru ($f); }

?>


This way I have a nice dynamic avatar when address is:  http://funmail.keystorm.net/MP!/MPavatar.php
And a nice GUI for browsing the avatars with comments, dates and authors when the address is:
http://funmail.keystorm.net/MP!/MPavatar.php?view=gui

Hope this helps all people wanting to have a dynamic avatar.

This post was edited on 04-25-2004 at 10:31 PM by KeyStorm.
04-25-2004 10:10 PM
Profile E-Mail PM Web Find Quote Report
twobluestripes
New Member
*

Avatar
"Pride of the King's Navy, you are."

Posts: 13
35 / Female / –
Joined: Apr 2004
O.P. RE: Changing Avatars
oooooh...

fascinating. mind-boggling, but fascinating. I'm going to have to figure this out. so, is all that html there optional? and you can write the program in notepad and save it as a php to upload, right? gah, and i though cgi webforms were hard.
[Image: twobluestripes.jpg]
04-25-2004 10:25 PM
Profile E-Mail PM Web Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: Changing Avatars
right, you'll only have to change the data where I put "//and so on". There you can add more or leave less items. The HTML is for the GUI thing.
Without GUI it would be:
code:
<?PHP
$pics["pic"] = array (
'avatar1.jpg',
'avatar2.jpg' ,
'avatar3.jpg'     //and so on
);


if(empty($i)) $i = time()%sizeof($pics["pic"]);
else $i--;
$filename = $pics["pic"][$i];

header ('Content-type: image/jpeg');
header( 'Content-Disposition: attachment; filename=avatar');
$f = fopen ($filename, 'rb');
fpassthru ($f); }

?>

It's not exactly a webform, but it's CGI, though. I also though PHP was hard before :P.
04-25-2004 10:30 PM
Profile E-Mail PM Web Find Quote Report
twobluestripes
New Member
*

Avatar
"Pride of the King's Navy, you are."

Posts: 13
35 / Female / –
Joined: Apr 2004
O.P. RE: Changing Avatars
so can you use this kind of thing to say, have a random changing photo on a webpage? or a sig banner?
[Image: twobluestripes.jpg]
04-25-2004 10:35 PM
Profile E-Mail PM Web Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: Changing Avatars
A pseudo-randomly changing sig banner, yeah.
(It's pseudo, because it's virtually changed each milisecond)
04-25-2004 10:39 PM
Profile E-Mail PM Web Find Quote Report
twobluestripes
New Member
*

Avatar
"Pride of the King's Navy, you are."

Posts: 13
35 / Female / –
Joined: Apr 2004
O.P. RE: Changing Avatars
sorry, one last question: do all the pictures need to be the same size?
[Image: twobluestripes.jpg]
04-25-2004 10:49 PM
Profile E-Mail PM Web Find Quote Report
.blade//
Veteran Member
*****

Avatar

Posts: 2856
Reputation: 39
35 / Male / –
Joined: Jan 2004
RE: Changing Avatars
No - it has nothing to do with the size or file size of the pictures.
[Image: A%20Pointy%20Rock.jpg]
04-25-2004 10:57 PM
Profile PM Web Find Quote Report
twobluestripes
New Member
*

Avatar
"Pride of the King's Navy, you are."

Posts: 13
35 / Female / –
Joined: Apr 2004
O.P. RE: Changing Avatars
oh, shizzle, i got another question...i host my images on a seperate server than my other stuff...if i host the php on my server and put the full urls for my photobucket images, will it work? or do they all need to be on the same server? thanks mucho.
[Image: twobluestripes.jpg]
04-25-2004 11:14 PM
Profile E-Mail PM Web Find Quote Report
Pages: (3): « First [ 1 ] 2 3 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On