Tuesday, September 20, 2016

Simple WordPress Ecommerce with Easy Digital Downloads

WordPress is truly a robust platform. Even though it’s mostly used as a CMS, WordPress can easily be transformed into a full-featured shop. You can integrate a shop into your blog or set up an ecommerce store using WordPress as a foundation – the sky’s the limit.

If you’re a store owner, chances are you’re selling a downloadable product or two. With WordPress, selling downloads is easy thanks to the aptly named Easy Digital Downloads (EDD). EDD is one of the most widely used plugins for selling downloads, and it certainly lives up to its name. As a free plugin, it has incredibly versatile functionalities, and it’s a breeze to set up.

In this article, we’ll delve into the features that Easy Digital Downloads provides and walk you through the exact process to set up your first download and integrate the plugin with your site.

Continue reading %Simple WordPress Ecommerce with Easy Digital Downloads%


by Ian Chandler via SitePoint

Jannik Obenhoff

Jannik Obenhoff is 16 years old photographer with over 355k Instagram followers . He is really famous for his landscapes of the mountain view specially around Germany .


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

Way2Web

Webdesign Antwerpen


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

Maison Interactive

Maison Interactive is a small multidisciplinary boutique design studio in Nairobi Kenya.


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

Tilted Angles in Sass

Recently, I had to work on a website heavily using tilted angles as part of its design guidelines. By “tilted angles”, I mean these sections whose top or bottom edge is not completely horizontal and rather a bit inclined.

Illustration of a tilted angle in CSS

There are quite a few ways to implement this. You could have base 64 encoded images applied as a background, but it makes it hard to customise (color, angle, etc.).

Another way would be to skew and/or rotate an absolutely positioned pseudo-element, but if there is one thing I don’t want to deal with, it’s the skew transform. God, no.

When using Sass, you could use the Angled Edges library that encodes dynamically generated SVG. It works super well, however it requires a fixed width and height expressed in pixels, which kind of bothered me.

I also really wanted to see if and how I could be able to implement this. I ended up with a solution that I am really proud of, even if it might be a bit over-engineered for simple scenarios.

What’s the Idea?

My idea was to apply a half transparent, half solid gradient to an absolutely-positioned pseudo-element. The angle of the gradient defines the tilt angle.

[code language="css"]
background-image: linear-gradient($angle, $color 50%, transparent 50%);
[/code]

This is packaged in a mixin that applies the background color to the container, and generates a pseudo-element with the correct gradient based on the given angle. Simple enough. You’d use it like this:

[code language="scss"]
.container {
@include tilted($angle: 3deg, $color: rgb(255, 255, 255));
}
[/code]

The main problem I faced with this was to figure which height the pseudo-element should have. At first, I made it an argument of the mixin, but I ended up going trial-and-error at every new angle to figure out what would be the best height for the pseudo. Not ideal.

And just when I was about to table flip the whole thing, I decided to leave the laptop away, took a pen and paper and started doodling to figure out the formula behind it. It took me a while (and a few Google searches) to remember trigonometry I learnt in high-school, but eventually I made it.

To avoid having to guess or come up with good approximations, the height of the pseudo-element is computed from the given angle. This is, of course, all done with a bit of Sass and a lot of geometry. Let’s go.

Computing the Pseudo-element’s Height

Trust me when I’m telling you it won’t be too hard. The first thing we know is that we have a full-width pseudo-element. The gradient line will literally be the pseudo’s diagonal, so we end up with a rectangle triangle.

Let’s name it ABC, where C is the right angle, B is the known angle ($angle argument) and A is therefore C - B. As shown on this diagram, we try to figure out what b is.

Geometrical diagram displaying the aforementioned explanation

To do that, we need to find the value of c (the gradient line, aka the hypothenuse), which is the length of a (the bottom side, 100%) divided by sine of the A angle (with B = 5°, A would be 85° for instance).

Continue reading %Tilted Angles in Sass%


by Hugo Giraudel via SitePoint

PHP-FIG Alternatives: The Pros and Cons of Various Visions

In his article The Past, Present and Future of the PHP-FIG, Larry Garfield gives a whirlwind tour of his impressions of the FIG, from its founding to one of its possible futures. I encourage you to read it in its entirety before continuing.

Herein, I will attempt to address some of the errors and omissions in Larry's article, and offer two other possible futures for the FIG.

Fist fight illustration

PHP-FIG 3.0: Too Revisionary?

