Thursday, June 11, 2015

Multia

Multia has over 10 years of experience in Design, Technology and Marketing. We take pride in delivering Intelligent Designs and Engaging Experiences for clients all over the World.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

A Simple Gulp’y Workflow For Sass

I have recently been in charge of optimizing the Sass side of quite a big Rails project, and one of most important things to do was to improve the compilation time. Because of the Sass architecture in place and the fact that Ruby Sass (through the Rails asset pipeline in this case) tends to be slow when dealing with a huge number of files, it could take up to 40 seconds to compile the stylesheets. Talk about a fast development process. :)

My idea was to move away from the asset pipeline and embrace the speed of LibSass. To make things easier I decided to go with a simple Gulp workflow. It was the first time I would be using Gulp, and I must say it was quite an enjoyable experience (which was not the case for Grunt as far as I am concerned).

In this short article, let's just have a quick tour on how to set up a Gulp'y workflow to work with Sass. Here is what we will include:

  • Unsurprisingly, Sass compilation with LibSass
  • Generating sourcemaps for easier debugging
  • Prefixing CSS with Autoprefixer
  • Generating Sass documentation with SassDoc

Continue reading %A Simple Gulp’y Workflow For Sass%


by Hugo Giraudel via SitePoint

What’s New in Rails 5

Rails 5 is right around the corner (currently targeting Fall 2015) and there are some exciting features coming up. If you are running a Rails shop, you need to prepare your apps for this major release.

Don't worry. As always, we at Sitepoint will guide you throughout the migration process when the release date approaches. For now, let's catch you up on what's coming and how it will improve your development process.

Major Improvements

There are some amazing announcements that will fundamentally shift how we work with Rails. New features like Action Cable and improved Turbolinks that can instantly improve our web development workflow. Let's look at each of them in detail.

Continue reading %What’s New in Rails 5%


by Vasu K via SitePoint

ECMAScript 6 Power Tutorial: Class and Inheritance

Retro Rockets and IP Lawyers

I've designed a lot of book covers for SitePoint – mostly without incident – but we did have one uncomfortable moment back in 2008. Tasked with designing the cover for a new PHP book, I decided that a clutch of shiny, colored rockets - red, green and blue - might be a nice look. I trawled the big, reputable stock photography sites and eventually purchased a 3D render of a red-chequered rocket (similar to the one above). A little Photoshop magic and I had added green and blue rockets to the composition, and voila!, we had a book nice cover. End of story – or so we thought. About 10 months later we received a letter from a legal firm representing the Tintin licensing rights empire claiming financial damages from infringement of their product. This came as somewhat of a shock to us as: a). Growing up with little awareness of TinTin, the rocket was just a 'generic rocket' to us. In fact, only two of the original 24 Tintin books used the rocket, so you could easily have read some Tintin without ever coming across the rocket. b). We'd purchased the image from one of the top biggest stock sites on the planet (no names, but you know them). The rocket image and any image like it had since disappeared from all stock image sites (presumably after similar letters). At the time we sought legal advice and eventually came to an agreement, removing the image from subsequent books.

Meet Moulinsart SA

After a little research it turned out that Moulinsart SA, the Belgium-based company that controls the Tintin licensing rights, are famous for their fierce pursuit of anyone they believe to be infringing the TinTin IP. Over the years this has included many Tintin fan clubs, websites and zines which, and this has made the company particularly unpopular with many of Tintin's biggest fans. But as they say, discretion is the better part of valour, so Moulinsart often get their way.

Continue reading %Retro Rockets and IP Lawyers%


by Alex Walker via SitePoint

Building a Product CSV Export Tool in OpenCart

The Tuts+ Guide to Template Tags: First Batch

In the first part of the series, we had a look at what template tags are, where they can be found, how they work, and how to use them.

In this second part, we're going to go through the first batch of the almost 200 template tags. Throughout the tutorial, we'll see template tags about post data: titles, dates, contents, and other meta data.

