10 October 2009
Portfolio: Alsafe
08 October 2009
Using output buffering
I prefer to use output buffering. It's useful if you have a page which have a lot of dynamic content that needs to be processed or rendered. It prevents that the page loads in parts. It will allow that the output is sent all at once to the user's browser.
I start and end the buffering at the beginning and end of my layout script.
To start put ob_start() at the beginning. This function will turn output buffering on. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer.
To end put ob_end_flush() at the end of the layout script. This function will send the contents of the topmost output buffer (if any) and turn this output buffer off.
There is also other function regarding output buffering available:
- ob_get_contents() - Return the contents of the output buffer
- ob_get_flush() - Flush the output buffer, return it as a string and turn off output buffering
- ob_flush() - Flush (send) the output buffer
- ob_end_clean() - Clean (erase) the output buffer and turn off output buffering
You can also gzip the output of the buffer. For that you have to call ob_start('ob_gzhandler'). But that should generate a warning as content is already being gzipped normally. To use this you have to turn off output compression in the php settings. Not recommended.
01 September 2009
jFlot jquery graphing
24 July 2009
Portfolio: Ripsurance website
I've made a new website for myself and everyone that wants to use it — Ripsurance. It is a very cool idea about how you can save money on household insurance. I still need to implement graphs, etc. Currently it's not getting any hits, but I'm not actively improving it at the moment either.
Anyway, I thought the spiral design was cool — especially since I'm not a designer.
Take care
Tjorriemorrie
23 July 2009
Text-decoration for CSS
CSS Text-decoration is not often used in content. My, myself and I do not use it much. At most I'll underline links and such. Never use blink, nuf said.
Here's the spec:
'text-decoration'
Value: none | [ underline || overline || line-through || blink ] |
inherit
Initial: none
Applies to: all elements
Inherited: no (see prose)
Percentages: N/A
Media: visual
Computed value: as specified
This property describes decorations that are added to the text of an element using the
element's color. When specified on an inline element, it affects all the boxes generated
by that element; for all other elements, the decorations are propagated to an anonymous
inline box that wraps all the in-flow inline children of the element, and to any block-
level in-flow descendants. It is not, however, further propagated to floating and
absolutely positioned descendants, nor to the contents of 'inline-table' and 'inline-
block' descendants.
Underlines, overlines, and line-throughs are applied only to text (including white space,
letter spacing, and word spacing): margins, borders, and padding are skipped. If an
element contains no text, user agents must refrain from rendering these text decorations
on the element. For example, images will not be underlined.
The 'text-decoration' property on descendant elements cannot have any effect on the
decoration of the ancestor. In determining the position of and thickness of text
decoration lines, user agents may consider the font sizes of and dominant baselines of
descendants, but must use the same baseline and thickness on each line. Relatively
positioning a descendant moves all text decorations affecting it along with the
descendant's text; it does not affect calculation of the decoration's initial position on
that line.
Values have the following meanings:
none
Produces no text decoration.
underline
Each line of text is underlined.
overline
Each line of text has a line above it.
line-through
Each line of text has a line through the middle.
blink
Text blinks (alternates between visible and invisible)
There's not much more to say. All I can think of is to use line-through instead of the 'del' tag.
Take care
Tjorriemorrie
