Results matching “php” from Ye Olde Rad Blog III

I have something to show you. Something very exciting. Sexy, even. "What it is, Rad?" you ask, oozing with curiosity. "A picture of a European supermodel? Lying scantily-clad on the sandy beaches of St. Tropez?"

Sexy SwimsuitNo, my fellow technoluster. Something far more enticing. And seductive. See » HERE (.. but only if you're 18).

No, your eyes don't deceive you. That's right » a screen-shot from phpMyAdmin showing the tables of a MODx database using the UTF-8 character set and utf8_general_ci collation. Smokin', ain't it?

"But, Rad. I thought you said that was impossible?" It is! .. For mere mortals.

"How did you ever pull it off?" Well, I can tell you that banging my head against the wall produced only limited success. It may've even impeded the process. (I can't remember.)

To be honest, I'm not really sure WHAT the magic-bullet was. Cuz I made a number of changes (including enabling suPHP)  .. which I'll tell you all about. I learned a lot. But first, I need to take care of some biz .. and get some coffee. (Was up pretty late last night. Where did I put that Advil?)

Feliz año nuevo. Most Content Management Systems (such as Drupal & MODx) work in conjunction with (require) a database. So do blogs (such as Movable Type) & forums (such as SMF).

MySQL is the world's most popular database software for web-based applications (.. such as CMS's & blogs & forums). It's what I use. It's the only database system I've ever used.

cPanel / Web Host ManagerThe Rad VPS (« physically located downtown Chicago) uses the cPanel/WHM control panel to help administer the site. cPanel makes it stupid-easy to create a new MySQL database.

You simply » enter a descriptive name for your new DATABASE (such as » rad_modx) and click the button labeled 'Create Database.' cPanel talks to MySQL and creates the database for you. Viola! Done. Too easy.

To use your new DATABASE, you'll also need to create a USER (such as » rad_modx, conveniently same as the database_name). Give this USER a password and click the button labeled » 'Create User.' Voila! Done creating new USER.

Lastly you need to assign a particular USER to a particular DATABASE. You do this by selecting both from their respective drop-down menus (one lists all available DATABASES, the other all possible USERS) and clicking the button labeled 'Add.'

Then you assign to this USER the appropriate PRIVILEDGES (normally ALL) necessary to perform the database functions. Click the button labeled 'Make Changes' and you're done. Voila! As if this weren't easy enough, cPanel even has a wizard to walk you thru these steps.

MySQL Database ManagementSo, in order to configure a database to work with a particular web application (such as Drupal or MODx), you need 3 pieces of info:

  1. database_name
  2. user_name
  3. user_password

Couldn't be easier. Tho I sometimes forget the final step of actually assigning the USER to the DATABASE (after creating both). Creating new DATABASES is not something I do on a regular basis.

RADIFIED currently uses 5 databases. Three for the blogs » 1-each for the 3 different versions of Movable Type I have installed .. based on v263 (installed 2003), v335 (installed 2007) & v432 (installed 2008). Another for Drupal (2008). And 1 for MODx Revolution (beta5), which I installed a few days ago.

The Rad forum, which uses YaBB, doesn't use a database. (At least not yet.) Might be worth noting here that Movable Type, Drupal, MODx & YaBB are all OPEN SOURCE (better than free) .. as is MySQL.

While installing MODx a few days ago, I noticed they include an option to test your database connection & credentials .. to see if MODx can access it okay.

Created a dedicated 'Guides' page. See here » Radified Guides. Been meaning to do that for .. eons. This will allow me to off-load the guides listed here on the home-page, so I can clean it up.

MODx Content Management System (CMS)I indented & right-aligned every other link .. to make them easier to read. What do you think? When the links were all lined-up together & left-aligned, they seemed too .. similar.

Eventually I'd like to include a representative graphic for each guide/link. But for now, I just wanted to create a page that contains a repository of the links to all our guides.

On a related note, I've been looking more deeply into MODx, the Content Management System (CMS). They are fixin' to release a new version (complete-rewrite, from the ground up, based on PHP5) .. called » REVOLUTION. (Current version is called » EVOLUTION.)

Drupal would be cool, but it's way too sophisticated for what I need. I don't want/need a PhD in CMS's. Here's a MODx site, for example. (I used to live in Lancaster, PA .. the heart of Amish country. Nice people there.)

I'd like to become intimately familiar with a good CMS .. as another skill to add to my digital toolkit. Only way to do that is » use one daily.

The good people at MODx claim a 'Release Candidate' version of REVOLUTION will be coming » "Winter 2009" (.. which is now). [ Notice how the words 'Summer 2009' have been lined-out. ] UPDATE » They just changed the RC date to "Spring 2010". Hmmm.

The MODx site is running REVOLUTION. I'm in no hurry, tho. Rather make a good decision than a hasty one.