Getting & Displaying the Post Content: get_the_content() & the_content()

They might be the most popular template tags of all time: These template tags return or echo the post content.

Parameters

Both template tags accept two parameters:

  • $more_link_text (optional—string):
    Text to replace the default "(more...)" text.
    (Default: "(more…)")
  • $strip_teaser (optional—boolean):
    Strip the teaser text.
    (Default: FALSE)

A note on the "teaser text": Did you know that there's a tag, <!--noteaser-->, to make the content before <!--more--> a "teaser text" and not show that part in the single post page even if $strip_teaser is set to FALSE? I certainly did not! It's not completely unknown, though—here's a post from 2009.

Usage

Getting & Displaying the Post Content for Feeds: get_the_content_feed() & the_content_feed()

These template tags get and output the content for feeds.

Parameters

Both template tags accept only one parameter:

  • $feed_type (optional—string):
    Type of the feed.
    (Default: Default feed type)

Usage

Getting & Displaying the Excerpt of the Post: get_the_excerpt() & the_excerpt()

These template tags fetch and display the excerpt of the post.

Parameters

These template tags don't accept any parameters.

Usage

Displaying the Excerpt of the Post for Feeds: the_excerpt_rss()

This template tag makes the post excerpt ready for feeds and outputs it.

Parameters

This template tag doesn't accept any parameters.

Usage

Getting & Displaying the Post Title: get_the_title() & the_title()

These template tags let you return or echo the title of your posts.

Parameters

get_the_title() accepts three parameters:

  • $post_ID (optional—integer or object):
    The ID of the post.
    (Default: Current post)

And the_title() accepts three parameters:

  • $before (optional—string):
    The text or HTML code to display before the output.
    (Default: Empty)
  • $after (optional—string):
    The text or HTML code to display after the output.
    (Default: Empty)
  • $echo (optional—boolean):
    Whether echo (TRUE) or return (FALSE) the tag.
    (Default: TRUE)

Usage

Getting & Displaying the "Escaped" Post Title: the_title_attribute()

This template tag takes your post titles and makes them ready to be used in HTML attribute values. See the example for further explanation.

Parameters

This template tag accepts only one parameter:

  • $args (optional—array):
    An array of the following arguments:
    • 'before' (string): HTML code to add before the output.
      (Default: Empty)
    • 'after' (string): HTML code to add after the output.
      (Default: Empty)
    • 'echo' (boolean): Whether to echo the template tag or not.
      (Default: TRUE)
    • 'post' (object): Current post object to get the title from.
      (Default: 0)

Usage

Let's take this title as an example:

Bill & Melinda Gates Spend Billions on Charity, Say "We Did???"

The title has two quotes and one ampersand that will mess up your HTML code if used inside an HTML attribute, because attributes are wrapped with quotes, too. That's where the_title_attribute() comes in handy:

Now the link's title attribute looks like this:

Bill &amp; Melinda Gates Spend Billions into Charity, Say &quot;We Did???&quot;

And like this, it won't mess up the HTML with unescaped quotes and ampersands.

Displaying the Post Title for Feeds: the_title_rss()

This template tag gets your title, makes it ready for feeds, and displays it.

Parameters

This template tag doesn't accept any parameters.

Usage

Getting & Displaying the Date of the Post: get_the_date() & the_date()

These template tags fetch and echo the date of the post.

Parameters

get_the_date() accepts two parameters:

  • $date_format (optional—string):
    The format of the date.
    (Default: Date format set in the General Options page)
  • $post_ID (optional—integer or object):
    The ID of the post.
    (Default: Current post)

And the_date() accepts four parameters:

  • $date_format (optional—string):
    The format of the date.
    (Default: Date format set in the General Options page)
  • $before (optional—string):
    The text or HTML code to display before the output.
    (Default: Empty)
  • $after (optional—string):
    The text or HTML code to display after the output.
    (Default: Empty)
  • $echo (optional—boolean):
    Whether echo (TRUE) or return (FALSE) the tag.
    (Default: TRUE)