I have stated elsewhere that what I have called the "founding" vision of the FIG was to focus on member projects, find commonalities among them, and codify those commonalities. Larry condemns my statement as "revisionist history" and asserts the true founding intent was more in line with what I have called the "grand" vision (that is, an overarching standards group for all PHP coders, member projects or not).

To support his position, Larry quotes David Coallier's post of Brett Bieber's meeting notes.

The goal of this meeting was to develop a set of common standards which PHP projects can strive towards adopting.

Each project may have specific standards which may extend and further define how these standards should be used, but the goal being a set of PHP standards provided as a resource for all PHP developers.

Larry also draws from Travis Swicegood saying something similar. I will quote a little more of Travis's post than Larry did:

Below is what my vision is. It’s my vision and mine alone, but this is where I’m coming from. ... I’d love to see an officially sanctioned standard come out of our work. ... When code is published for public consumption in a year, I would love it if the first comment on blog posts or mailing list messages announcing the new code is "wow, that’s great, but you should run it through phpcs."

At first, this appears to be substantial evidence of Larry's claim. However, one should remember that a "goal going into" a meeting is not the same thing as a "result coming out of" a meeting.

So it may well be true that some of the participants had something more like the "grand" vision in mind when they first arrived. But, having been at that initial meeting myself, I personally recall the decision by the end was not to pursue the "grand" vision. Instead, it was to adopt the more limited, "for the group members" approach.

To provide more support than my own memory of the discussion, I submit the following:

  • Travis himself says in the same post linked above, "We decided to form an official group of our projects to oversee the creation of this standard and work toward better, more widely adopted standards across our projects."

  • Cal Evans, also present at the meeting, presents a summary narrative:

    • "To paraphrase the goal of this group, we are saying 'Hey, we are all agreeing that we are going to code this way and we'd like you to do it to.'" (Does that mean Larry has it right after all? No, Cal corrects himself in a later email, stating "That should have read: To paraphrase the goal of this group, we are saying 'Hey, we are all agreeing that we are going to code this way.'")

    • In that same later email, Cal also says, "This group is not setting itself above all others saying we know best. We are trying to find common ground between a lot of projects so that PHP developers world-wide can move between the code in those projects and not have to re-learn standards each time. ... While I would love to see the the standards agreed upon by this group be widely adopted by the PHP community at large, that is not a goal of the group."

  • Matthew Weier O'Phinney says, "We represent a large number of component libraries and frameworks, with many thousands, if not millions, of users. We are representing those users within this group. ... Third, these standards are not compulsory. You can adopt them or not. We are simply recommending them, and also committing that our representative projects will be using them. ... If anything, we're keeping a very close eye on the community, and involving them as much as possible -- via our individual projects."

  • Nate Abele's recollection of the initial meeting is similar: "The point of coming together on the standards which we agreed to was to provide our collective user community with some semblance of interoperability between our projects, and provide a way forward for other projects who'd like to interoperate with ours as well."

    Nate goes on to say, "Everyones has an individual choice whether or not they even find these standards useful for them, but we as project leaders have elected to use these standards in our code, so if you plan on using any of our projects, you'll be using the standard anyway, so we might as well be open with people about what those standards are, just in case others do find them useful (which, in my arrogance, I'm going to suggest that, if we as lead developers and prominent community members do, then yes, others might as well)."

(All emphasis above is mine; spelling and grammar errors in quotes are as-written.)

Contra Larry's assertions, then, one can see that from the very beginning, the group resolved to focus on its own members. At the same time, we were aware not only that others would be watching and might choose to adopt our practices, but also that the group could speak only for its own members, and not for anyone else. That is, some might choose the FIG's work as a "role model"; but then, the nice thing about role models is that yours do not have to be the same as everyone else's.

To conclude: While Larry accuses me in his article of "protect[ing] a 'fictional' vision", it would be more accurate to say that I strive to honor the true founding vision of the group -- one that Larry appears to disagree with.

Continue reading %PHP-FIG Alternatives: The Pros and Cons of Various Visions%


by Paul Jones via SitePoint

Version Show, Episode 9: Code Longevity and Web Ghost Towns

In this one-on-one episode, Tim and David discuss how compatible today’s technologies will be with future systems, how long software should last, project organization and progressive enhancement, the curly question of whether a piece of software retains its identity even with an entirely new codebase, and web ghost towns (#webGhostTown).

Continue reading %Version Show, Episode 9: Code Longevity and Web Ghost Towns%


by M. David Green via SitePoint