How to insert NOINDEX,NOFOLLOW meta tags for app sections of your InVision Forum

So I ran across a question at EarnerHub, asking how to NoIndex, NoFollow a blog section of a forum powered by Invision Forum Software

Seemed to me that there should be a plugin or something to take care of this right?

Well, I couldn’t find any, so here is how I helped solve for it…

Edit Your InVision Forum Theme

Head on over to your themes section and click the edit theme icon… Just follow the image below…

Edit Global Template

Next, look for a template called globalTemplate…

Templates->Core->Front->Global->globalTemplate

Add Our Own Variable

To not interfere with existing variables, I created a new one and called it $seo_url_check…

First I clicked on the “Variable” button…

Then I added the new variable name to the comma separated list of existing variables…

Check URL Insert Meta

Lastly, I use the following code to check if the forum user is currently viewing a page generated by the “blog” app, if so, insert the meta tags, else do nothing…


{{ $seo_url_check = \IPS\Request::i()->url()->hiddenQueryString['app'];}}
{{if($seo_url_check=='blog')}} <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> {{endif}}

I could get very granular and grab query string parameters by access the data portion of the URL object…


{{ $seo_url_check = \IPS\Request::i()->url()->data['path'];}}

But for this purpose, InVision provides the app being used and makes it pretty easy to take broad action and add NOINDEX,NOFOLLOW meta tag to anything in the “blog” area…

HTH
😉

P.S. Seems to me like there is a huge opportunity here for an SEO plugin of sorts to help manage applications, in this case the blog section is unmoderated user generated content, so it would seem like a great candidate for NoIndex, NoFollow, at the very least, NoFollow…

Would be really cool if there was a plugin where I could just set meta tags for an entire application, perhaps even set specific header footer javascript options or other small modifications based on the application…

Just an idea, post your comments below or if you do make the plugin, post a link to it below!

How I boosted my Laravel project Page Speed with 3 code snippets

Below are three easy code snippets you can use to boost your Laravel project page speed…

Using the Google Page Speed test tool, my Laravel app was slow loading, potentially that could affect my indexing speed and ranking due to poor user experience…

So I did a bit of searching and found a great combination that boosted me in the high 90’s for pagespeed…

Pay close attention to step #3 as it is a two step process to make it work…

Enable GZip in .htaccess

Although they say that enabling GZip will increase CPU usage on your server, most of us are not pulling in thousands of requests per second to create a bottleneck using GZip…

So screw it, worry about that once you get the traffic right?

What you will want to do is add the following code in your .htaccess file:

<ifmodule mod_deflate.c>
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</ifmodule>

Enable Browser Caching in .htaccess

This seems like a no brainer, but in the end, I didn’t really think about it either…

Again we are adding code to the .htaccess file that will cache files like css and javascript in the users browser to reduce or iliminate the need to make requests to the server and download files that are the same across several views in your Laravel application…

Here is the code to add to your .htaccess file ( source StackOverflow )

########## Begin - ETag Optimization
## This rule will create an ETag for files based only on the modification
## timestamp and their size.
## Note: It may cause problems on your server and you may need to remove it
## Note: See comments above about why you might want to set the following to FileETag none
#FileETag MTime Size
FileETag none
# AddOutputFilterByType is now deprecated by Apache. Use mod_filter in the future.
AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript
# Enable expiration control
ExpiresActive On
# Default expiration: 1 hour after request
ExpiresDefault "now plus 1 hour"
# CSS and JS expiration: 1 week after request
ExpiresByType text/css "now plus 1 week"
ExpiresByType application/javascript "now plus 1 week"
ExpiresByType application/x-javascript "now plus 1 week"

# Image files expiration: 1 month after request
ExpiresByType image/bmp "now plus 1 month"
ExpiresByType image/gif "now plus 1 month"
ExpiresByType image/jpeg "now plus 1 month"
ExpiresByType image/jp2 "now plus 1 month"
ExpiresByType image/pipeg "now plus 1 month"
ExpiresByType image/png "now plus 1 month"
ExpiresByType image/svg+xml "now plus 1 month"
ExpiresByType image/tiff "now plus 1 month"
ExpiresByType image/vnd.microsoft.icon "now plus 1 month"
ExpiresByType image/x-icon "now plus 1 month"
ExpiresByType image/ico "now plus 1 month"
ExpiresByType image/icon "now plus 1 month"
ExpiresByType text/ico "now plus 1 month"
ExpiresByType application/ico "now plus 1 month"
ExpiresByType image/vnd.wap.wbmp "now plus 1 month"
ExpiresByType application/vnd.wap.wbxml "now plus 1 month"

