Calling all geeks!

Encountering problems/errors? Confused as to where functions are? Improvements? Is there something on the Englipedia website that is incorrect? Here's the place to let us know.

Calling all geeks!

Postby Otaku on Thu Jan 27, 2011 11:31 am

The website currently has two search bars: Japanese and English. This is because if you type in kanji into the English search bar, you get nothing. If someone could figure out how to merge the code so you can type English or Japanese, please let me know.

ENGLISH CODE:
<form action="http://jhsenglipediaproject.com/GoogleSearchResults.aspx" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="partner-pub-3392177217614021:x7ig8j-n11y" />
<input type="hidden" name="cof" value="FORID:9" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="text" name="q" size="31" />
<input type="submit" name="sa" value="Search Englipedia" />
</div>
</form>

<script type="text/javascript" src="http://www.google.co.jp/coop/cse/brand?form=cse-search-box&amp;lang=en" defer="defer"></script>


JAPANESE CODE:
<form action="http://www.google.com/cse" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="013785672546498350506:ntgbp75gl18" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="31" />
<input type="submit" name="sa" value="検索" />
</div>
</form>

<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=ja" defer="defer"></script>
Last edited by Otaku on Thu Jan 27, 2011 11:31 am, edited 1 time in total.
User avatar
Otaku
Posting God!
 
Posts: 4294
Joined: Wed Oct 01, 2008 6:39 pm
Location: Mt. Fuji
Highscores: 42
Gender: Male
Country: United States (us)
Karma: 77

Re: Calling all geeks!

Postby peet on Thu Jan 27, 2011 1:07 pm

This line in English version:
<input type="hidden" name="ie" value="ISO-8859-1" />

should change to unicode if possible (value="UTF-8"). Maybe as simple as that.?..
peet
Posting Rank: Level 18
 
Posts: 260
Joined: Thu Aug 26, 2010 10:53 am
Gender: None specified
Karma: 16

Re: Calling all geeks!

Postby SirDickusBacillus on Thu Jan 27, 2011 1:21 pm

Will a normal javascript search function not search Japanese?
SirDickusBacillus
Posting Rank: Level 59
 
Posts: 882
Joined: Fri Nov 05, 2010 8:11 am
Gender: None specified
Karma: 22

Re: Calling all geeks!

Postby Otaku on Thu Jan 27, 2011 1:26 pm

It was really that simple!!!

http://jhsenglipediaproject.com/thp.aspx

Peet, where were you when I needed you!?!?

YES!!!!!!!!!!!!!!!!

Now, I've got 1000's of pages to update! Thanks, buddy!
Last edited by Otaku on Thu Jan 27, 2011 1:43 pm, edited 1 time in total.
User avatar
Otaku
Posting God!
 
Posts: 4294
Joined: Wed Oct 01, 2008 6:39 pm
Location: Mt. Fuji
Highscores: 42
Gender: Male
Country: United States (us)
Karma: 77

Re: Calling all geeks!

Postby peet on Thu Jan 27, 2011 3:54 pm

Glad it was that easy, because anything more complicated I would have been out of ideas ;)

Unicode is great though. Like 10 yrs ago before Unicode was widely in use, you always had to go into your browser view options and change character encoding just to get most Japanese/Foreign pages to display the characters. Now just the one UTF-8 encoding can display almost any language.
peet
Posting Rank: Level 18
 
Posts: 260
Joined: Thu Aug 26, 2010 10:53 am
Gender: None specified
Karma: 16

Re: Calling all geeks!

Postby Otaku on Thu Jan 27, 2011 4:31 pm

Yeah, but without ANY background in coding, things can get pretty challenging sometimes.

@Sir, I set up that search bar years ago using a program Google created. I couldn't get the bilingual thing working right away and I was doing a ton of other stuff at the time so I moved on and simply smacked down a J & E search bar. Don't know if a normal javascript would have worked...and reference first sentence of this post. :)
User avatar
Otaku
Posting God!
 
Posts: 4294
Joined: Wed Oct 01, 2008 6:39 pm
Location: Mt. Fuji
Highscores: 42
Gender: Male
Country: United States (us)
Karma: 77

Re: Calling all geeks!

Postby SirDickusBacillus on Fri Jan 28, 2011 3:06 pm

No background and you have here an amazing site Sir Otaku.

XML was as far as I got and I havent used it in years. Glad its fixed thanks to peet!
SirDickusBacillus
Posting Rank: Level 59
 
Posts: 882
Joined: Fri Nov 05, 2010 8:11 am
Gender: None specified
Karma: 22

Re: Calling all geeks!

Postby Otaku on Fri Jan 28, 2011 3:13 pm

No background and you have here an amazing site Sir Otaku

Thank, flattery will get you everywhere...
User avatar
Otaku
Posting God!
 
Posts: 4294
Joined: Wed Oct 01, 2008 6:39 pm
Location: Mt. Fuji
Highscores: 42
Gender: Male
Country: United States (us)
Karma: 77



Who is online

Users browsing this forum: No registered users and 1 guest