Categories
Projects

IIUM Schedule Formatter v2 Now With Styler!

Ok, so let’s make this short and simple….

Assalamualaikum semua! Apa khabar! Ok, so di kesempatan yang sangat pendek ini, saya ingin memperkenalkan update terkini terhadap project mini saya iaitu Automatic IIUM Schedule Formatter v2. Sebenarnya ia lebih kepada versi 1.1 atau 1.2 dan untuk v2 saya nak letak beberapa perubahan lain lagi, namun disebabkan kesuntukan masa dan komputer, saya tidak dapat melakukan banyak perubahan.

Bagi anda yang tak tahu lagi apa itu Automatic IIUM Schedule Formatter, bolehlah baca post saya ini yang menerangkan tentang ape-ke-heh-nye dengannya. Post yang ini hanya bertujuan untuk menerangkan cara penggunaan di Firefox, yang mana tidak berfungsi dengan v1 serta menerangkan tentang fungsi Styler yang membolehkan anda untuk men-decorate jadual anda.

Ok, so sebelum ini, teknik copy and paste code berfungsi di chrome dan ie, namun, untuk firefox versi 6 ke atas, ia tidak berfungsi dan tidak melakukan apa-apa. Masalah ini terjadi disebabkan oleh satu ‘bugfix’ di firefox, yang, senang cakap tidak membenarkan anda untuk meng-copy-paste javascript code di url. ‘bugfix’ ini mungkin sekali dilakukan disebabkan ada pihak yang tidak bertanggungjawab yang menganiaya pengguna dengan menipu mereka untuk meng-copy-paste javascript yang mengandungi virus. Disebabkan itu, saya telah merangka work-around lain yang sudah diuji berfungsi dengan firefox. Teknik ini juga secara teknikalnya patut berfungsi dengan chrome sekalipun.

So, apakah caranya? Pertama sekali, right click link di bawah ini, dan click ‘bookmark this link’

.Automatic IIUM Schedule Formatter 

Kemudian bukak Course Registration Slip seperti yang ditunjukkan dalam post yang pertama. Tapi, daripada meng-copy-paste code javascript yang saya berikan, anda cuma perlu tekan link ‘Automatic IIUM Schedule Formatter’ di menu bookmark firefox. Kemudian, allow popup, dan akhirnya, jadilah jadual yang sudah di format.

Ok, perkara kedua yang saya letak ialah Styler. So, kalau kamu cuba pakai schedule formatter ini tadi, kamu akan perasan yang sekarang anda boleh ubah penampilan jadual anda mengikut citarasa anda. Ok, hampir mengikut cita rasa anda. Ok, mungkin anda belum boleh edit CSS lagi, saya akan cuba mengusahakannya.. Kode Styler itu sebenarnya datang daripada Styler dari YourAgregator, so, banyak hard work yang sudah dilakukan. Apa yang saya buat cuma ‘plug and do-some-modification and play’. Cuma bezanya upload hari ini berbandiang semalam ialah, semalam anda tak boleh save jadual anda. Sekarang boleh. Jadi bolehlah save ke pendrive dulu, baru print kat CC.

Perasan tak yang nama tu ada shadow?

Ok, so that’s it lah. Memang tak banyak perubahan pun, tapi dah tak ada masa nak buat macam mana kan? So bolehlah anda try Styler yang baru ni. Nanti akan datang saya buat Style Gallery pulak ok? So… See you soon! Bye! Assalamualaikum!

Categories
Projects

Automatic IIUM Schedule Formatter!

Hai! Assalamualaikum semua!

Harini saya nak memperkenalkan projek mini terbaru saya yang saya panggil

 Automatic IIUM Schedule Formatter!
