Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Acmlmboard support?.
Acmlm's Board - I2 Archive - Acmlmboard support? - Random Username Colors? | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Elric

Chasupa


Currently Playing:
You Like A Lute.
Level: 40

Posts: 504/687
EXP: 440016
For next: 1293

Since: 03-15-04
From: Melniboné

Since last post: 6 hours
Last activity: 6 hours
Posted on 09-07-05 09:14 AM Link | Quote
Is it possible to modify AcmlmBoard so that the colors for a username are random every page load, or every instance of the username?
Stifu

Level: 28

Posts: 201/304
EXP: 129458
For next: 1880

Since: 03-16-04
From: Your mom's bed

Since last post: 18 hours
Last activity: 11 hours
Posted on 09-07-05 11:59 AM Link | Quote
If memory serves, this has already been done on this very board. Well, the previous one to be exact.
Elric

Chasupa


Currently Playing:
You Like A Lute.
Level: 40

Posts: 507/687
EXP: 440016
For next: 1293

Since: 03-15-04
From: Melniboné

Since last post: 6 hours
Last activity: 6 hours
Posted on 09-07-05 01:02 PM Link | Quote
OK. Now that you mention it, I seem to have a hazy recollection of it.

The next question, then, is how would I go about doing it? I only want it to work for one powerlevel, though that may not be possible. If it's not, then I hope making it work for one sex is, since I can easily make a new "sex" for it...
TheGreatWhiteDope

Koopa
Banned
Level: 16

Posts: 57/108
EXP: 19462
For next: 794

Since: 01-05-05

Since last post: 8 days
Last activity: 4 days
Posted on 09-08-05 01:51 AM Link | Quote
Random color usersnames? Do you mean sex=3? Because if sex=3 or above then it changes on every refresh but is limited to the colors in colors.php.
Book Keeper
♫♫♫ n00blet ♫♫♫

Level: 21

Posts: 142/160
EXP: 49435
For next: 508

Since: 03-15-04
From: Wired

Bookworm eat fresh!

Since last post: 20 hours
Last activity: 8 hours
Posted on 09-08-05 01:53 AM Link | Quote
Find (its in function.php)

if($sex==3){
$stime=gettimeofday();
$rndcolor=substr(dechex(1677722+$stime[usec]*15),-6);
$namecolor="color=$rndcolor";
}

and change $sex==3 to $powerlevel==3 for admin's or whatever powerlevel you want it to be.


(edited by Wolfling on 09-07-05 04:53 PM)
Sandy53215
Acmlm (10:55:31 PM): they're having fun for the first time in so long
Level: 47

Posts: 889/948
EXP: 713034
For next: 53169

Since: 03-15-04
From: Milwaukee, Wisconsin (U.S.A)

Since last post: 1 day
Last activity: 4 hours
Posted on 09-08-05 05:59 AM Link | Quote
Originally posted by Wolfling
Find (its in function.php)

if($sex==3){
$stime=gettimeofday();
$rndcolor=substr(dechex(1677722+$stime[usec]*15),-6);
$namecolor="color=$rndcolor";
}

and change $sex==3 to $powerlevel==3 for admin's or whatever powerlevel you want it to be.


This should do it.
Elric

Chasupa


Currently Playing:
You Like A Lute.
Level: 40

Posts: 511/687
EXP: 440016
For next: 1293

Since: 03-15-04
From: Melniboné

Since last post: 6 hours
Last activity: 6 hours
Posted on 09-08-05 06:30 AM Link | Quote
Ah. I was looking at the getnamecolor funtion. Now wonder I didn't see it.

I should be able to leave the $sex==3 one in there, and add a $powerlevel==3, shouldn't I? Also, would this work?

$if($powerlevel==3) {
$rndcolor=rand(1,5);
if($rndcolor==1) {
$clr="#FFFFFF";
}else{
if($rndcolor==2) {
$clr="#FF0000";
}
etc. for all 5 outcomes


That would allow it to only cycle through colors I define...
Book Keeper
♫♫♫ n00blet ♫♫♫

Level: 21

Posts: 143/160
EXP: 49435
For next: 508

Since: 03-15-04
From: Wired

Bookworm eat fresh!

Since last post: 20 hours
Last activity: 8 hours
Posted on 09-08-05 07:12 AM Link | Quote
In that case, change ($sex==3) ($sex==3 or $powerlevel==3)

That's how I did it.
Sandy53215
Acmlm (10:55:31 PM): they're having fun for the first time in so long
Level: 47

Posts: 891/948
EXP: 713034
For next: 53169

Since: 03-15-04
From: Milwaukee, Wisconsin (U.S.A)

Since last post: 1 day
Last activity: 4 hours
Posted on 09-08-05 08:02 AM Link | Quote
Originally posted by Elric
Ah. I was looking at the getnamecolor funtion. Now wonder I didn't see it.

I should be able to leave the $sex==3 one in there, and add a $powerlevel==3, shouldn't I? Also, would this work?

$if($powerlevel==3) {
$rndcolor=rand(1,5);
if($rndcolor==1) {
$clr="#FFFFFF";
}else{
if($rndcolor==2) {
$clr="#FF0000";
}
etc. for all 5 outcomes


That would allow it to only cycle through colors I define...


No, I would do...

if($powerlevel==3){$rndcolor=rand(1,5);}
if($rndcolor==1){$clr="#FFFFFF";}
if($rndcolor==2){$clr="FF0000";}

Thats how it should be if you want it to work.


(edited by Randy53215 on 09-07-05 11:03 PM)
Elric

Chasupa


Currently Playing:
You Like A Lute.
Level: 40

Posts: 514/687
EXP: 440016
For next: 1293

Since: 03-15-04
From: Melniboné

Since last post: 6 hours
Last activity: 6 hours
Posted on 09-08-05 01:23 PM Link | Quote
Ah. Thanks! Now to test it and screw more things up at my board!

Or not. There's no if($sex==3) in my function.php. Probably because I'm using v1.92...

Man. getnamecolor() is a mess in v1.A2...

There. Simple modification of function.php to include the if($sex==3) bit, and then the addition of the code Randy53215 supplied, and it works!

Thanks for the help, everyone!
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Acmlmboard support? - Random Username Colors? | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.014 seconds.