ExpiresByType application/smil "now plus 1 month"
# Audio files expiration: 1 month after request
ExpiresByType audio/basic "now plus 1 month"
ExpiresByType audio/mid "now plus 1 month"
ExpiresByType audio/midi "now plus 1 month"
ExpiresByType audio/mpeg "now plus 1 month"
ExpiresByType audio/x-aiff "now plus 1 month"
ExpiresByType audio/x-mpegurl "now plus 1 month"
ExpiresByType audio/x-pn-realaudio "now plus 1 month"
ExpiresByType audio/x-wav "now plus 1 month"

# Movie files expiration: 1 month after request
ExpiresByType application/x-shockwave-flash "now plus 1 month"
ExpiresByType x-world/x-vrml "now plus 1 month"
ExpiresByType video/x-msvideo "now plus 1 month"
ExpiresByType video/mpeg "now plus 1 month"
ExpiresByType video/mp4 "now plus 1 month"
ExpiresByType video/quicktime "now plus 1 month"
ExpiresByType video/x-la-asf "now plus 1 month"
ExpiresByType video/x-ms-asf "now plus 1 month"

Lazy Loading CSS

Pay attention to the instruction below as this requires a two step process due to browser compatibility…

When loading CSS, it is considered a render blocking act, meaning the page cannot render until the CSS files download…

First Part:

Here is the work around, find your CSS link tag in your header and modify to look like this…

<link href="/path/to/your/css/file" rel="preload" onload="this.rel='stylesheet'" as="style">
<noscript><link rel="stylesheet" href="/path/to/your/css/file"></noscript>

Second Part:

The second part requires a bit of javascript in order to trigger the rendering of the CSS that was lazy loaded for non-compliant browsers…

You can cut and paste this code just under the CSS link tag in the header or in the footer…

Note: There will be a second before your CSS loads and your page looks a bit wonky, this should only happen the very first time a user loads your site, every page load after will pull from cached files and be faster.

Here is the javascript to cut and paste ( source gitHub )

<script>

/*! loadCSS. [c]2017 Filament Group, Inc. MIT License */
!function(a){"use strict";var b=function(b,c,d){function e(a){return h.body?a():void setTimeout(function(){e(a)})}function f(){i.addEventListener&&i.removeEventListener("load",f),i.media=d||"all"}var g,h=a.document,i=h.createElement("link");if(c)g=c;else{var j=(h.body||h.getElementsByTagName("head")[0]).childNodes;g=j[j.length-1]}var k=h.styleSheets;i.rel="stylesheet",i.href=b,i.media="only x",e(function(){g.parentNode.insertBefore(i,c?g:g.nextSibling)});var l=function(a){for(var b=i.href,c=k.length;c--;)if(k[c].href===b)return a();setTimeout(function(){l(a)})};return i.addEventListener&&i.addEventListener("load",f),i.onloadcssdefined=l,l(f),i};"undefined"!=typeof exports?exports.loadCSS=b:a.loadCSS=b}("undefined"!=typeof global?global:this);

 /*! loadCSS rel=preload polyfill. [c]2017 Filament Group, Inc. MIT License */
 !function(a){if(a.loadCSS){var b=loadCSS.relpreload={};if(b.support=function(){try{return a.document.createElement("link").relList.supports("preload")}catch(b){return!1}},b.poly=function(){for(var b=a.document.getElementsByTagName("link"),c=0;c<b.length;c++){var d=b[c];"preload"===d.rel&&"style"===d.getAttribute("as")&&(a.loadCSS(d.href,d,d.getAttribute("media")),d.rel=null)}},!b.support()){b.poly();var c=a.setInterval(b.poly,300);a.addEventListener&&a.addEventListener("load",function(){b.poly(),a.clearInterval(c)}),a.attachEvent&&a.attachEvent("onload",function(){a.clearInterval(c)})}}}(this);


</script>

Post Your Results

Test the code out in your Laravel project and post your results below or a link to your blog post results below in the comments, would be cool to see how much your Laravel project page speed increased.

HTH
😉

Book Review: Deep Work – Rules for Focused Success in a Distracted World

Just finished reading Deep Work, a great argument on today’s overwhelming need for constant amusement and distraction.

More importantly, this book explains how you can identify distractions, avoid them and get on with doing deep meaningful work…

Oh yes…

There is hope…

Sinking Deeper, Ever So Deeper

The author Cal Newport offers many arguments and examples of how, as a society, we are becoming less able to focus, complete tasks and crave amusing distractions to take our minds off of how boring everything is…

