After using swfobject I thought I’d never have to pass variables to a swf thru the query string again…. oops.
Wrong…. and I had to look it up. I’m using a lightbox for a flv player and right now it looks like the easy way to make it happen is like this:

here is the lightbox call (the only relevant part of this is the ?recordID=2)

<a rel=“prettyPhoto[philosophy]” title=“Vid1” href=”/flash/XXXXXX.swf?recordID=2” rel=“prettyPhoto[philosophy]” title=“Description”></a>

here is the actionscript that gets it then assigns the piece I want:

var queryString = this.loaderInfo.parameters;
var whichVideo =  queryString.recordID;

How to read & update MySQL table column comments
So why would you wanna do that? Cuz you can store info in the comments that can be read out and feed automated CMS systems

SELECT COLUMN_COMMENT
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = 'simpl_example' AND TABLE_NAME = 'your_table_name';

Maybe there is a better more automagic way of doing this but I couldn’t think of it. Since I’ve had to do it three times lately I thought this time I’d post it.
here is the html code:

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN”
“http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>

<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” >
<head>
<title>Basic Shell</title>
<link href=”reset.css” rel=”stylesheet” type=”text/css” media= “all”>

<link href=”structure.css” rel=”stylesheet” type=”text/css” media= “all”>
</head>

<body>
<div id=”wrapper_page”>

<div id=”wrapper_head”>

<div id=”page_head”>Head</div>

</div>

<div id=”page_body”>Body</div>

</div>

<div id='wrapper_foot'>

<div id='page_foot'>
Footer
</div>

</div>

</body>
</html>

and here is the css (less the reset.css, I use the same one all the time, you can download it below if you’d like)

body, html {
width:100%;
height:100%;
margin: 0px;
padding: 0px;
}

body {
background-color:#fff;
margin: 0px;
padding: 0px;
font-family:”Lucida Sans”, Verdana, Tahoma, Helvetica, sans-serif;
}

#wrapper_page {
width:100%;
min-height:100%;
margin: 0px;
padding: 0px;
border:0px solid blue;
}

#wrapper_head {
border:0px solid blue;
width:100%;
height:100px;
margin, padding:0px;
background-image:url(sprite-bg.jpg);
background-position: center top;
background-repeat: repeat-x;
}

#page_head {

width:960px;
height:100px;
margin:0px auto;

}

#page_body {

width:960px;
height:100px;
margin:0px auto;

}

#wrapper_foot {

width:100%;
height:150px;
margin:-150px auto 0 auto;
background-image:url(sprite-bg.jpg);
background-position: center bottom;
background-repeat: repeat-x;

}

#page_foot {

width:960px;
height:150px;
margin:auto;

}

here is a zip with the 3 files DIV_at_bottom_of_page.zip

When you need to restrict users to a specific database do this….
log in as a/the admin user:

mysql -u root -h localhost -p

(enter your password)

then run these commands:

CREATE Database databasename;
CREATE USER ‘username’@’%’ IDENTIFIED BY ‘password’;
REVOKE ALL PRIVILEGES,GRANT OPTION from ‘username’@’%’;
GRANT ALL ON databasename.* TO ‘username’@’%’;

Line 1 creates a database named: databasename (mmmm… insert the database name you want here)
Line 2 creates a user named username and gives them a password
Line 3 Takes a way all username privileges
Line 4 gives username all privileges on all the tables in databasename

Jun 052009

<?php

$today = getdate();

$day = $today['mday'];
$month = $today['mon'];
$year = $today['year'];
$mtharr = array(“January”,”February”,”March”,”April”,
“May”,”June”,”July”,”August”,”September”,
“October”,”November”,”December”);

?>

<select name=”start_day”>

<?php

for ($i=1;$i<=31;$i++) {

echo “nt<option value=”$i”";

if ($i == $day) echo ” selected”;
echo “>$i</option>”;

}

?>
</select>

<select name=”start_month”>
<?php

for ($i=1;$i<=12;$i++) {

echo “nt<option value=”$i”";
if ($i == $month) echo ” selected”;
echo “>” . $mtharr[$i-1] . “</option>”;

}

?>

</select>

<select name=”start_year”>
<?php

for ($i=0;$i<=9;$i++) {

$tmp = $today['year'] + $i;
echo “nt<option value=”$tmp”";
if ($today['year'] == $tmp) echo ” selected”;
echo “>” . $tmp . “</option>”;

}

?>

</select>

To exclude php for example package when using “yum update”

Open /etc/yum.conf file:
# vi /etc/yum.conf

Append following line under [main] section, enter:
exclude=php*

or

at the command line

# yum –exclude=package* update

© 2012 James Border Suffusion theme by Sayontan Sinha