Usage

Getting & Displaying the Date of the Post in ISO 8601 Format: the_date_xml()

These template tags return and display the date of a post in ISO 8601 format.

Parameters

This template tag doesn't accept any parameters.

Usage

Getting & Displaying the Time of the Post: get_the_time() & the_time()

These template tags return or display the time of the post.

Parameters

get_the_time() accepts two parameters:

  • $time_format (optional—string):
    The format of the time.
    (Default: Time format set in the General Options page)
  • $post_ID (optional—integer or object):
    The ID of the post.
    (Default: Current post)

And the_time() accepts only one parameter:

  • $time_format (optional—string):
    The format of the time.
    (Default: Time format set in the General Options page)

Usage

Getting & Displaying the Author's Name: get_the_author() & the_author()

These template tags get or display the name of the author of the post.

Parameters

These template tags don't accept any parameters.

Usage

Displaying All the Meta Data of the Post: the_meta()

This template tag lists all the meta data of the post with an unordered list.

Parameters

This template tag doesn't accept any parameters.

Usage

Getting & Displaying the Modification Date of the Post: get_the_modified_date() & the_modified_date()

These template tags get and echo the last modification date of the post.

Parameters

get_the_modified_date() accepts only one parameter:

  • $date_format (optional—string):
    The format of the date.
    (Default: Date format set in the General Options page)

And the_modified_date() accepts four parameters:

  • $date_format (optional—string):
    The format of the date.
    (Default: Date format set in the General Options page)
  • $before (optional—string):
    The text or HTML code to display before the output.
    (Default: Empty)
  • $after (optional—string):
    The text or HTML code to display after the output.
    (Default: Empty)
  • $echo (optional—boolean):
    Whether echo (TRUE) or return (FALSE) the tag.
    (Default: TRUE)

Usage

Getting & Displaying the Modification Time of the Post: get_the_modified_time() & the_modified_time()

These template tags fetch and output the modification time of the post.

Parameters

Both template tags accept only one parameter:

  • $time_format (optional—string):
    The format of the time.
    (Default: Time format set in the General Options page)

Usage

Getting & Displaying the Author Who Edited Current Post : get_the_modified_author() & the_modified_author()

These template tags fetch and display the author who modified the post last.

Parameters

These template tags don't accept any parameters.

Usage

Getting & Displaying a List of Pages of Paginated Posts: wp_link_pages()

You can split your posts into pages by using <!--nextpage-->, and this template tag helps you list those pages.

Parameters

This template tag accepts only one parameter:

  • $args (optional—array):
    An array of the following arguments:
    • 'before' (string): HTML code to add before the output.
      (Default: '<p>Pages:')
    • 'after' (string): HTML code to add after the output.
      (Default: '</p>')
    • 'link_before' (string): HTML code to add before each link.
      (Default: '')
    • 'link_after' (string): HTML code to add after each link.
      (Default: '')
    • 'next_or_number' (string): Whether to show page numbers ('number') or "next (or previous) page" links ('next').
      (Default: 'number')
    • 'sep' (string): Separator text.
      (Default: ' ')
    • 'nextpagelink' (string): Text for the "next page" link.
      (Default: 'Next Page')
    • 'previouspagelink' (string): Text for the "previous page" link.
      (Default: 'Previous Page')
    • 'pagelink' (string): Format of the links' anchor texts, if 'next_or_number' is set to 'number'. The "%" character will be replaced with the page number, so you can use a value like "Page %" to generate links like "Page 1, Page 2, Page 3".
      (Default: '%')
    • 'echo' (integer): Whether to echo the output (1) or return it (0).
      (Default: 1)

Usage

Conclusion

Hope you liked this first batch of template tags. There are seven more batches to go, so stay tuned for more template tags!

If you have any questions, comments or corrections, you can share your thoughts with us in the Comments section. And if you liked the article, don't forget to share it with your friends!


by Barış Ünver via Tuts+ Code