Disable Register Globals, Period!

Jun 16, 2008, 5:50 pm

Comment

I had to install a software yesterday and I needed register globals to be ‘off’. I usually just ignore this sort of stuff, especially because most softwares will allow you to install the software anyway. Nevertheless, I decided to do a search on how to turn this thing off and I found it after the 2nd search.

There’s basically 2 ways this can be done:

1 - The .htaccess file
2 - The php.ini file

The .htaccess method didn’t work for me, so I had to use the alternative. Here are brief instructions for both (from what I gather):

1 - .htaccess
Enter the following line to the .htaccess file:

php_flag register_globals off

or

php_value register_globals off

or

php_flag register_globals 0

or

php_value register_globals 0

If the .htaccess isn’t working for you, try:

2 - php.ini
Open a .txt file and add the following line to it:

register_globals = off

Rename the .txt file to “php.ini” and save it on your directory. This method worked for me.

Creating A Simple Rose Using Flash

Mar 27, 2008, 11:03 am

Comment

Current Mood:Cool emoticon Cool

Composed this tutorial quite a while back for another site (back in the days when I was still into the JPG image format). Here’s a very simple way of creating a rose using Adobe Flash (or Macromedia Flash).

1 - Using the fill colour, choose the colour you want your rose to be. I’ll pick the popular red.

2 - Select the Polystar tool.

3 - Choose an appropriate outline.

4 - Click and drag the tool on your canvas, until you’re satisfied with the largest diameter of the rose you’re going to make.

 

5 - Select the whole shape and edit the properties of your transform window. I’ll set the following to: width 85%, height 85%, rotate 20 degrees. But it’s up to you how you want yours done.

6 - The next bit is really easy, all you have to do is keep clicking on the ‘copy and apply transform’ button until you feel you’re rose has enough ‘petals’.

7 - And there you have it, a quick rose!

Comment

Current Mood:Cool emoticon Cool

I like step-by-step tutorials, don’t you?

First and foremost, we’re trying to achieve a simple button like this:

- Open Flash Mx 2004 Pro (or whatever version you have), and click on Create New {Flash Document}:

- Click on the {Insert} button on the drop down menu and then the {New Symbol…} option. A small window should popup:

- In this small window you will be able to edit 2 things: the name of the symbol and the behaviour of this symbol. A good example of a button name would be the button’s function e.g. “Profile”, “Online Store”, “My Pets”, etc. Also ensure that the behaviour is set to {button}:

- You need to select the colour you want to use for the button. Click {Fill Color} on the Tool Box and select your button’s default colour (the colour the button should be when it’s being left alone!):

- Select {Rectangle Tool} on the Toolbox. Click anywhere on the blank canvas, hold that click button and drag (click+hold+drag). Dragging determines your shape’s size:

- Set the fill colour to what you want your text colour to be, and then select {Text Tool} on the Toolbox. Click on your button and type in your button text. You can drag this text anywhere on the button. Usually, it’s typically at the center. Don’t forget that you can edit your text’s size, font, etc. at the {Properties} Panel:

So far so good? I’m stuffing myself with olives, my newly-discovered treat. LOL.

7 - Next, we’re going to set *keyframes on the {Timeline} Panel:

*What are keyframes for? They basically capture the current status of your object. When you set a keyframe, you capture the object at its present state. So at any point, when you go back to that set key frame it brings your object back to whatever state it was when you had it set.

“Up” = State of the button when it’s being left alone
“Over” = ‘Rollover’ State of the button when the cursor is moved over the button
“Down” = State of the button when someone clicks+hold their mouse button
“Hit” = State of the button when it’s been clicked on

- Set all 4 keyframes to the default button status. To do this, simply right click on the particular keyframe and select {Insert Keyframe}. Or you can use the shortcut: click on the particular keyframe and press {F6} on your keyboard (assuming you’re on Windows OS):

- For now, let’s just modify the action of the button during “rollover”. Select the {Over} Keyframe and modify your button accordingly.

- Select {Edit} from the drop down menu and click on {Edit Document} or simply press {Ctrl+E} on your keyboard. A new page will load so if you’ve noticed this change, don’t panic because that’s what’s supposed to happen:

- Select {Window} on the drop down menu and click on {Library} or simply press {Ctrl+L} on your keyboard. This opens a panel for your library items. Your button should be visible from there after clicking on your buttons name located on the panel to your right:

- Click+drag your button to the blank canvas. To test your movie, click {Control} on the drop down menu and select {Test Movie}. Or simply press {Ctrl+Enter} on your keyboard.

- If you’re happy with what you’ve done, you can export your movie. Go to {File} on the drop down menu, then {Export} > {Export Movie}. Again, if you’re the shortcut type of person (and you probably should be), simply press {Ctrl+Alt+Shift+S} simultaneously. Your file should be a .swf format. For now, just save everything under default settings.

- If you’re not happy with what you’ve done and you want to edit it your work, go to {Edit} on the drop down menu and click on {Edit Symbols} (or {Ctrl+E}). This should bring you back to the editing phase.

Ok, I’m done with this part of the tutorial. Next lesson will be shorter, I promise!

The Web 2.0 Revolution

Jan 11, 2008, 3:41 am

Comment

Current Mood:Alarmed emoticon Alarmed & Alarmed emoticon Alarmed

