Monthly Archiv: November, 2016

PHP Post-it Notes (New)

Package:
PHP Post-it Notes
Summary:
Generate images with text using vectorial fonts
Groups:
Graphics, PHP 5, Text processing, XML
Author:
Bruno Henrique Ferreira de Oliveira
Description:
This package can generate images with text using vectorial fonts...

Read more at http://www.phpclasses.org/package/10023-PHP-Generate-images-with-text-using-vectorial-fonts.html

WordPress 4.7 Beta 4

WordPress 4.7 Beta 4 is now available!

This software is still in development, so we don’t recommend you run it on a production site. Consider setting up a test site just to play with the new version. To test WordPress 4.7, try the WordPress Beta Tester plugin (you’ll want “bleeding edge nightlies”). Or you can download the beta here (zip).

For more information on what’s new in 4.7, check out the Beta 1, Beta 2, and Beta 3 blog posts, along with in-depth developer guides on make/core. We’ve made about 60 changes in the last few days for beta 4, including tweaks to Twenty Seventeen, custom CSS, and the REST API content endpoints.

Do you speak a language other than English? Help us translate WordPress into more than 100 languages!

If you think you’ve found a bug, you can post to the Alpha/Beta area in the support forums. We’d love to hear from you! If you’re comfortable writing a reproducible bug report, file one on WordPress Trac, where you can also find a list of known bugs.

We are almost there
Please test your plugins and themes
RC coming soon

WordCamp US 2017-2018 in Nashville

The title says it all. We had some great applications for cities to host WordCamp US after we finish up in Philadelphia this year, and the city chosen for 2017-2018 is Nashville, Tennessee.

Based on the other great applications we got I’m also excited about the pipeline of communities that could host it in future years as WordCamp US travels across the United States and gives us an opportunity to learn and love a new city, as we have with Philadelphia.

By the way, if you haven’t yet, now is a great time to take the Annual WordPress Survey and ask your friends to as well.

Photo Credit.

Bootstrap 4: Regular Grid VS Flexbox Grid

bootstrap-4-grid-comparison-1

Bootstrap 4 introduced some changes to the grid system we are all so familiar with from version 3. These include a new XL grid tier, alteration to some of the modifier classes, and a brand new flexbox version of the said grid system.

The regular and flexbox grid modes are not compatible, and everyone will have to choose which one to use in their projects. To help you with the decision, in this article we will look at all the differences between the two systems. For easier comparison, we’ve also prepared several grid examples implemented in both modes.

1. Installation

The most common way to include Bootstrap in a project is via CDN or a local source file. There are separate precompiled versions for flex and non-flex:

<!-- Original Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css" rel="stylesheet" >

<!-- Bootsrap With Flexbox Grid -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap-flex.min.css" rel="stylesheet" >

For those of you who compile their own Bootstrap, you will need to turn on $enable-flex in the main Sass customization file.

_variables.scss

$enable-flex = true;

When it comes to file size, the flexbox version is slightly bigger due to the extra rules and vendor prefixes that are required. However, the margin is quite thin (119 KB compared to 105 KB) and shouldn’t matter in most use cases.

2. Basic Grid

By now everyone knows how the Bootstrap grid works. We’ve got rows separated into 12 equal pieces, and columns that go inside the rows. Each column can take anywhere from 1 to 12 spaces:

<div class="row">
   <div class="col-xs-2">.col-xs-2</div>
   <div class="col-xs-4">.col-xs-4</div>
   <div class="col-xs-6">.col-xs-6</div>
</div>

The new flexbox mode provides us with an auto-layout option where columns can be left without a specified size.

<div class="row">
    <div class="col-xs">.col-xs</div>
    <div class="col-xs">.col-xs</div>
    <div class="col-xs">.col-xs</div>
</div>

Sizeless columns in the flexbox grid will share the available space equally, always taking up the entire row. If we want a column to be bigger or smaller, we can still do that with a .col-xs-size class.

To help you better visualize the two systems, we’ve prepared live demos of both flex and non-flex grids. You can check them out below:

Basic Flex Grid

Basic Flex Grid

3. Column Wrapping

When the sum of all columns in a row is over 12, the first extra column will move to the next line. This is knows as column wrapping and works the same way in both regular and flex-bootstrap.

<div class="row">
   <div class="col-xs-6">.col-xs-6</div>
   <div class="col-xs-6">.col-xs-6</div>
   <div class="col-xs-3">.col-xs-3, This column will move to the next line.</div>
</div>

The only thing to note here is that when using flex auto-layout, a sizeless column that took up only a couple of spaces, can take up the entire row once it wraps.

Regular Column Wrapping

Regular Column Wrapping

4. Responsive Grid

