Stanley Yelnats the Third was an unsuccessful but optimistic inventor, trying to create a cure for foot odor.
His obsession with smelly shoes - and finding the cure for the smell - didn't help Stanley IV's case dealing with Clyde Livingston's stolen shoes. And the fact that Stanley IV was an avid Sweetfeet fan added to Stanley's apparent culpability.
Stanley II had a good relationship with his family, though annoying and worrying his wife because the entire apartment stunk of stinky feet. He had a very bad relationship with the landlord because of the smell, and they were threatened with eviction. "Thees whole floor smells like steenky feet!". In a scene where Stanley IV is reading the note his mom sent, Stanley III and the landlord were arguing in the kitchen, "Sir, you are an insult to the chemistry of smell!" And he took the complaint form and tossed it into a pot of boiling sneakers.
One of the humorous moments in the courtroom was when Judge Austin Gorg called, "Stanley Yelnats, please rise." All 3 Stanley Yelnats' rose. (Sigh) "Stanley Yelnats the Fourth."
Stanley III "Learned from failure." He never gave up, he kept trying, but he needed something that Madame Zeroni's curse prevented - good luck.
That same night, when Stanley III was preparing yet another batch of foot deodorizer, he accidentally dropped a small amount of onions into the batch, which included boiled peaches.
He sighed, and pulled the shoe he'd been boiling out of the bubbling pot, and took a sniff.
He stopped cold, then took another sniff.
It can't be! Could it?!
Stunned, he took the shoe to his wife Tiffany Yelnats, who was eating dinner. After a nearly breathless Stanley begged her to smell the shoe `One million and one' more times, she gave up, sniffed the shoe, and returned to her meal, not having smelled anything.
When her eyes flew open in shock, she whispered that she didn't smell anything.
Peaches and onions was the secret!!
With that new successful batch, the next morning, Stanley III brought it to the patent office, and successfully marketed it! They had enough money to finally hire a lawyer to get Stanley IV out of Green Lake.
The Warden (Louise Walker), Mr. Sir (Marion Sevillo), and Dr. Pendanski were arrested for numerous crimes: running the camp against Texas legal codes, using the kids as slave labor, Mr. Sir for violating parole and carrying a weapon, and Pendanski impersonating a doctor. The camp was placed under the Texas judicial system's jurisdiction. Stanley and Hector left with Stanley's lawyer, Ms. Morengo.
At the Yelnats apartment, Stanley III busted the 100+ year-old lock with bolt-cutters - impressing Mrs. Yelnats "You are so strong!" - revealing the Yelnats' family fortune. Millions of dollars worth of ancient stocks.
Afterwards, with their fortune - and their luck restored - they moved out of the apartment, and bought a mansion... right next to the mansion owned by Hector and his mom.
At a giant pool party, with all of the boys from D-Tent, Stanley III was grilling hot dogs for the D-Tent boys when Tiffany screamed for all of them, "It's on!! It's on!! Book it out!!!"
Stanley III was played by Henry Winkler - known throughout the 70s and 80s as `Happy Days' most prominent greaser, Arthur "The Fonz" Fonzarelli (http://happydays.wikia.com/wiki/Arthur_%22Fonzie_/_The_Fonz%22_Fonzarelli). In the film he is portrayed by Henry Winkler.