As published by sitepoint
http://www.sitepoint.com/best-php-framework-2015-sitepoint-survey-results/
As a programmer, I deal a lot with forms. Build the form, test the form, debug the form, test again, test test and test again.
It is still ok to fill up only 2 to 3 fields forms but it eats up your time if you have to fill up more than 10 fields everytime you want to test a form.
Further more if the form fields are all mandatory!
With the following tools you can just fill up the forms with dummy data or some pre-set data. It maybe useful for other purpose as well. Don’t know.
1. Form Filler
2. JunkFill
Some good sample codes from twitter
http://twitter.github.io/typeahead.js/examples
To manipulate image (e.g. resize, rotate, flip etc) could be hard since it is not done everyday. It is required sometimes on certain project.
I found this library really easy and helpful. Just one file and can ease your life. Take a look.
Update: Another one (open source) that looks easy to use. WideImage
This becoming my favorite image gallery now – fotorama.io. So easy to implement with plenty of customization that we can do.
If you don’t believe how easy it is, copy following source code, paste and save as an html file. Then open it and see what will happen.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <link href="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.3/fotorama.css" rel="stylesheet"> <script src="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.3/fotorama.js"></script> <div class="fotorama" data-width="100%" data-ratio="800/600" data-nav="thumbs" data-loop="true" data-allowfullscreen="true"> <img src="http://s.fotorama.io/1.jpg"> <img src="http://s.fotorama.io/2.jpg"> </div>
Alternatives:
To round following Bank Negara Malaysia (BNM) rules.
$value = xx.xx; $roundedvalue = number_format(round($value*20,0)/20,2,'.','');
This is useful for you to create a static page of most visited page on your dynamic website (especially those being displayed on front page, sidebars and footers)
<?php
$file = file_get_contents("http://yourserver.com/site/categories.php");
file_put_contents("categories.html", $file);
?>
Can have auto infinite scroll for blogspot. Make the reader to load new page when they reach bottom. Easy to install.
http://www.spiceupyourblog.com/2013/05/load-posts-infinite-scroll-on-blogger.html#.VSFowBOUdtI
When people share your page on facebook, you can set what image to be displayed together with your page description on facebook.
The code:
<meta property="og:image" content="http://yourdomain.com/path/to/image.jpg" />
References on FB
1. All result set
$query = $this->db->query("YOUR QUERY");
if ($query->num_rows() > 0)
{
foreach ($query->result() as $row)
{
echo $row->title;
echo $row->name;
echo $row->body;
}
}
2. Just one row
$query = $this->db->query("YOUR QUERY");
if ($query->num_rows() > 0)
{
$row = $query->row();
echo $row->title;
echo $row->name;
echo $row->body;
}