I tend to agree with his points, in fact, as a programmer, I get hired to create shiny distracting time sucking mobile apps and social platforms that waste time while in fact making you believe they create value in your life…

Crazy right?

If you look at the big picture, society as a whole is getting ever so more dependent on instant gratification…

Check twitter… blah…

Check facebook… like… like… zzzz…

Check email… spam…

Play mobile game… out of coins… more ads…

Watch tv… 1000’s of channels… nothing on…

Election Day… hahaha vote… wait, who won?

How To Win And Keep Winning

By far my biggest take away from this book came towards the end when Cal describes a process called the 4DX ( Four Disciplines of Execution )…

Without going to deep and off track, here is the one piece of the puzzle that energized me and made me even more focused…

When making goals, I tended to track success for projects with metrics, such as Clicky, more traffic, conversions, mean I am successful…

Right? WRONG!

The problem with that focus is that the metrics are after the fact, meaning they are a result, in the past, that I can do nothing about…

Still with me?

So instead of setting up goals and focusing on results that happen long after, like a purchase or a subscription…

I shifted my focus on doing work that causes the purchase or subscription…

The purchases and subscription will happen BECAUSE I work on what causes the purchase or subscription…

Like, creating value, adding features, fixing code, creating new products, etc…

Did I lose you?

A Quick Example

Imagine you want to lose weight…

Most people will get a scale, buy gym clothes, buy diet food, etc…

Then the focus on the scale, it didn’t go down, but you bought all the fancy crap and a gym pass…

What gives?

If your success is based on what you see on the scale, you are essentially looking in the past, you can do nothing about it, it’s a reading of your recent past ( could also be water weight, undigested food, but you still get all depressed, I digress )…

Imagine we switch things up…

If your success is measured by getting to the gym three to five days a week, the scale will show you the positive results you are looking for…

Losing weight and the downward trend on the scale will be a byproduct of your focused daily work…

Deep Work Works

If you feel the need to get a grip on your life and find simple yet effective examples of how to do deep meaningful work, then you need to read this book…

Deep Work is about learning to identify the distractions in your life, unapologetically set a HUGE goal for yourself and tell everyone to take a long walk off a short pier so that you can set time aside to enjoy deep thoughts and do meaningful work to move towards your life goals.

Go get a copy of Deep Work, you will love it…

Post your questions below…

HTH
😉

Systems vs. Goals

If you are stuck not reaching your “goals” and keep starting and stopping, making little to no progress in achieving your visions of success then read this…

Whether it’s fitness or business, systems always beat goals to achieve a result…

Here is what I mean…

What’s Wrong With Goals?

Goals are like shiny things, they get your attention early and if you ever obtain one you are often left with a sinking feeling of “that’s it? what’s next?”…

In fitness, goals can be losing 10 pounds or six pack abs…

Goals are tricksters, they remind you of what you don’t have, EVERYDAY…

You look in the mirror in the morning, STILL FAT!

Goal not achieved…

You might have lost weight, fit into those jeans, started walking or jogging for distance…

Goal was six pack abs, still fat, FAILURE!

Goals equate to destinations, if you are only looking to arrive at a destination, you will not enjoy the journey and miss all the details along the way…

Is this sounding to metaphorical to you?

Ok, here is the point, goals will always leave you empty, because the process of achieving your goals changes you, causes you to grow in your mind and at times your body…

When you achieve your goal, if you are one of the few who don’t quit or make excuses, often times you are left feeling that the goal you set was too small, you should have shot higher, asked more of yourself…

Delivery Systems

Systems are designed to deliver an end result consistently…

The emphasis is on DESIGNED…

That’s right, you decide how it will all work…

Now you can copy ( “MODEL” ) someone else or based on experience and intuition, hack your way and stumble upon a successful design…

In my experience, it’s always easier and it saves a lot of time to acquire knowledge either paid or from observation from those who have come before you…

No reason to replicate mistakes someone else is willing to help you avoid…

Sounds to simple right, if you have this power, why not do it?

I don’t know and I don’t care, the only thing I can tell you is that systems work for these two reasons:

1. If you don’t like the result, you can always adjust the system.

2. The system worked properly, delivers results…

The results can be anything you want, money, health, house, etc…

It’s the design of the system that merits the focus, not the goal…

Example, Las Vegas

Here is a simple example, you have two people, both dream of being RICH!

Both have, let’s say $5000…

The first, rent’s a small space on the Las Vegas strip, purchases ten used slot machines, spending most of his money, he opens his Casino, called the Lucky Spot, it’s ready for business…

