Jappleng Logo
Unleash the Full Experience – Login or Register Now!
Join us and get access to:
  • Anime/Manga Lineups & Tracker
  • Japanese Culture Lessons
  • Forums, Social Network & Chat
  • Clubs & Study Groups
  • Vocabulary Builder & Daily Login Rewards
  • Friend Finder & Pen-Pals
  • Games & Digital Pets (Yokai)
  • And much more!
Let's get you started – Register a Free Account!
Type this in the box below:
I am 13 years old or over and have read and agreed to the Terms of Use and Privacy Policy.
Complete Registration
Thank you for your support!
Announcement
March 14 - Daily Login Rewards: 10k + 10k Event! Thank you everyone!
[Read More]
Username
Password
Cancel
Login
Progress
Market
Friends
Night and Day
Settings
Your Avatar
J-Spot Social Network
Fanclubs & Study Groups
Find New Friends / Pen-Pal
J-Coins
0
Tokens
0
Coins
0
Mochi
0
Lv.
1
--:--
Guest // Guest
Available
Want2Chat
Away
Busy / DND
Invisible
Jump to Section
JPLearn!
Japan Life!
Jappleng Dictionary
Connect With Others
IMChat!
Forum Society
JSpot Social Network
Club Jappleng
Friend Match
Have Fun!
Arcades
Sticker Collection
Market Unlock
Achievements
Notifications
View All [+]
Fetching list...
Calendar
Add Entry [+]
<<April 2024>>
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Your Avatar
--:--
XP 0 / 50
Friends
Now loading...
Must be logged-in to use this
Settings
Personalization and settings
Arrow
Achievements
Win More Achievements!
Arrow
My Stats
View My Stats
Arrow
Login
Register or Login Here!
Arrow
Image Title
Image Description
Submit
Your image was succesfully uploaded and now we ask that you provide both an image title and description since this will be indexed in your gallery and/or the club this is posted in. Ignoring this step will cancel the upload process. If you delete the image from the editor, it will still remain in your image gallery.
OG Jappleng
//Ogjappleng
OG Jappleng
//Ogjappleng
Join J-Spot!
MENU
Join J-Spot
10
Cover image
Loading Content...
Close
Zoom-In
Zoom-Out
Save Cover
Cancel
You may also drag the cover to move it around.
Be careful of white edges.
Feed ↻
I hit a snag but it's okay now!
Views

I hit a snag but it's okay now!


Written by: OG Jappleng

Developing the Poll / Quiz system was more difficult than I had originally anticipated, and the reason being was because on how I was attempting to go about uploading the data.  (Screenshots of the quiz inside!)

Click to expand


base64 vs original (The compression story)
base64 is essentially the file itself turned into a lossless version. For instance, if you were to upload a jpg as a base64 png, it would be significantly larger in file size but you could at the very least use HTML5 canvas to edit the image before uploading like you could in photoshop. The downside is that unless you write a very complex javascript library to compress the file prior to upload, it will be about 33% larger in file size.

This is how I normally go about doing things for avatars, and smaller image files simply because I want to give the user the option to crop or resize their images. But for the Poll system, the images are not cropped, they remain their original file dimensions and a 1000x1000 image can easily become 7mb in size depending on the complexity of the image. This is why I didn't use this method, because I didn't want it to be a burden for those on mobile or limited bandwidth networks.

Click to expand


Uploading a file with data
This is where I got into a little snag, I thought it would be fairly straightforward to upload a file with an array of other information but it wasn't. Traditionally, Jappleng uses jQuery's POST method to do all of the dirty work, but sometimes that isn't the case. When it came down to uploading a file and other data asynchronously, I couldn't correctly send the file's information. I had to return to AJAX and do it that way but as it turned out I couldn't just upload a file at the same time of sending the other information due to how JSON works.

With plenty of research done, I came to the conclusion that there wasn't enough documentation to explain the situation well for me. So I decided to improvise my own setup. First, the information is passed, and if there's an image attached, it won't finalize the post. If there isn't, the poll will get uploaded immediately. If the image is attached, it sends an OK signal back to the user asking for the file, then if it receives the file, it will continue the process. If it can't continue the process like let's say the user aborted, or there was a security issue it will not publish the poll.

Security is crucial
I'm more of a PHP developer than a Javascript developer, I spend most of my time in PHP and because of that I'm highly in tuned with security. All data that goes through Jappleng's CMS / Web engine ends up getting thoroughly scanned for any openings. Images also get dissected for malicious code and it gets really crazy.



Moving forward
Now I have a nifty poll system ready to be used for Club Jappleng! It took 2 1/2-days to develop and it was more complicated than it should have been. The code can be re-used (mostly) to create club Quizzes which will come in a bit. For now I will finalize a few more things on the poll system and move on to the Wiki.


Total Friends: 225
Jappleng Presents: 10k + 10k Event for everyone!
Friend Finder
New Chat Themes are available
Total Subs: 33
See All Club Subs arrow
fran reincarnated as a s...
0Comments
Views57
kuno with numbers (wip)
0Comments
Views55
making of kuno
0Comments
Views59
New anime lineup feature
0Comments
Views59
Updating Jappleng HD
0Comments
Views57
Updating Jappleng
0Comments
Views55
Total Files: 649
J-World Live Feed
SweetCandyBANNED
SweetCandy(Banned)
//SweetCandyBANNED
moon0_0
moon0_0
//moon0_0
Stars
A new friendship was born!
Geethanjali
Geethanjali
//Geethanjali
This feed includes all public posts.
Quick Navigation:
Home Page ·
Japanese Entertainemnt (Anime and Manga) ·
Learn Japanese online free ·
Explore the Japanese culture ·
Clubs and Study Groups ·
Community Forums ·
Practice Japanese Apps ·
English to Japanese Dictionary ·
Friend Finder
About Jappleng and Fun Facts
Terms of use | Privacy Policy | Cookies? Om nom...
© 2024 Jappleng, All Rights are Reserved | Need an account? Registration is free!
Information for Parents & Teachers
Help & Getting Started