The White House (Gasp!) Goes Drupal

|

The White House re-launched its website on Drupal. Can you believe that? Not sure why this blows my mind. In searching the web however, I see many others have also sat up and taken notice.

George Washington at the White House running on DrupalNo doubt the White House has content to manage. Sure.

But I think the reason it's so unexpected is that Drupal is simply too cool & cutting edge for the White House .. which we normally associate with stodginess and somnolent formality.

Then there's the fact that Drupal is not an American product. It was born in Belgium, at the University of Ghent (.. as a message board for fellow-students enrolled there).

And you know how RADICAL college students can be. Downright revolutionary at times.

It could also be that we associate politicians with being less-than-honest about their true intentions .. while Drupal is open source, and therefore completely transparent. (Imagine how people might feel if Hitler were caught parading around town wearing a scarf knitted by Mother Teresa.)

Dare I mention how the government TAKES your money .. without even a thank-you note, and gives it to people who have much too much already. While Drupal, released under GPL, is better than free (as in 'free beer'), cuz it's also open source (free as in 'freedom').

The whole thing feels grossly incongruent .. as tho two vastly different worlds have collided. Matter and anti-matter. Good omen, tho .. for both the White House and Drupal.

Rad's Nuclear Grade Crock Pot Stew

|

Have a special treat for you today » my Nuclear Grade Stew recipe (2 pages). I've made this stew at least 50 times over the years .. probably closer to a hundred. Now that autumn is here, and the nights are getting chilly, it's time to break out the crock pot.

Crock PotFor the pages that contain this recipe, I designed a new, single-sidebar layout .. another liquid-elastic hybrid. See what you think.

For previous web pages, I used a design that comprised dual-sidebars, one on each side, cuz I liked the balanced, symmetric look provided by that layout. So this feature took longer to complete than expected, cuz I first had to code the CSS from scratch.

I've made this stew for the Bug many times (cutting the veggies into smaller pieces so they fit easily in his little mouth). So it's made with lots of love. He digs it.

Been lagging on entries lately, as you mighta noticed. Been dabbling in Programming. Kinda got lost. Big subject.

On the personal side, I took the Bug kayaking last week .. out on the Newport Back Bay. (No waves there.) He later confided, "Dad, at first I was a little scared. But now I'm not scared." We stopped at a small island where he got out and searched for buried treasure.

Semantic Markup & Passing Inspection

|

Changed the underlying markup that controls the links in the blue-green sidebars on the home-page. They were previously coded as » paragraphs. I changed them to » list-items .. cuz that's what they are » a list of items (links) grouped according to category. Certainly not paragraphs .. not even sentences.

Website InspectionIf I did this correctly, you shouldn't notice any difference. Cuz I applied the same styling to the list items .. tho this was trickier than it might sound. I nearly freaked when a single misplaced comma trashed my whole layout. Yikes!

This change represents a semantic improvement. Semantics (i.e. » 'meaning') is one of the buzz-words kicked around when thinkers discuss the Web's future.

Most surprising was that it took me so long to realize I had coded the home-page with semantically incorrect markup. It suddenly hit me (last night), when out of the blue (actually » blue-green), I thought » "Those links aren't paragraphs; they're a LIST."

Reblog this post [with Zemanta]

Install a Wiki? (DokuWiki)

|

Made some minor style-tweaks to the home page. The text you're reading now, for example, is slightly less-bright (easier on the eyes), while the links are a little brighter .. than they were before. (Might have to refresh your browser to load the revised style sheet.)

WikipediaVisited-links in the sidebars are now slightly less-bright (grayer) .. than un-visited links. Used to be no diff.

Been studying more CSS. Becoming very comfortable tweaking styles. Fine-tuning. Easier for me to determine what I don't like, than what I do.

Oh, the date is also slightly brighter (whiter) .. than the rest of the text, and has a "text-transform" property applied to make it » UPPERCASE .. via a span tag with 'date' class attribute.

Upgraded the Rad blog to the newest version (4.32), which was released a few days ago. Way easier, now that I have Linux shell skillz & a VPS. Five minutes instead of 2 hours.

Movable Type v5.0 will be coming out soon. Currently at » beta-3. I normally install NEW versions of whole-number upgrades, rather than upgrading previous installations. Keeps the number of blog-entries down for a given installation.

Currently have 167 entries on MT 4.x. Lots of entries tend to make the blog respond sluggishly (when rebuilding). That would be » Ye Olde Rad Blog IV. (Started with v2.63 .. in May 2003.)

Considering installing a wiki (software). Can't hurt. Might help. Would be a place (beside the forum) where folks could post & reference their own info/content. Might be a good learning experience, too.

I have no experience with wiki's .. other than searching Wikipedia. Not sure which one would be best. So many choices. Ideas? Saw this comparison. Nigel once recommended Dokuwiki (I think) as a well-coded (PHP-based) piece of software.