The second, rent’s a fancy room on the strip, goes down stairs, get’s a car (not a taxi) and tell’s the driver to take him to the best paying casino in town…

The driver proceeds to take him to the Lucky Spot, the second man sits and enjoys the free drinks, takes in the environment and pull after pull on the slot machines, he dwindles his cash reserves down to almost nothing… being smart enough to leave a few hundred dollars back at the hotel for tomorrow’s meals and trip home… his dream is over and calls it a night…

So what happened?

The first man had a system to get rich, the second had a goal/dream to be rich…

The second man relied on luck and chance, arrogantly and outwardly expressing his desire to spend cash, because $5000 was small change, easily spent, compared to what he had in mind and was chasing after…

The first man relied on systems:

  • He didn’t buy the building, he rented a space
  • He didn’t buy new machines, he bought used machines
  • He didn’t do massive advertising, he paid drivers for each person brought in the door
  • He didn’t rely on luck, he used the law of averages, slots win over time
  • He didn’t charge for drinks, he kept customers in seats longer

Both men wanted to be rich, but desires, dreams and passions are not enough…

Goals are not enough…

Systems will always beat goals…

Obviously, it is not hard to understand how the second man lost his money, he never had a chance, I have been the second man many times…

As the saying goes, “Don’t go to Vegas with money you are not willing to lose…”

If systems work so well, why don’t more people use them?

Because they are BORING, dreams are more exciting, goals are fun to imagine, passions fill our hearts and minds…

Systems take work, consistent and hard work…

Most people love to dream, it makes them feel good and feeling good is sometimes all people want, so they dream and dream and dream…

I hope this is not you, I hope you realize that proper planning and design of systems, plus the consistent hard work it takes to get them in place, can deliver the results you want and more…

Yes, it’s not as exciting, at first…

Once a system is in place, all it requires is adjustments and maintenance, better yet, you can replicate that system many times over to multiply your results…

That’s sounds pretty good to me…

HTH

😉

Top 3 reasons I switched to ConvertKit

ConvertKit is the solution I had been waiting for to finally move away from using aWeber and MailChimp.

If you are like me, you probably put up with “almost what I need” or “work arounds” to do your email marketing.

Being skeptical, I waited a bit before trying ConvertKit… Everyone promises to be the “ULTIMATE SOLUTION”, so I figured I would wait it out and see if ConvertKit had legs…

Happy to report, no major regrets since switching, in fact, I was surprised at how simple the interface is to use and how easy and powerful the automation features are…

Reason 1 – Not Paying For Duplicate Emails Anymore

ConvertKit is subscriber centric, that means billing is based on the unique email subscriber count…

Other services require you to setup up different interest lists…

That means that if the same person signs up on three different lists with the same email, they get counted three times!

Duplicate emails create an inflated email subscriber count that bumps me up to higher pay tiers and costs me more money, why would I want that?

ConvertKit will not add the same email address twice, instead I can setup simple automation that says if a subscriber signs up for interest X, tag them with interest X…

Then if that same user subscribes on forms for interest Y and interest Z, that same user can be tagged with those additional interest…

That’s it, I am not duplicating that email across lists…

Instead, I am building a detailed profile of my subscribers interests to better provide targeted emails…

AND I SAVE MONEY!

Reason 2 – Powerful Yet Simple To Use Automation

Email marketing automation is the next evolutionary step for most internet marketers…

Here is my criteria for automation:

  • It shall not be confusing to setup
  • It shall be easy to adjust
  • It shall be simple to understand existing rules
  • It shall be easy to remove

ConvertKit uses a cause ( Trigger ) and effect ( Action ) interface, take a look at the image below and you can see how easy it is to start building automation rules…

ConvertKit Automation Rules

So far it’s been pretty easy to setup automation rules and have several sketches for new ideas to test…

Reason 3 – Simple User Interface

The user interface is simple, in a good way…

I make online services, for other people mostly…

I can’t tell you how often I integrate complex designs that make the service difficult to understand and use…

ConvertKit is easy on the eyes without sacrificing functionality…

You won’t see tons of buttons and charts or excessive clutter that frustrates and confuses the eyes…

What you will see are simple screens the enable you to do what you need to do quickly and efficiently…

Each screen seems to have exactly what is needed to get the job done…

So what now…

I was using both aWeber and MailChimp and canceled both, I stopped all custom API php scripts I had to write to handle adding, deleting and moving subscribers and I am saving money every month by not paying for duplicate emails…

ConvertKit has been a great tool for email marketing automation and hope that sharing this will help those who are looking for a solid alternative…

HTH
😉