As we mentioned in the intro, Bootstrap 4 has a new XL grid tier on top of the old ones. Now the grid media queries look like this:

  • Extra small (xs) – below 576px
  • Small (sm) – between 576px and 768px
  • Medium (md) – between 768px and 992px
  • Large (lg) – between 992px and 1200px
  • Extra Large (xl) – over 1200px

Beside the XL tier, there aren’t any other major changes to responsiveness. The regular and flex systems work the same way.

Responsive Flex Grid

Responsive Flex Grid

5. Column Height

The old grid system was built on floated elements and because of that every column has a different height, depending on the content it holds.

Column Height In Regular Grid

Column Height In Regular Grid

In flexbox layouts all cells in a row are aligned to be as tall as the column with most content.

Column Height In Flex Grid

Column Height In Flex Grid

6. Horizontal Alignment

In non-flex Bootstrap positioning columns horizontally is done via an offset system. Offsets work like empty columns and allow us to move elements to the right (e.g an .offset-xs-3 moves the column 3 spaces to the right). This can be a little annoying as we need to manually adjust the amount of spaces needed.

<div class="row">
    <div class="col-xs-6 offset-xs-3">This column is now centered.</div>
</div>

Thanks to the justify-content property, horizontal positioning in flex-strap is as easy as adding the correct class.

<div class="row flex-items-xs-center">
    <div class="col-xs-6">All columns in that row will be automatically centered.</div>
</div>

Also, if you want to use offsets you can do that too!

Horizontal Alignment In Flex Grid

Horizontal Alignment In Flex Grid

7. Vertical Alignment

There are no options for vertical alignment in the regular Bootstrap grid. The only way to do any sort of vertical positioning is using custom CSS and it is often messy.

Flexbox, on the other hand, is great at layout alignment and gives us not one, but two ways to vertically position columns:

Vertically align the whole row:

<div class="row flex-items-xs-middle">
 	<div class="col-xs"> Middle </div>
</div>  
<div class="row flex-items-xs-bottom">
	<div class="col-xs"> Bottom </div>
</div>
<div class="row flex-items-xs-top">
	<div class="col-xs"> Top </div>
</div>

Align individual columns within the row:

<div class="row">
    <div class="col-xs flex-xs-middle"> Middle </div>
    <div class="col-xs flex-xs-bottom"> Bottom </div>
    <div class="col-xs flex-xs-top"> Top </div>
</div>

Vertical Alignment In Flex Grid

Vertical Alignment In Flex Grid

8. Reordering Columns

With the regular grid system, if we want to swap around the order of columns we need to use push and pull. Although it’s not the best designed solution, it gets the job done.

<div class="row">
    <div class="col-xs-4 push-md-8"> On MD screens this column will move 8 spaces to the right. </div>
    <div class="col-xs-8 pull-md-4"> On MD screens this column will move 4 spaces to the left.</div>
</div>

Anyone who has used flexbox before knows that it has a built-in order property. The way Bootstrap devs have implemented it is via three ordering classes:

  • .flex-xs-first – Displayed first.
  • .flex-xs-last – Displayed last.
  • .flex-xs-unordered – Displayed between first and last.

No manual calculations are required. If you need to order more than 3 columns (which rarely happens) you can use push&pull or the order property via CSS.

Reorderin Flex Columns

Reordering Flex Columns

Conclusion

Looking back at the points covered in the article, its pretty clear that the flexbox mode is the more advanced and versatile grid system. After all, it includes everything from the regular grid with some new flex-only features on top. The only real drawback of going full bootstrap-flex is the lack of support for IE9.

This wraps up our comparison of the new Bootstrap 4 grid systems. Feel free to bookmark the demo page for quick future reference. We hope we’ve been helpful! Happy coding :)

Jaxon for Symfony

Package:
Jaxon for Symfony
Summary:
Jaxon integration for the Symfony framework
Groups:
AJAX, Language, Libraries, PHP 5, Traits
Author:
Thierry Feuzeu
Description:
This package integrates the Jaxon library with the Symfony framework, allowing to make AJAX calls to PHP classes...

Read more at http://www.phpclasses.org/package/9999-PHP-Jaxon-integration-for-the-Symfony-framework.html#2016-11-14-11:26:16

PHP MySQLi Report Generator class

report.jpg
Package:
PHP MySQLi Report Generator class
Summary:
Generate HTML reports from queries using MySQLi
Groups:
Databases, HTML, PHP 5
Author:
Rajesh Kakkad
Description:
This class can generate HTML reports from queries using MySQLi...

Read more at http://www.phpclasses.org/package/9996-PHP-Generate-HTML-reports-from-queries-using-MySQLi.html#2016-11-13-05:23:44
Powered by Gewgley