The Dokuwiki download is 1.7 MB. (Compare that with the Movable Type download, which is 4.6 MB.) An über comparison of all Wiki's and their features is posted » HERE. Meanwhile Wikipedia, the mother-of-all wiki's, uses MediaWiki, which is both free & Open Source.

Conditional Love = Manipulation

|

An article posted in last week's NY Times has been gnawing at me all weekend. It cites a study performed by two Israelis & a "leading American expert on the psychology of motivation." The single-page piece is titled » "When a Parent's Love Comes with Conditions" .. or » "When 'I Love You' means 'Do as I Say'."

Conditional Love = Manipulation The article can be summed with the following quote:

"The primary message of all types of conditional parenting is that children must earn a parent's love. A steady diet of that, Rogers warned, and children might eventually need a therapist to provide the unconditional acceptance they didn't get when it counted."

Doesn't it seem odd that a study was required to determine that rationing of love & acceptance (like gasoline during a shortage) based on 'performance' .. is detrimental to children? Duh.

First, conditional love is not love. Let's call it by its real name » manipulation. And it's the worst kind of manipulation, cuz children, especially young ones, are at the mercy of their parents.

Moreover, they do not yet possess the skills necessary to recognize and defend against such insidious tactics  .. from people they're so dependent upon (for eveything).

Now, do you know anyone who enjoys being manipulated? Cuz I don't. Heck, even people who enjoy pain don't like being manipulated. Cuz it doesn't really hurt; it just feels slimy. [Speaking of slime & pain, refer to my comments about boiling a frog near the end.]

Not very difficult to tell the difference, either. Kids (who happen to be particularly sensitive) can spot a fake all-the-way across the coffee shop and will turn away .. while gravitating wholeheartedly to the genuine. You can actually observe this play out.

There are many things a parent can use as leverage to encourage (or discourage) a particular behavior. But love should never be included in the leverage toolkit. Same goes for affection & attention .. things too precious to be used as mere bargaining chips.

