Number Converter down

Started by Tirea Aean, October 05, 2013, 09:19:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tirea Aean

Tìtstewan noticed that the /navi-numbers Number converter was not working.

I investigated with Google Chrome JavaScript console and discovered an error message indicating that JQuery had not been defined. (This means someone forgot to put the JQuery Library file in script tags on the page somewhere.) I've logged into the WordPress and hacked the page to work off tirea.learnnavi.org copy of jquery-1.3.2.min.js and it works now. But maybe a better, more official way that isn't so hackish could be done. If I had shell access, I could have fixed this in a better way. Figured I'd let someone who has such clearance know.

:)

`Eylan Ayfalulukanä

But if they gave you shell access, would that make you a 'shell of your former self'??   :D

Yawey ngahu!
pamrel si ro [email protected]

archaic

Pasha, an Avatar story, my most recent fanfic, Avatar related, now complete.

The Dragon Affair my last fanfic, non Avatar related.

Blue Elf

Oe lu skxawng skxakep. Slä oe nerume mi.
"Oe tasyätxaw ulte koren za'u oehu" (Limonádový Joe)


Kemaweyan

If you need to translate Na'vi numbers (words) to octal or decimal format, try this ;)

Nìrangal frapo tsirvun pivlltxe nìNa'vi :D

Tirea Aean

Quote from: `Eylan Ayfalulukanä on October 05, 2013, 11:45:14 PM
But if they gave you shell access, would that make you a 'shell of your former self'??   :D

HRH! I don't actually want or need shell. :3 I'd rather let the admins take care of things like that.

Quote from: Kemaweyan on October 06, 2013, 07:09:50 AM
If you need to translate Na'vi numbers (words) to octal or decimal format, try this ;)


HEY! That's really nice! Maybe this could be added somehow.

Tìtstewan

Code (php) Select
<?php

$string 
= IsSet($_POST['number']) ? $_POST['number'] : "";

echo 
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
<title>Na'vi numbers translator</title>
<body>

<form method='post' action='navinum.php'>
<input type='text' name='number' style='width: 200px;'>
<input type='submit' name='ok' value='Send' />
</form>"
;

$pattern "#^\s*(?:(me|pxe|tsì|mrr|pu|ki)?(zazam?(?!(?:un|rr|e))))?(?:(me|pxe|tsì|mrr|pu|ki)?(vozam?(?!(?:un|rr|e))))?(?:(me|pxe|tsì|mrr|pu|ki)?(zam?(?!(?:un|rr))))?(?:(me|pxe|tsì|mrr|pu|ki)?(vol?))?((?(?<=vol)(?:aw|)|(?(?<=\S)(?:(?<=m)(?:aw|)|mun|pey|sìng|mrr|fu|hin)|(?:'aw|mune|pxey|tsìng|mrr|pukap|kinä))))\s*$#";

if ($string && preg_match($patternstripslashes($string), $matches)) {

$number 0;

for ($i 1$i 8$i += 2) {

if (!$matches[$i 1])
continue;

$mult 4096 pow(8, ($i 1) / 2);

switch ($matches[$i]) {
case "me":
$number += $mult;
break;
case "pxe":
$number += $mult;
break;
case "tsì":
$number += $mult;
break;
case "mrr":
$number += $mult;
break;
case "pu":
$number += $mult;
break;
case "ki":
$number += $mult;
break;
default:
$number += $mult;
break;
}
}


switch ($matches[9]) {
case "aw":
case "'aw":
$number += 1;
break;
case "mun":
case "mune":
$number += 2;
break;
case "pey":
case "pxey":
$number += 3;
break;
case "sìng":
case "tsìng":
$number += 4;
break;
case "mrr":
$number += 5;
break;
case "fu":
case "pukap":
$number += 6;
break;
case "hin":
case "kinä":
$number += 7;
break;
}

echo "<p>Na'vi number is <b>".stripslashes($string)."</b><br />";
echo "Octal number is <b>º".decoct($number)."</b><br />";
echo "Decimal number is <b>$number</a></p>";
}

echo "</body></html>";
?>

Ooooohhh nice!

-| Na'vi Vocab + Audio | Na'viteri as one HTML file | FAQ | Useful Links for Beginners |-
-| Kem si fu kem rä'ä si, ke lu tìfmi. |-

