Archive for the ‘Code’ Category

Addition to jQuery slider

A few days ago I posted a script that allowed you to create a jQuery slideToggle that would remember it’s last state throughout page reloads. The original idea came from Matt over at ifoh designs. He even was so kind to comment on my version. He mentioned something though I think in return is a mention from me.

Read more »

A jQuery slider on cookies

As you’ll probably have noticed, the homepage of my site featues a “recent project” box that can be closed with a little jQuery sliding effect. I allready planned that feature in the previous version, but found it extremely annoying becasue with every refresh, it would open again. A while back I found this article on ifohdesigns and decided to use it to implement the sliding box again in my site, though this time, it would stay closed.

However, the script started off from a hidden div that you want to show, instead of hiding a box that’s there. I started fiddling with it and before I knew it, I broke it. Nice going, Bram. Smooth.
Read more »

Addition to Auth Library tutorial

Okay, I’ve decided to write a little addition to my previous tutorial. I finished the last tutorial, my Auth library for CI, with a note:
When you use this library, you’ll have to manually adjust the standard redirects from the library. I just set them to /admin and /admin/login but this could/will be different for you offcourse. A better way would be to add an initialize() method that gets a config array passed to set these URI’s in class vars.

I have adjusted my library a little so you can initialize it, setting redirects as you please. Even more, it now automatically uses any auth.php config files too. This was really easy and I thank xwero for helping me figure it out, over at the CodeIgniter community.
Read more »

Auth library for CodeIgniter tutorial.

Hello and welcome to my first tutorial in ages. Today, I’ll be explaining to you how you can create a simple login (or ‘auth’, short for authorization) library for CodeIgniter.

What functionality will our library have? Users accessing restricted pages will see a login screen if they’re not logged in, once logged in they’ll be redirected to the page where they were, or simply see a standard page. That’s about it for this tutorial, though adding things like user groups, restrictions etc… could all be added later. Maybe stuff for a later tutorial?

I’ll copy/paste bits of code from my own (simple) auth library and then explain what they do. So at the end of this tutorial you will have a working library.
Read more »

CSS Text shadows with a touch of JS

I was looking at the new wpcandy theme today and noticed their latest post headline, which had a nice little shadow. I thought “hmm, I want to know how they did that. So I set out to check the code. After all, how hard could it be?
Read more »