Withholding love & affection based on behavior is cruel. Sure, it might elicit the desired response .. in the short term. But the child will grow to resent it (.. as does anybody who's being manipulated). Used consistently and frequently enough, it will instill deep-seated feelings of inadequacy .. that may never go away. (You might even know someone like this .. with deformed self-esteem.)

Many times, when a child is acting out, I'd wager it's *because* he or she is not getting the emotional support they need (from a parent). That would be like telling a hungry child » "Stop fussing or I won't give you any food."

[ In the military, we had a saying » "The beatings will continue until morale improves." Same principle. ]

Whichever side of the great nature vs nurture debate you tend to favor, you always return to » the parents .. as the prime causal agent for how a child turns out .. whether it be on count of their genes or their parenting methods (.. or a combination of both).

We were all kids once. (Well, most of us.) So we all have many years of first-hand experience from which to derive our opinions .. of what works, and what doesn't (.. and what really suks). My point is, it's not rocket science.

Reblog this post [with Zemanta]

Changed the type of layout I use on the home page .. to » LIQUID-ELASTIC hybrid. If I did this correctly, you shouldn't notice any difference .. unless you change your default text-size (.. by selecting 'Text Size' from the 'View' menu in IE). Lemme know if you notice any display quirks.

Liquid CSS Web Design LayoutThere are 4 different 'types' of layout designs:

  1. FIXED (column widths remain fixed, no matter what, used » here)
  2. ELASTIC (column widths change with changes to your preferred font-size)
  3. LIQUID (column widths change with changes to browser-window sizing, used » here)
  4. HYBRID (combination of two or more of the above, used »  here)

I've long preferred LIQUID layouts (sometimes called » FLUID), which resize column widths as you resize your browser window (called the "viewport" by those in the biz). It's easier for me to understand the concept behind LIQUID layouts .. than ELASTIC.

Today however, I'm demo'ing a » HYBRID layout .. that combines elements of both LIQUID & ELASTIC. [ If you've read my SCSI guide, you know I'm a fan of hybrid config's. ]

The center section/column remains » LIQUID, while the two sidebars (blue-green colums) are now » ELASTIC. This means they will resize with changes made to your preferred font-size (e.g. » small, medium, large, gigantic, etc.). The center section will continue to change proportionally, as you resize your browser window - just like before.

Resizing your browser window will no longer affect the width of the blue-green sidebars (which are already skinny), while changing your default font-size will not affect the width of the center column/section.

The design itself of the home page has remained unchanged. Only the 'type' of layout has been modified (.. from LIQUID to » LIQUID-ELASTIC hybrid). This new type of page layout is considered more 'accessible' ..

.. especially for those who might have difficulty reading smaller text, and need to bump up their default font-size.

Horrible Dream @ 4:44

|

Horrible dream last night. The digital clock on my nightstand read 4:44 (in big green numbers) when I woke .. feeling like I'd just finished running a marathon. Nothing like starting the day exhausted & covered in sweat.

Amusement ParkHaven't had a dream where I lose the Bug in more than a year. But they're the most terrifying.

We were at an amusement park (in my dream) .. riding this thing that goes around & around .. like a wavy roller coaster. (Metaphor for my life?)

As the ride concludes, the Bug says (urgently), "I gotta pee," and runs off, down the ramp .. with a bunch of other kids.

"Wait!" I shout. But his belongings are scattered around the cart we rode in. I quickly gather them up before hurrying after him.

He couldn't have gotten very far, but I lost sight. Lots of kids his age are scurrying about (happily). Soon as I exit the building, I see it's early evening. Warm & almost dark, but the grounds are well-lit.

As I call out for him, a boy tugs on my shirt sleeve and points to a man standing near the entrance to the ride we just came off. "Did you lose a boy?" he asks. "We have him upstairs." Immediately I'm relieved. Seems like a very nice guy.

As a side note, in my other dreams where I lose the Bug (at a campground, for example, out in the woods), I always go "upstairs" to try to find him (.. to a rec room located above the cafeteria at the campground).

But once I get there, I always find people who seem to know something, but refuse to say anything, or pretend not to know.

So this normal-looking guy takes me up to the second floor .. to a circular room directly above the ride on which we just rode.

We have to push a few boxes out of the way to get there. I think nothing of this (in my dream) .. nothing strange. I'm just looking forward to getting the Bug back. Nothing else matters.

Seems to be some kind of administrative offices up there. (It's always the second floor of a 2-story building where people tell me he is.)

When we get up there, the guy stops at his desk and pulls open a sliding shelf near the floor and takes out some toys to show me. But I don't want to see any of his stupid toys.

Then it sounds like he's trying to make some kind of deal with me. I look around and notice the place seems more like a storage area than an office (lots of boxes piled everywhere). My patience quickly expires. "Take me to my son, now!" I interrupt, shouting.

First Father/Son Bike Ride

|

Embarked on my first-ever father/son bike ride with the Bug yesterday. We took a leisurely trip around the Back Bay (here in Newport Beach), a popular path where few cars travel. Gorgeous day, too.

Father Son Bike RideHis little bike still has training wheels. A bigger one* sits waiting in the garage, but he refuses to ride anything without training wheels. (* Miss Julie picked it up for him in Laguna last month.)

I'm in decent shape .. seeing I've been biking everywhere .. since my license was suspended in June. So my legs feel strong.

The Back Bay loop is 10 miles. So I expected the Bug to be tired afterwards. Surprised me when he insisted on hitting the trampoline soon as we returned.

Used to be I could tire him with a full day of outdoor activity. That doesn't seem to be working so well anymore. Ever since he turned 4 .. he's become impervious. I'm the one who usually tires first.

Speaking of tiring .. last night I slept better than I have in months. Been dragging all day today .. even after a triple-espresso this morning. I made some puttanesca for lunch today. That usually helps. (Carb-loading.)

The loop is mostly flat but has one big down-hill. Made me smile to hear him yelling, "Woo-hoo!" all the way. "That was cool, dad!"

Microsoft Fears Linux

|

I'm reluctant to republish the content of others (as so many sites already do), but .. I found it interesting & noteworthy that » Microsoft has acknowledged Linux as a threat .. especially since I spent so many hours in Linux these past few weeks (learning the Unix shell)

Linux PenguinCopy-n-paste snippet (minor Rad-editing for brevity):

"Microsoft acknowledges Linux as the first viable competitor to its Windows client business, due to the use of Linux on netbooks, which are rising in prominence as an alternative to full-sized notebooks.

Microsoft cited Red Hat and Canonical -- the latter of which maintains the Ubuntu Linux distribution -- as competitors to its client business, which includes the desktop version of its Windows OS." </snippet>

Notice how the article said » DESKTOP, and not server. Linux has long been a dominant force in the server market (.. if not the dominant force).

It's difficult to describe why Linux is so cool .. why using it feels so fresh & clean. But I think it has something to do with the good intentions .. that come from thousands of talented programmers donating their time & expertise .. to bring you (for free) an operating system they obviously believe in.

I might be imagining it, but I think you can actually feel these good intentions (while using Linux). Can you feel the difference (in intentions) between someone who genuinely loves you, and someone who is paid to love you?

Moreover, I feel our economy has a lot to do with the Linux threat to the Microsoft desktop. No matter how compelling the product, basic economics suggest it's hard to compete with free. (Which Windows is not.) And in these troubled economic times, free means more than it used to.

Find recent content on the main index or look in the archives to find all content.