|
|
|
|
|
|
Powered byD's Bloggie
| Weblog Archive browse by category ... |
|
|
|
|
Site updates on long weekend - 7:38 pm
New [table] tag
Site Issue , Site Updates - DaRen
Today is a public holiday, the Queen's birthday. Spent most of yesterday and today's time to update my site. I added a [ table ] tag to my bbcode parser. This table tag is inspired by the table syntax used in Wiki. Wiki called it as 'pipe syntax'. See below :
[ Hide ] [ table]
{| class="weblogtable" style="margin: 1em auto 1em auto;"
|+ The table's caption
! Column heading 1 !! Column heading 2 !! Column heading 3
|-
! Row heading 1
| Cell 2 || style="font-size: 20px;" | Cell 3
|- style="color:#ff0000;"
! Row heading A
| Cell B
| Cell C
|}
[/table]
Will give you this result:
The table's caption
| Column heading 1 |
Column heading 2 |
Column heading 3 |
| Row heading 1 |
Cell 2 |
Cell 3 |
| Row heading A |
Cell B |
Cell C |
This is quite different from the existing tags. It's sort of half tag half markup style. Everything is enclosed inside the table tag, however the syntax is more to structured markup style. Line break is important, every line must start with a valid syntax. The syntax is almost 95% the same as Wiki has. Nested tables are allowed inside a table cell. Check out Wiki - Help:Table. To see the how I used the table tag, visit here and also here.
Added encoding checking in blog content. It will display a icon telling whether the content is pure Ascii, UTF-8 wellformed or just a malformed UTF-8 (might be other type of encoding). I also made a feature that allows public to see the raw structure of a blog entry. It will dump out what it's originally looks like before rendering is took place. Search the top-right of every blog entries for the icons.
Iñtërnâtiônàlizætiøn - 1:28 pm
Everything is put up for testing...
Site Issue , Site Updates , Unicode , Web Hosting - DaRen
Don't be surprised with all those chinese characters appearing all over the main page. I'm just performing a test to see how well my template engine can handle with multibyte characters.
The main content/layout will still be in Engish (well, technically speaking, ASCII). I'll probably use some chinese in some of the blog entries if needed.
Oh ya, Iñtërnâtiônàlizætiøn
The MySQL database dump seems to be working fine. However, in server-side, I haven't tried to restore the data from the dump file yet. I'll try it later or tonight since I have something else to do right now =)
Last edited: Sat 2006-06-10 @ 13:34 , by DaRen 3 time(s)
Unicode Testing - 10:21 am
Encoding used : UTF-8
Browser , Site Issue , Site Updates , Unicode - DaRen
Running Unicode test on server-side... If you see gibberish below that means your browser doesn't support the font... or just simply my code isn't working like what I expected...
English
You kidding me?
Chinese (Simplified)
花间一壶酒,独酌无相亲
举杯邀明月,对影成三人
月既不解饮,影徒随我身
暂伴月将影,行乐须及春
我歌月徘徊,我舞影零乱
醒时同交欢,醉后各分散
永结无情游,相期邈云汉
Chinese (Traditional)
子曰:「學而時習之,不亦說乎?有朋自遠方來,不亦樂乎?
人不知而不慍,不亦君子乎?」
有子曰:「其為人也孝弟,而好犯上者,鮮矣;
不好犯上,而好作亂者,未之有也。君子務本,本立而道生。
孝弟也者,其為仁之本與!」
Russian
По оживлённым берегам
Громады стройные теснятся
Дворцов и башен; корабли
Толпой со всех концов земли
К богатым пристаням стремятся;
Ancient Greek
Ἰοὺ ἰού· τὰ πάντʼ ἂν ἐξήκοι σαφῆ.
Ὦ φῶς, τελευταῖόν σε προσϐλέψαιμι νῦν,
ὅστις πέφασμαι φύς τʼ ἀφʼ ὧν οὐ χρῆν, ξὺν οἷς τʼ
οὐ χρῆν ὁμιλῶν, οὕς τέ μʼ οὐκ ἔδει κτανών.
Sanskrit (should be right-aligned)
पशुपतिरपि तान्यहानि कृच्छ्राद्
अगमयदद्रिसुतासमागमोत्कः ।
कमपरमवशं न विप्रकुर्युर्
विभुमपि तं यदमी स्पृशन्ति भावाः ॥
Tamil
ஸ்றீனிவாஸ ராமானுஜன் ஐயங்கார
Czech
Dejte mi libru kávy Java, dvě libry Rio, šest liber kouskového cukru a paklíček cikorie.
Korean
비겁한 사람은 죽기 전에도 여러번 죽는다.
그러나 용감한 사람은 한번 밖에 죽지 않는다.
Japanese
コンビニエンスストア全国大手のファミリーマートの道内1号店が7月7日に札幌市東区本町1で開店することが9日、明らかになった。これによりファミリーマートは全都道府県出店を達成し、7月14日には同市清田区美しが丘4に2号店も開く。
ps: The font works fine in my Opera 8.50 browser. Firefox 1.0.7 is rendering the text a bit smaller making some of the characters look weird. Internet Explorer 6 is displaying bigger text size, but the Ancient Greek part is partially gibberish. In other words, Opera still rules ! ^^
Site accessibility updates - 11:40 pm
The <link>
Site Issue , Site Updates , Standards - DaRen
Some updates to my site. I added a horizontal navigation menu on the top. Added additional <link> tags in <head> so that some browser can pick it up and display it in navigation bar for accessibility. Examples of them are 'Home', 'Help', 'Author', 'First', 'Previous', 'Next', 'Last'.
Also added an "About" page to my site. Read the about page.
ahkuan.com OWNED! - 9:32 pm
ahkuan.hollosite.com is history
Site Issue , Site Updates - DaRen
The old site is "officially" closed. Everything is moved to this new server. Took me a month to make all these working which I didn't expect. Besides moving the site, I redesign the site logo, minor cosmetic changes and changed lots of codes that makes my script more versatile to adapt to the new environment. That includes altering tables in database.
However, the major update will be the opening of Public Upload section ! At first I'm planning to make it as a private upload section for myself to store some temporary files other things but since I got plenty of space on this server, might as well I open it to the public. So if you need a place to store files, you're welcome to use the service as long as you agree with the disclaimer.
The public upload service is powered by D's File Manager. It's a powerful but simple "module" to use. My web-based file manager and weblog file uploads rely on it. Let me know if you found any security holes for example like, manipulate a file that's outside the directory scope =) I would be very happy to know that.
Here's the public upload section, or you can access it through the left navigation panel on my site. Maximum upload size is unknow but it should be 10Mb per upload.
New address !! - 5:50 pm
http://ahkuan.com <--- hot from oven
Site Issue , Site Updates , Web Hosting - DaRen
Woooohooooo ~~
I'm moving... same as my weblog... Checkout
Finally I got a domain name that "belongs" to me. Well, I can't really owned it, I have to rent it for 1 year =) I'll try to get it working on the weekends, but apparently I won't have time on the weekend as I need to clean up the mess of my house.
This is the first time I have more control over my site... got alot of things to learn ahead.. Oh baby, this rocks my world !!!
ps: If you ever wonder where is the www after http:// .. I can tell you that www is history
Last edited: Sun 2006-03-26 @ 12:04 , by DaRen 1 time(s)
D's Bloggie v3.0 is out ! - 11:56 am
It now supports description =)
Site Issue , Site Updates - DaRen
I keep on making updates/improvement to ease my blog posting and make it as a pleasure for me to post. Finally, the v3.0 of D's Bloggie is out !
What's new in v3.0
- ! Rewrote the whole core part for the editor that uses Javascript. Compatible with modern Opera/IE/Gecko/Mozilla based browser.
- ! Redesign the posting interface
- + BBTags can now be inserted at cursor position instead of appending them to the end
- + Supports inserting BBTags to the beginning/end of a selection/highlighted text.
- + Packed all the BBTags button in a toolbar-like form with the ability to show/hide extra buttons
- + Added "Description" and "Allow Comments"
- + With "Allow Comments" option, specific blog entry can now be locked and not allowing public comment posting
- + Changed the way how sticky/hidden attributes are handled. They now fall under "Post status" with (Publish, Sticky, Draft, Hidden)
- + Added option to change the timestamp for an existing post
- + Added the BBCode manual and example
- - New attribute for [ img ] tag. You can control width and height of an image.
- - New [ center ] tag
- - New [ rainbow ] tag
- - Dropped [ quote2 ] tag and replace it with [ box ]
- - Minor cosmetic changes to the rendering result
- - Fixed hell lots of minor bugs
Read more on the changelog.
Screen Shots:
New D's Bloggie coming out soon - 11:14 pm
Site Issue , Site Updates - DaRen
Spent most of the past few days weekend's time to update my site. Currently focusing on the blog posting area, both interface and coding. Also added/modified some structure of databse. I consider this as a major update. Can't wait to finish up the work but apparently I need more time on it. Hopefully I can finish it on tomorrow... well don't think I can make it.. maybe another 2 or 3 days before I can upload a fresh copy to the server =)
Incorrect weather temperature - 1:02 am
Bug , Site Issue , Site Updates - DaRen
Fixed the incorrect weather info on my page. It shows -18 degree Celcius whenever the weather data is not available (-18 because of the formula used to convert Fahrenheit to Celcius). It now shows N/A for info if there are no weather data from Weather.com.
Check, check and more checking before you start to process an input.
New design approach - 2:54 am
Coding , PHP , Site Issue , Site Updates , Standards - DaRen
I'm updating my site again. I've been working on the core functions / classes. Yes, the CORE part... The major ones are like user authentication and database connection. I've unified all database access under one global variable, avoiding multiple DB connection objects created locally (class/function scope). The good thing about ? it saves memory and I can know how many SQL queries are made to construct a page. Scroll down to the very bottom and you can see how like "N queries made". Quite surprising though... some pages used like 35 SQL queries... o.O omg... gotna refine them later...
My current approach [ Hide ] -------site_management.php---------------
// The class of "everything", contains db connection
// and other authentication
class site_management
{
var $DB_OBJECT;
function site_management()
{
// Let's say MYSQL_DB is your class that contains
// all functions to access/manipulate the database
$this->DB_OBJECT = new MYSQL_DB();
}
}
-------foo.php--------------------
// Some class that requires access to database
class foo
{
// Internal database connection object
var $_db_object;
function foo()
{
// If global variable $SITE->DB_OBJECT exists, make reference
// to it otherwise instantiate a new copy locally
if (isset($GLOBALS['SITE']) && $GLOBALS['SITE']->DB_OBJECT)
$this->_db_object =& $GLOBALS['SITE']->DB_OBJECT;
else
$this->_db_object = new MYSQL_DB();
}
function bar()
{
// You need to perform sql query here
$this->_db_object->query($sql); // for example
// ...
}
}
------test.php-------------------
// The above two class is located in different files
// and below is also in a seperate script file
<?php
$SITE = new site_management();
$foo_obj = new foo();
$foo_obj->bar();
?>
My old way [ Hide ] -------foo.php--------------------
// Some class that requires access to database
class foo
{
// Internal database connection object
var $_db_object;
function foo()
{
// Instantiate a new copy locally
$this->_db_object = new MYSQL_DB();
}
}
Let me know what you think about this. You can also leave me a message here.
Read more about referencing global variable:
http://www.php.net/manual/en/language.references.whatdo.php
http://www.obdev.at/developers/articles/00002.html
In authentication part I removed ALL spaghetti-style-redirection when transfering a user through a login/logout. In short, no more hidden values inside <form> to track user, session is used instead. Clean code and it works! Hopefully things will work fine... even though I'm extremely carefully when touching the core part, because almost everything are built on top of it.
You should also have notice the "N visitor(s) online now" thing on the left navigation menu. Although most of the time there is only 1 visitor, me myself  Talking about the navigation menu, I'm adding options to show/hide the menu with javascript. See that red button with a 'X' ? That's what I'm talking about.
Others updates are misc and minor updates in template/admin control panel.
|
|
|
|
|