<? Blog ?>

--- No more iframes! ---

Posted by: MisterFade

Remember when everyone used iframes in order to divide up a page, having one side scroll? Those days are long gone, and for good reason.

Using an iframe was never a favorite of mine, and since the introduction of CSS, iframes are no longer needed (unless there’s an extreme case, or if you’re required to use code from another site). With CSS it’s possible to have the same effect as an iframe, less the bloat.

What is an iframe?

Iframes are a way of displaying a page within a page. You could have it as your sidebar menu, or as a square right in the middle of your main page, showing another page with whatever information is on it. The problem with iframes is that first of all, you’re showing two pages, which is double the load of your browser. It also makes it impossible to obtain validated W3C code, because they do not allow iframes.

Here’s an example of iframe code:

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.yoursite.com/page.html"></iframe>

Read More »

--- Creating a Javascript style switcher ---

Posted by: MisterFade

Javascript allows you to create tons of useful tricks on a web page, one such trick is having a style switcher.

What’s a style switcher?

Simply put: it’s a way for end users to switch the stylesheet (CSS) of your site on the fly. The point of having this depends on what you’re trying to offer your visitors but normally it’s just to allow them to change the look of your site to a different color and/or design that they prefer. Some webmasters also use it as a feature for VIP members, so in other words it’s a way to get people to sign up for VIP membership. Whatever the reason may be, here’s how it’s done.

Create multiple style sheets

You need to have at least two stylesheets that you want to offer your visitors and they must have the same setup, because this style switcher is only going to switch the CSS out for another one. In no way will this switch out the actual HTML page! So for example, if you have a DIV named #container, then it must be named so on all your stylesheets, otherwise when someone switches the CSS, it will break. Usually what I do is offer multiple stylesheets and have everything the same, but I’ll change the background colors, positioning, text color, etc.

Read More »

--- Integrating a Vbulletin login into your site ---

Posted by: MisterFade

One of the most sought-after pieces of code for a lot of community administrators is how to integrate Vbulletin’s login system with their own non-vb pages. Luckily, I have the code! I’ve been using this code for a number of years, and it’s worked flawlessly.

What is Vbulletin?

Vbulletin (http://www.vbulletin.com) is a community forum that you install on your website. I highly recommend them if you want to have a solid community, just the addons alone are worth it.

The Code

First off, for this code to work you need to make sure your pages are in .php format. That is the only this will work since all the code is in PHP and ties into the Vbulletin database, which is in MySQL.

The first piece of code you need to put at the very top of your page is this:

<?php
chdir("/home/yoursite/www/forums/");
require('./global.php');
@include('./includes/functions_user.php');
$vbulletin->session->vars = $vbulletin->session->fetch_session($vbulletin->userinfo['userid']);
$session['sessionhash'] = $vbulletin->session->vars['sessionhash'];
?>

Read More »

--- W3C makes it tricky ---

Posted by: MisterFade

Creating a web page used to be a simple process of making a table, adding a header, some text, a footer and you’re done. Ok well it wasn’t THAT easy but it was a lot simpler than it is today.

W3C

One of the problems facing developers today is whether to code a page by using the W3C coding standards. Is it needed? I think so. Having clean code is one thing, but by following the W3C guidelines, it will ensure that not only YOUR page, but ALL pages will have the same standards. This also applies to everyone that is also following the same coding standards. What this means is that YOU and lot of other people will be coding along the same lines, which in the long run helps us all build a nice, clean set of pages throughout the entire WWW.

Read More »

--- How to reset in CSS ---

Posted by: MisterFade

Coding in CSS can be a challenge for web developers since there’s usually some roadblocks courtesy of all the different web browsers out there. For example, when creating an unordered list, each browser has its own way of positioning it and giving it its own margin and padding values.

How do I change that?

Very simple – reset! Whenever I create a new CSS file, I simply add this at the very top:

* {
margin: 0;
padding: 0;
}

What does it do?

That small piece of code resets the margin and padding to zero so that I’m basically telling the web browser, “I’m not going to add a margin and padding to anything unless I want to add a value to it”. So if I wanted to actually add a margin to an unordered list, I would add one:

Read More »

--- If/Else with PHP ---

Posted by: MisterFade

One of the most widely used pieces of code that is used in PHP is the if/else conditionals. These conditionals can be used to do anything from checking a user’s login, to showing a different message based upon certain criteria.

What is it?

Let’s say you have a database of members and when someone logs into your site you want to display “Welcome back!”, and for guests you want to display “Hello guest, please register” – here’s what your code might look like:

$username = $result['username'];
if ($username) {
echo "Welcome back!";
} else {
echo "Hello guest, please register";
}

Read More »

--- CSS3 – Where are you? ---

Posted by: MisterFade

When working on websites almost non-stop daily, it can often be difficult to find time to just have fun with it. From coding a picture gallery to creating a custom shopping cart in PHP, yes it can be fun.

Ok so maybe coding a shopping cart isn’t fun, but coding in CSS can be! Take CSS3 for example; not all browsers support it, but I wish they would since it makes things much easier to do, such as creating rounded corners.

Read More »

--- People still use IE!?!? ---

Posted by: MisterFade

I know most people still use Internet Explorer, but honestly it’s the worst browser out there. Sure, they’ve added some nice features like tabbed browsing but with others like Firefox, Chrome, and Opera, there’s no reason to stick with IE. I still use it for testing purposes, but if the masses didn’t bother with IE then I probably wouldn’t use it at all!

When it all started

Internet Explorer first debuted in 1995 as a part of Windows 95, they’re now at version 8, which comes with Windows 7. It’s served its purpose by leading the way for other browsers, but the time has come to hang it up. Take Firefox for example; it has changed the way a lot of us have used the internet, from tabbed browsing, to browser addons. Then Google’s Chrome took it a step further by integrating it with their search engine, and now they’re even going as far as making it THE browser for their Chromium operating system.

Read More »

--- It’s Still Good to Use HTML Tables ---

Posted by: MisterFade

CSS is the proper way to build a website nowadays, whereas years ago sites were created using HTML tables.  What people need to realize is that tables were not intended to be used to design something, rather they were meant to hold data.

Table Structure

I still use tables, basically when I need to list something like a set of rows that contain a list of songs.  It would look like this:

Read More »

« Recent Projects »

IllSkratch

IllSkratch.com is for scratch DJ's to help bring the scratching culture back to life! View More »

GRC Documents

This is a test design of a document solutions company. View More »

IllMuzik

IllMuzik.com is a Hip Hop Production site with a large forum community. View More »

W3C XHTML ValidW3C CSS Valid