Program ini sangat simple dan tujuannya sangat simple dan hasilnya juga sangat simple. Gambarajah simple dibawah ini cukup simple untuk menerangkan apa tujuan program yang simple ini dengan cara yang simple.
Ada paham? 
Ok, so mungkin tak cantik. Dari hitam putih ke hitam putih, Tapi yang pentingnya, asas kepada program ini sudah ada dan ini baru versi 1. Macam mana pulak dengan versi 2? Macam mana kalau saya masukkan Styler dari YourAgregator? Macam mana kalau saya sumbat sekali theme gallery? Macam mana kalau saya pasarkan kat group Creative Multimedia Club dan diorang submit theme diorang? Ha! nampak potensinya? 
Unfortunately, lusa saya dah balik UIA, minggu depan exam math, so tak ada banyak masa nak buat apa-apa. Tambahan lagi, saya tak ada notebook. Kalau nak bawak desktop pun, mungkin minggu ketiga. So… lama sikit lah ye.
Ok, so macam mana kamu nak gunakan time table nie?

Pertama, bukak IIUM Portal, login, pergi ke MyAcedemic, kemudian Course Registration Slip. Bukak slip yang dikehendaki, sampai macam screenshot yang pertama kat bawah nie.

Kedua nie, agak complex dan menakutkan. Copy setiap huruf code dibawah:Paste kat URL bar. Seriously, betul saya cakap nie. 
javascript: {var e=document.createElement('script');e.src = 'http://iiumschedule.appspot.com/static/scheduleformatter.js';e.type='text/javascript';e.addEventListener("load",function(){startscheduler()} );document.getElementsByTagName('head')[0].appendChild(e);}

Paste code tadi kat url bar. Nanti ada popup window, dan tada! Jumpalah time table tu. Save, print dan buatlah apa yang korang nak buat. 
Tada!

Horay! Teknik ini sudah diuji terhadap akaun CFS IIUM, saya tak taulah pulak dengan pelajar IIUM kat gombak/kuantan sana. Tapi kalau IIUM pakai sistem yang sama, patutnya boleh aje berfungsi.

Sesiapa yang terer komputer akan perasan yang saya dengan teknik ini, anda akan melakukan javascript injection terhadap page IIUM. Kenapa perlu begitu? Asalnya saya ingat nak save aje, pastu parse, tapi tak boleh. Nampaknya IIUM Portal ada sistem security yang kuat sikit, so kena ada sikit hacking.

Bagi yang tak faham bahasa komputer, senang cakap, kalau ada sapa-sapa suruh korang buat macam nie, dan sumber code itu meragukan, macam “Facebook Unlike button”, atau “Win an Ipad 2!”, JANGAN BUAT APA YANG DISURUH. Basically, ia menyuruh anda untuk menjalankan javascript dari sumber yang tak dikenali dan kemungkinan javascript tersebut mengandungi virus, dan akhirnya muncullah virus di Facebook.

Bagi sesiapa yang terer komputer dan berminat untuk mengetahui bagaimana program ini berfungsi, silalah lakukan ‘reverse engineer’ terhadap code tersebut yang mana tidak di ‘minified’ pun. Dan by the way, disebabkan pelbagai cross-doman scripting restriction, saya telah mengambil jalan mudah dengan menyimpan jadual anda di server terlebih dahulu. So, ya saya boleh tahu jadual anda kalau saya tahu nama anda dan saya berminat untuk mengetahuinya. Tapi jangan risau, nanti saya buat server tu auto delete record yang berumur lebih dari 1 jam ok?

So.. itu ajelah. Walaupun tak secantik mana, tapi ada potensi. So, selamat malam, good night, goodbye dan Assalamualaikum!
Categories
Projects

One Incompatible Upload

Assalamualaikum semua! Apa khabar. And good night to your all!

Ok, so today I have uploaded a (almost) completely incompatible version of YourAgregator. Version 1 is still there but it will never work, due to change in the Datastore. This is my last week of holiday and this sunday I will go back to CFS IIUM, for my ICT course. And because I don’t have a notebook and even more important, time, the development of YourAgregator may slow down to a halt. And yet, even thought I only have about three days left, I’ve uploaded a new version of YourAgregator that is largely incompatible with the previous one that I’ve purged the datastore, meaning, you have to reregister.