The other day, I complained about having just learnt about this internet phenomenon. In fact, I knew there was something going on but I couldn’t really put my finger on it until the other day.

I’ve decided to forgive myself for not having realized this much sooner. Why? Because according to oreillynet.com, this whole web landmark began some time around 2001: a year when I didn’t even know anything about the internet. I didn’t have a computer and only knew 2 websites which were Google (search engine) and Yahoo (mail & community chat).

So how was I supposed to know anything about Web 2.0, when I didn’t even know anything about Web 1.0? Heck, I didn’t even know each era had its own version!

As far as I know, there’s no one definition for Web 2.0. Internet enthusiasts just know what it is and have interpreted its definition in what they believe it is. So that’s pretty much what I’m going to do: explain it my way.

What is Web 2.0?
It’s actually quite simple: you know these current internet fads like Socialbookmarking, Firefox, Flikr, Blogger (and blogging in general), Wikipedia, etc.? Well that’s pretty much what Web 2.0 is. These present day hypes have one thing in common: they replaced a fad that was there before. Because they are downright hotter “versions” of the old means and methods, they are version 2.0…”Web 2.0“.

Web 2.0 Colours
At this point in time, when you want to come up with a new colour scheme for your site the best thing to go for is something that’s sizzling hot. That’s just the way things function in this world. What’s hot? Well d-uh: Web 2.0!

Web fashion has gone beyond web-safe colours. In fact, its gone almost anti web-safe colours. What you want to stick to is those ‘in-betweens’ and under-pure colours. mondernlife has set up a good idea of what the current web 2.0 palette is like.

After a lifetime of seeing primary (red - #ff0000, blue - #0000ff, yellow - #ffff00) & secondary colours (purple - #990099, green - #009900, orange - #ff9900) people are introducing more colors into the web palette because web surfers want to see new colors.

If you want to come up with a color that no other site has used for their logo or colour scheme, here’s an idea I’ve come up with, a way of finding a suitable one.

Open your Photoshop’s ‘colour picker’, select ‘only web colour’ box. Choose a colour that’s next to a pure colour (the colours within the yellow boxes below). In this example, I’ve used red:

When you’ve selected your colour, you might want to add a few Web 2.0 effects like glossiness / shininess or the most popular, simple, faint half-gleam effect.

Photoshop Tutorial: Shiny Buttons

Dec 30, 2007, 3:54 am

Comment

Current Mood:Flirtatious emoticon Flirtatious

There are lots of ways to make those popular shiny buttons you see a lot these days. Here’s a tutorial on how I make the simple ones. You can either do it my way or come up with your own unique way of doing them. :)

1 - First, select your canvas size. I like buttons that aren’t too small and aren’t too big, so I’ll go with 100×25 (pixels).

2 - Set your foreground colour to the main colour you want to use, and choose a background colour. The background colour is usually the darker shade of the main colour you’ve selected, but it all depends on the effect you want to create. In this case, we’ll use pink as the main colour, and white as the background colour.

3 - Create a new layer and use the gradient tool on the canvas to come up with something like this:

4 - Create a new layer and use the rectangular marquee tool to select the top half portion of your canvas:

5 - You can now continue the simple way, or the more complicated way. For the more simple way and for a quick finish, do the following:

6 - You still have half of the canvas selected by the marquee tool. Simply paint inside the selected area using white paint. Then bring ‘fill’ from 100% to 25%. © Rawpinions.com

7 - There you have it, your quick & simple shiny button. You can use text to write whatever you want on the button.

8 - If you want to continue on to a less simple-looking button, you can have additional effects:

9 - To add a border, create a new layer and use the rectangle marquee tool to select the entire canvas.

10 - On the menu bar, go to select > modify > contract.

11 - Contract selection by 1 pixel.

12 - Use the paint tool to paint all over the selected part of the canvas. You can use any colour to do this because this layer will be transparent anyway. To make this layer transparent, just move the fill from 100% to 0%:

13 - Double-click on the current selected layer (the one that you made transparent). The ‘layer style’ properties box should automatically pop-up. You will see a ’stroke’ check box, which you should select. You can click on the word ’stroke’ to modify its properties. Change the colour to anything you want it to be, and change the size to ‘1′ pixel.

14 - If you stop now, you’ll get a button that looks like this:

15 - If you want to continue just a bit more, you can do the following: create another layer and add another border to the button like the previous step. But this time, instead of selecting ‘1′ pixel at contract selection, select ‘2′ pixels instead.

16 - Change the stroke colour to white (or your background colour) for a light effect. After shifting the transparency fill to 0%, modify the opacity fill to 10-20%. You should end up with something like this:

You might not think the littlest changes matter, but they kinda do. ;)

My PHP Lesson 1

Dec 05, 2007, 1:48 am

Comment

Current Mood:Cool emoticon Cool

// ooh yippee my variable
$rawpinions = "I started self-teaching myself PHP the other day. The basics aren't that tough, but it's a little different from basic HTML (without the CSS). Because it's a little more challenging than HTML, it's more exciting! I do face problems though, like I constantly forget to add the semi-colon at the end, and I also don't care much about the technical terms like variables and strings.";
$wootpinions = "I guess that's the downfall of self-taught things - due to the fact that you don't get an exam/test at the end of a lesson, you don't care much about knowing the definition of things, etc.";

// check this out yo
print $rawpinions;
print $wootpinions;
?>

…and this is what you get: PHP Lesson 1