Toruk Makto

#7
EDIT: Using latest jquery now:

jquery can now be called from http://s.learnnavi.org/jquery-1.10.2.min.js

The number page has been updated.  Thanks Tirea!


Lì'fyari leNa'vi 'Rrtamì, vay set 'almong a fra'u zera'u ta ngrrpongu
Na'vi Dictionary: http://files.learnnavi.org/dicts/NaviDictionary.pdf

Tirea Aean

Thank you for doing it the real way! :D

Tìtstewan

The number base don't work...

Number [12]
Number base [base 10]
Decimal       Octal       Structure       Word Structure
12       14       (1*8)+4       ----vol-sìng

Number [12]
Number base [base 8]
Decimal       Octal       Structure       Word Structure
12       14       (1*8)+4       ----vol-sìng

Should be 10 decimal and 12 octal - vomun, kefyak?

-| Na'vi Vocab + Audio | Na'viteri as one HTML file | FAQ | Useful Links for Beginners |-
-| Kem si fu kem rä'ä si, ke lu tìfmi. |-

Toruk Makto

I see what you're seeing. I took a look at the js for the converter, but my java kung fu is not strong.

!summon Payoang !

Please to check the spaghetti code?  :D


-Markì

Lì'fyari leNa'vi 'Rrtamì, vay set 'almong a fra'u zera'u ta ngrrpongu
Na'vi Dictionary: http://files.learnnavi.org/dicts/NaviDictionary.pdf

Tìtstewan


-| Na'vi Vocab + Audio | Na'viteri as one HTML file | FAQ | Useful Links for Beginners |-
-| Kem si fu kem rä'ä si, ke lu tìfmi. |-

Toruk Makto

I am not good enough with java to be able to fix it. Haven't been able to get Payoang.  :-\

Lì'fyari leNa'vi 'Rrtamì, vay set 'almong a fra'u zera'u ta ngrrpongu
Na'vi Dictionary: http://files.learnnavi.org/dicts/NaviDictionary.pdf

Tirea Aean

#13
I can take a stab at checking it out. It's pretty much just JQuery.

EDIT: Was there a period of time after the site became powered by WordPress when the number converter was working properly?

DOUBLE EDIT:

Tìtstewan

#14
There was MUCH more code than that... ???
Awww, Tirea you broke it...
old gallery link?id=5355[/img]

-| Na'vi Vocab + Audio | Na'viteri as one HTML file | FAQ | Useful Links for Beginners |-
-| Kem si fu kem rä'ä si, ke lu tìfmi. |-

Tirea Aean

#15
Was there though?

Lemme look at the old site...

EDIT: Reverted back. It seems to work okay now. Right?

DOUBLE EDIT: Looks like Octal -> Decimal is not working still.

Toruk Makto

I can copy the numberthing file to the public repository if anyone wants to take a stab at it.

Lì'fyari leNa'vi 'Rrtamì, vay set 'almong a fra'u zera'u ta ngrrpongu
Na'vi Dictionary: http://files.learnnavi.org/dicts/NaviDictionary.pdf

Tìtstewan

I have the script, but the little problem is, the script is written like spagheti. It's extremely difficult to read that code.

-| Na'vi Vocab + Audio | Na'viteri as one HTML file | FAQ | Useful Links for Beginners |-
-| Kem si fu kem rä'ä si, ke lu tìfmi. |-

Tirea Aean

#18
Quote from: Tìtstewan on October 24, 2013, 10:52:26 PM
I have the script, but the little problem is, the script is written like spagheti. It's extremely difficult to read that code.

Did you get the version I beautified in my previous post?

EDIT: I still agree taht even then it's difficult to read because of the horrible choice in variable names, etc. Also, no luck on looking at the old code Pre-WordPress. I can see all the versions since WordPress though. Seriously. What's up with that wicked Script tag injection? :\\

Tìtstewan

Quote from: Tirea Aean on October 24, 2013, 10:53:25 PM
Did you get the version I beautified in my previous post?
If you mean this:
no, not that one.
I have the 'original' from the number website.

-| Na'vi Vocab + Audio | Na'viteri as one HTML file | FAQ | Useful Links for Beginners |-
-| Kem si fu kem rä'ä si, ke lu tìfmi. |-