SIDEBAR
»
S
I
D
E
B
A
R
«
[ PHP ] Reading external text file and put the content into the text field.
十月 5th, 2011 by Becky

<?PHP
$file_handle = fopen("TEST.txt", "r");
while (!feof($file_handle) ) {
    $line_of_text = fgets($file_handle);
    $parts[] = explode(';', $line_of_text);
}

fclose($file_handle);

?>
--------------------------------------------------------
The content in the TEST.txt is
13;26;50
--------------------------------------------------------
So the output will be
13
26
50
Ok, now we got the values from the file, but how to put these into the text field of form?
<form action="" method="get" id="form-1">
<table>
<tr>
<td>Value-1</td>
<td width="5"></td>
<td><input name="text-1" type="text" value="<?php echo $parts[0][0]; ?>" readonly="true" /></td>
</tr>

<tr>
<td>Value-2</td>
<td width="5"></td>
<td><input name="text-2" type="text" value="<?php echo $parts[0][1]; ?>" readonly="true" /></td>
</tr>

<tr>
<td>Value-3</td>
<td width="5"></td>
<td><input name="text-3" type="text" value="<?php echo $parts[0][2]; ?>" readonly="true" /></td>
</tr>
</table>
</form>
[HTML] HTML5 chart
九月 1st, 2011 by Becky

http://joshduck.com/periodic-table.html

[ Photoshop ] Quality Brushes
九月 8th, 2010 by Becky

QBrushes  http://qbrushes.net/

Today, i found this site occasionally, it’s so cool … lots of brushes, all for free.

Enjoy !

[ Google ] Font Directory
五月 24th, 2010 by Becky

—————————————————————————————————————————————————-

It’s really a good news for web-designer and the easiest way I have never seen to apply beautiful fonts for web site.

Try it now!      http://code.google.com/webfonts

[ CSS ] Image Replacement
五月 11th, 2010 by Becky

//* Reference from http://www.cssplay.co.uk/menu/ir.html

There are lots of ways to make image replacement function,

In this article, i would like to share a solution which uses totally CSS technology … very simple but useful!

<style type="text/css">
h3.ir {width:350px; height:40px; position:relative; padding:0; margin:0 auto 3em auto;}
h3.ir em {display:block; width:350px; height:40px; background:url(../images/ir.gif); position:absolute; top:0; left:0;}
h3.ir a {cursor:pointer;}
#holder {margin-bottom:2em;}

h3.ir a:hover {background:#fff;}
h3.ir a:hover em {background:url(../images/ir2.gif);}
</style>

*Remark: Adjust the dimension and the source link according to your image. It should work vell well!
--------------------------------------------------
HTML
--------------------------------------------------
<div id="holder">
<h3 class="ir"><em title="Image Replacement"></em>Image Replacement</h3>
<h3 class="ir"><a href="#"><em title="Image Replacement"></em>Image Replacement</a></h3>
</div>
[ PhotoShop ] Convert JPG to Vector file
三月 10th, 2010 by Becky

There are some solutions to convert jpg file to vector file, for instance, using corel draw, adobe illustrator or adobe photoshop…

For me,  I’m much familiar with photoshop, so PS would be my first choice. ^^

Here is a very simple but useful tut :

http://www.bittbox.com/illustrator/take-vector-paths-from-photoshop-into-illustrator

what if  you have an jpg image needed to convert to vector paths?

1. Open the image by photoshop

2. Make selection

3. Remove the other objects you don’t need in the picture.

4. right-click in the selection area, than choose "make work path"

5. Export to illustrator : File > export > paths to illustrator, than you will get another new illustrator file.

6. Open the illustrator file you just got on last step, you will see a blank page, don’t worry, it does has the paths, just select all things on the page,

you will find them out. Because those paths have no color. The final step is to paint the paths by the color tools in illustrator.

There you go… we have a vector image as same as jpg image.

[ Mac ] TunesTEXT – A Great Lyric Searcher Widget
二月 24th, 2010 by Becky

When you’re listening the music, and suddenly want to know the lyric …. but lazy to google it?

There is a pretty convenient widget — TunesTEXT

This is a Dashboard Widget displays lyrics of the song currently playing in iTunes.

If you don’t have lyrics data, TunesTEXT searches online lyrics databases and download lyrics automatically. Requires Mac OS X 10.4 or later. (Freeware).

Please visit its offical site to have it! ^^

http://www.cyanworks.net/dboardTunesTEXT.html

[ Joomla ] Error with installing a component
二月 23rd, 2010 by Becky

Since I use Joomla, sometimes I encounter an annoying problem — fail to install a component :

the install page turns out to a blank page and then no more response.

Here is a solution, I believe that it can slove most errors of installing a component: Modify php.ini

1. Find out your php.ini

2.  Change two values of it

a. Increase memory_limit at least to 32M;

b. Increase max_time_out to 300

3. Save your file.

If this solution still doesn’t work, you can set the values in administrator/index.php

1. Adding the following script to index.php :
set_time_limit(300);
ini_set("memory_limit", "32M");

2. Save the file.

[ Mac ] The Secret Screen Capture Shortcut
二月 12th, 2010 by Becky

Command-Shift-3 shortcut for taking a screen capture of your entire screen,

Command-Shift-4, which gives you a crosshair cursor so you can choose which area of the screen you want to capture.

Control-Command-Shift-3 (or 4), which, instead of creating a file on your desktop, copies the capture into yourClipboard memory, so you can paste it where you want.

[ Joomla ] Script Conflict — Light Box
二月 12th, 2010 by Becky

For a joomla web site desinger, I believe that YooTools is a very useful tools for a site.

Bue when I use Yoo effect (the one plugin of YooTools), it seems there are some javascript conflicts between my

accordion menu and its light box effect.The light box donesn’t work at all, just turns out to a new page with my linked file.

I found out another solution to figure it out … Shadowbox.js It solves all my problem magically … don’t have to change any code or somethng …. just remember to link the relative files in index.php of your template.

Now the light box works like a charm!!

»  Substance:WordPress   »  Style:Ahren Ahimsa