Direct social sharing URLs

There are cases when you don't want to add some plugin to your blog or to the website you're building simply to have social sharing links on your site.

You might also want to be in full control of your design.

In cases like these it's hand to have a set of commonly used social links.

So, here hey are.

Facebook

https://www.facebook.com/sharer/sharer.php?u={siteUrl}

Twitter

https://twitter.com/intent/tweet?url={siteUrl}&via=DomagojSalopek&text={socialTitle}

Documentation

Google Plus

https://plus.google.com/share?url={siteUrl}

Documentation

Linked In

https://www.linkedin.com/cws/share?url=@fullUrl

Pinterest

https://pinterest.com/pin/create/bookmarklet/?media={socialImage}&url={siteUrl}&is_video=false&description={socialTitle}
Read More
SEO

SEO for Developers

Hey, you! Thanks for visiting. I don't know if you found this website via a search engine or by social media link or whatever, but thank you for stopping by. As a matter of fact, this will be the topic of our little post: how to improve your SEO, from the technical side of things.

This will be the post about what you as developers can do about SEO. We'll stay on the technical side of the equation, and leave the "snake oil salesmanship" to so-called "SEO experts, gurus and rockstars". Therefore we'll only mention the things that are proven to be SEO-friendly, and much more important than that, we'll see how you can implement those things using some popular Web Development technologies.

Read More

Create a simple PHP MVC Framework

In this blog post we'll create a simple PHP MVC Framework from scratch. This simple framework can be used as a tool for learning the basic plot behing MVC or you can modify it and make it grow into something bigger and much more useful.

MVC?

MVC stands for "Model View Controller". MVC is a concept that enables us to separate our business logic from the presentation. One of the biggest advantages is the code reusability. There are other benefits, such as: We can let the designers edit the Views, without worrying that they will screw up database access logic.

Please note that this blog post is from 2012 and take it "as is". I'm unable to answer any questions anymore regarding the implementation. Thank you for understanding.

Read More

Introduction to URL Rewriting using IIS URL Rewrite Module and Regular Expressions

In this blog post we'll talk about URL Rewriting and how it can be done using Microsoft's IIS. Why IIS? Because there are not that many tutorials that cover that stuff. Also, some very experienced PHP developers don't know how to rewrite URLs if their page is hosted on IIS.

URL Rewriting?

URL Rewriting basically means: altering the URL's apperance without affecting behaviour of your site. But why would someone alter the apperance of an URL?

Well, there are couple of great reasons. First, of course is Search Engine Optimization (SEO). For example, compare the following URL:

http://localhost.com/blog.php?id=1

With this one:

http://localhost.com/CSS-shorthand-properties/1

What are the advantages of URL number two? It's friendlier to both users and search engines. Users can immediately tell what the blog post is about and it also helps your site to get better search engine rankings.

Read More

Create a simple Responsive Design for a blog site using CSS media queries

Responsive Web Design is basically a design done with CSS3 Media Queries that changes according to the environment a visitor uses. In other words, the design "responds" to changes.

It may sound science-fictiony, but that's what happens. And it's not complicated like it sounds. It's actually easy to create a basic Responsive design. All you need to do is play a little with CSS3 Media Queries and setting different widths for container elements.

Read More

Display locations from a database on a map using Google Maps JavaScript API and PHP

In this relatively short blog post we'll use PHP/MySQL and Google Maps Javascript API to display locations from a MySQL database on a map.

We'll make a simple "City guide to Zagreb", meaning we'll select interesting locations from the database, display them on a map, show some info about them and show directions from user's current position to a location of his/her choice.

What you'll need

  • PHP/MySQL Development Environment
  • Some understanding of JavaScript
  • Some free time

As you can see it's really easy to get started. So, let's do it!

Read More

Create a Registration and Login System using Facebook Registration Plugin

In this blog post, we'll create a simple registration using Facebook registration plugin. We'll also create a simple login system that enables registered users to log in to our site.

Facebook registration plugin enables users to register for a website regardless if they have a Facebook account or not. However, if they have a Facebook account the registration form will be automatically filled with the user information from their Facebook account.

Read More

Create a simple blog site using eZ Publish

We'll create a Simple Blog Site from scratch using the eZ Publish CMS.

If you didn't come across eZ Publish yet it would be useful to familiarize yourself with both installation of eZ Publish and with first steps after an installation (post includes basics of creating a extension).

In this post I'll start with a "Plain Site" eZ Publish installation, because it's easier to explain some concepts that way, but if you already have another installation it really doesn't matter because we'll make our own design, templates and classes.

Read More

Create animated menu with CSS Sprites and jQuery

In this blog post we'll create a simple Animated Menu using CSS Sprites & jQuery. Some of you might remember the times when you needed to download custom javascript scripts designed just for a certain type of menu. Nowdays you can very easily create your own custom menus. Let's see how.

Nothing really special, but can easily be extended to meet your needs. Also, I decided to use background-position animations because it's not that common to find them online. And they're certainly not common like fade-type animations.

Read More

Getting started with eZ Publish - First steps after installation

This article is second in a series about eZ Publish CMS. It continues our exploration where the article about installation left off. It will deal with the first steps after eZ Publish installation.

We'll customize our site a bit and alter it's appearance. To do that we'll first do some basic eZ Publish configuration and then we'll create a new eZ Publish extension.

Read More