Omnimaga

Omnimaga => Discontinued => Our Projects => OmnomIRC Development => Topic started by: Netham45 on May 02, 2011, 06:47:38 am

Title: OmnomIRC Options Page
Post by: Netham45 on May 02, 2011, 06:47:38 am
I've been working on an options page for OmnomIRC off and on for the past couple weeks(as DJ found out, thanks for that rickroll btw. :|), and I just finished it a few minutes ago.

Quite a few changes were made internally(cookie storage method, numerous changes to the parser, and some other things), some of which were bugfixes, and some for the features. But, that's not the fun stuff! If you look at the top bar on OmnomIRC, you'll notice a new link, 'Options'. In there, you can can change things like how highlighting works, or rather you have colored names or not.

As always, I'm expecting a few bugs to crop up with this update(It wouldn't be OmnomIRC without 'em!), so feel free to make a new post in the 'OmnomIRC Chat and Spybot45 Suggestions & Bug Reports (http://www.omnimaga.org/index.php?board=132.0)' section. I only ask that before you do, please clear your cache, as that has been the culprit more times than I can count.
Title: Re: OmnomIRC Options Page
Post by: ZippyDee on May 02, 2011, 07:02:52 am
You do not have permission to access this page :(
Title: Re: OmnomIRC Options Page
Post by: Netham45 on May 02, 2011, 07:03:55 am
You do not have permission to access this page :(

I like those easy to fix bugs. Fixed.
Title: Re: OmnomIRC Options Page
Post by: ZippyDee on May 02, 2011, 07:05:04 am
Well, now I see nothing when I go to the page... Only the banner, Omnom, and the footer.
Title: Re: OmnomIRC Options Page
Post by: ruler501 on May 02, 2011, 08:03:12 am
Well, now I see nothing when I go to the page... Only the banner, Omnom, and the footer.

I'm having the same problem
Title: Re: OmnomIRC Options Page
Post by: TIfanx1999 on May 02, 2011, 08:06:42 am
Well, now I see nothing when I go to the page... Only the banner, Omnom, and the footer.
^ Same here.
Title: Re: OmnomIRC Options Page
Post by: turiqwalrus on May 02, 2011, 08:10:02 am
same here... I'll check again when I'm not using the crappy macs that my school has :P
Title: Re: OmnomIRC Options Page
Post by: Broseph Radson on May 02, 2011, 09:04:02 am
PC here chrome dev build. Same problem
Title: Re: OmnomIRC Options Page
Post by: Deep Toaster on May 02, 2011, 09:10:31 am
Same.
Title: Re: OmnomIRC Options Page
Post by: Jim Bauwens on May 02, 2011, 09:16:09 am
I have the same problem, there is only a '-' in the body.
Title: Re: OmnomIRC Options Page
Post by: Deep Toaster on May 02, 2011, 09:17:17 am
I didn't notice that. Nice catch :)
Title: Re: OmnomIRC Options Page
Post by: Netham45 on May 02, 2011, 01:22:21 pm
I suppose it helps if I enable the ezblock it's in for everyone too.

Damn permissions.
Title: Re: OmnomIRC Options Page
Post by: DJ Omnimaga on May 02, 2011, 02:28:33 pm
Yeah I found it a week ago. It seemed pretty promising so as a thank you for your work I appended a rickroll to it that only you can see. ;D

But seriously it's nice, it would be cool if this was turned into checkboxes and appended inside OmnomIRC, as replacement to some of the links at the top?
Title: Re: OmnomIRC Options Page
Post by: ZippyDee on May 02, 2011, 03:05:02 pm
The options don't seem to change anything.........I tried them all and they don't affect it.
Title: Re: OmnomIRC Options Page
Post by: DJ Omnimaga on May 02, 2011, 03:08:48 pm
Hmm weird, what browser?
Title: Re: OmnomIRC Options Page
Post by: ZippyDee on May 02, 2011, 03:09:17 pm
Google Chrome
Title: Re: OmnomIRC Options Page
Post by: Juju on May 02, 2011, 03:10:23 pm
I agree, it would be nicer with checkboxes.
Title: Re: OmnomIRC Options Page
Post by: Netham45 on May 02, 2011, 03:24:29 pm
Have you cleared your cache, restarted browser, deleted cookies, etc...?
Title: Re: OmnomIRC Options Page
Post by: ZippyDee on May 02, 2011, 03:27:59 pm
Clearing cache did it :) Thanks. I should have tried that first, sorry.
Title: Re: OmnomIRC Options Page
Post by: Darl181 on May 02, 2011, 07:49:24 pm
Minor random thing, but in the options page the search box on top migrates to the middle of the bar. (Firefox 4.1)

Other than that, great job.
Title: Re: OmnomIRC Options Page
Post by: ztrumpet on May 02, 2011, 09:53:02 pm
Minor random thing, but in the options page the search box on top migrates to the middle of the bar. (Firefox 4.1)

Other than that, great job.
Yup, that happened to me to (Firefox 4.1).

Wow, Netham, nice job! :D  I like it.
Title: Re: OmnomIRC Options Page
Post by: yunhua98 on May 02, 2011, 10:01:56 pm
How is the color of your name determined?
Title: Re: OmnomIRC Options Page
Post by: ztrumpet on May 02, 2011, 10:08:56 pm
Strange.  Again, I'm using Firefox 4.1:
If I left click on "Rules," "Today's Logs," or "This Year's Logs" and open it in a new tab, it opens another copy of the page I'm currently on instead of the logs. ???
Title: Re: OmnomIRC Options Page
Post by: Netham45 on May 02, 2011, 10:11:51 pm
Just click it, it opens in a new page by default.

They call a javascript function on left click that opens in a new tab.
Title: Re: OmnomIRC Options Page
Post by: Darl181 on May 02, 2011, 10:17:16 pm
How is the color of your name determined?
it's by the letters in the name, it seems.  Look at "Goto"
Title: Re: OmnomIRC Options Page
Post by: Netham45 on May 02, 2011, 11:49:11 pm
How is the color of your name determined?

Code: [Select]
function getNameColor($name)
{
$name = str_replace("@","",$name);
$name = str_replace("+","",$name);
$rcolors = array(19, 20, 22, 24, 25, 26, 27, 28, 29);
$sum = $i = 0;
while (isset($name[$i]))
$sum += ord($name[$i++]);
$sum %= 9;
return $rcolors[$sum];
}
Title: Re: OmnomIRC Options Page
Post by: Darl181 on May 02, 2011, 11:50:38 pm
So, I'm guessing it won't be possible to choose which color one has? :(
Title: Re: OmnomIRC Options Page
Post by: Netham45 on May 02, 2011, 11:51:41 pm
It could be controlled by the last char in your name.
Title: Re: OmnomIRC Options Page
Post by: Darl181 on May 02, 2011, 11:54:04 pm
How was the color changed in the screenie then?  All that changed was the first letter.
/me doesn't understand the code si he has no idea how it works
Title: Re: OmnomIRC Options Page
Post by: Netham45 on May 03, 2011, 12:00:12 am
Every character has an ascii number.

Code: [Select]
N = 78
e = 101 +  78 = 179
t = 116 + 179 = 295
h = 104 + 295 = 399
a = 97 + 399 = 496
m = 109 + 496 = 605
4 = 52 + 605 = 657
5 = 53 + 657 = 710

710

Then we modulate it by 9.

Code: [Select]
710 % 9 = 8

It's then equal to the 8th color in the array(that goes from 0-8). Since I kept the x-chat numerals, that's 29. 29 matches up to a CSS value with colors (that were again, ripped from x-chat).

By changing any one character up one or down one, you can make the result equal whatever you want. Appending an 'a' to the end would make the color stay the same at the 8th entry, a 'b' would make it be the 0th entry in the array, a 'c' would make it the 1st, ... 'i' would make it be the 7th, and j would start the loop again.
Title: Re: OmnomIRC Options Page
Post by: Darl181 on May 03, 2011, 12:02:36 am
I'm still kind of confused how it changed when I changed just the first letter...
Tho I guess it's not really important, it's a great feature nonetheless :D
Title: Re: OmnomIRC Options Page
Post by: DJ Omnimaga on May 03, 2011, 12:51:54 am
I wonder if we could narrow the color range to a more Omnimaga-themed range? (or close)
Title: Re: OmnomIRC Options Page
Post by: Darl181 on May 03, 2011, 01:03:48 am
Yeah, some of the clashing colors get irksome after a while...
Also, about an hour ago there was a giant wall of green nicks :P so a wider range would be nice as well
Title: Re: OmnomIRC Options Page
Post by: Netham45 on May 03, 2011, 01:04:24 am
I wonder if we could narrow the color range to a more Omnimaga-themed range? (or close)

Sure, got any colors?
Title: Re: OmnomIRC Options Page
Post by: Darl181 on May 03, 2011, 01:38:13 am
nickname nickname nickname nickname nickname  nickname  nickname nickname nickname nickname nickname nickname nickname nickname nickname nickname nickname
Title: Re: OmnomIRC Options Page
Post by: Deep Toaster on May 03, 2011, 09:29:36 am
Awesome, the options work! Just gotta remember to cache flush :)