Ok, so whats the big deal about this upload? Well… actually, not much. The large incompatibility is due to the change in the name of most table and their property. And because GAE does not have ALTER TABLE, I’ve decided to just to delete the whole database and start from scratch. Not that people (other than me) use it right?

But there are some notable change in this release. The first major change is the use of Jinja2 template instead of Django. There are not much different between them except for faster rendering and more expressive language. And also because of that, some page may not render perfectly. If you found any of that, please email me at admin@youragregator.com

Another change is, i’ve added rss page, and member page to the agregator and some modification on the feed page (now the Post page). To view the rss page, on the feedroll, on any post, there should be a link of the title of the rss. Click the “>” next to it.      Ok, so it’s not so obvious, but hei! I’m not a designer. And it get the job done… in a way. Ok, so you click it and the magical AJAX sistem will change your current page to the rss page. What shown in the rss page depend on the data given from the blog. It should show the description (if give), the author, the title(the domain if not given), the submitter, and 10 list of recently posted post. Click one of the post to go to the post page (not the post blog) and click on the submitter name to go to the member page.

If you go to the member page, you will find a very hideously incomplete-looking page. The reason it is incomplete-looking, is because it is incomplete. The reason it is hideous, is because of me. This page will show you a large smile picture, a description and a link to show post submitted by that man. The large smile picture is suppose to be a profile picture. You can edit it by going to youragregator.com instead of it’s agregator and click on your username on the top right of the screen (next to the ‘logout’ button).

Now, the post page (previously the feed page). There are various changes in the post page. Notably, the ability to clone the blog post! But that’s not really what it does. In the feedroll, the blog description has a 500 character limit and only allow inline text element such as anchor, strike or bold. Previously, the post page use the same data as the feedroll. Now, the post page use different data with limit of 3000 characters and allow more element. So, the post page look much like the real post but without some formatting. The link to the real post is given at the bottom of the page. Plus, the agregator now allow tags in the post. On the post that contain tags, list of tags is shown at the bottom of the post page.

The feedroll also has several change. Firstly, the search function has been re-enabled. And because YourAgregator is running on free quota, and indexing takes a lot of database operation, the site can only handle about 6 to 8 blog submission per day. So, lets hope I can find a credit card somewhere, then we could turn on billing. Also, now the feedroll has the ability to filter by submitter, feed and tags. That allow me to put the tags link on the post page, and ‘view post’ hyperlink on the rss page. And also because of that, the index for the post table has increased and thus, increase the write operation required to add a feed and thus again, reducing the amount of feed submission available per day.

Another incompatible change in YourAgregator is the niceness system. Previously, a new post’s niceness is defaulted to the submitter’s niceness, and the submitter cannot nice his/her own post. Now, the post’s initial niceness is not defaulted to the member’s niceness, but to it’s rss feed’s niceness if it has one. Otherwise, the default niceness is the submitter’s niceness. This means a rss feed itself now has a niceness and it is defaulted to the submitter’s niceness. You can rate the rss feed at the rss page. The submitter can also rate his own post and rss submission. I’ve made the decision to allow it to allow the member to specify which post has more priority over another post. Previously a submitter cannot say which of his post has higher priority that another post.
Last but not least on the modest list of changes is the support for the PubSub protocol. The PubSub protocol, created by Google for Blogger has the ability to push new blog post to subscriber. In this case, the subscriber is YourAgregator and the new blog post is new blogger blog. In another word, when an rss is updated, the update is sent to YourAgregator immediately. Previously, YourAgregator need to periodically check for changes in the rss to know about new post, if any. Now, on certain RSS or Atom feed, notably blogs on Blogger, any new post will be sent to YourAgregator almost immediately after the blog owner publish it. This reduce YourAgregator’s need to check the blog and reduce the time need for the post to be indexed in YourAgregator.

And…. that pretty much concludes this update. And this will probably be the last update before my semester. Hopefully I may have some time to do some bugfix, but most probably nothing will change for the next 4 month. And hopefully, I can manage a visa card, and register for Amazon AWS, and all those index problem  will be increased but the capacity will surely increase. So that’s it, happy new year, goodbye and Assalamualaikum.