Goldfinger

***Goldfinger*** is a 1964 spy film and the third installment in the *James Bond* series produced by Eon Productions, starring Sean Connery as the fictional MI6 agent James Bond. It is based on the 1959 novel of the same name by Ian Fleming. The film also stars Honor Blackman as Bond girl Pussy Galore and Gert Fröbe as the title character Auric Goldfinger, along with Shirley Eaton as the iconic Bond girl Jill Masterson. *Goldfinger* was produced by Albert R. Broccoli and Harry Saltzman and was the first of four Bond films directed by Guy Hamilton.

The film's plot has Bond investigating gold smuggling by gold magnate Auric Goldfinger and eventually uncovering Goldfinger's plans to contaminate the United States Bullion Depository at Fort Knox. *Goldfinger* was the first Bond blockbuster, with a budget equal to that of the two preceding films combined. Principal photography took place from
January to July 1964 in the United Kingdom, Switzerland and the United States.

*Goldfinger* was heralded as the film in the franchise where James Bond "comes into focus". Its release led to a number of promotional licensed
tie-in items, including a toy Aston Martin DB5 car from Corgi Toys which became the biggest selling toy of 1964. The promotion also included an image of gold-painted Eaton on the cover of *Life*.

Many of the elements introduced in the film appeared in many of the later James Bond films, such as the extensive use of technology and gadgets by Bond, an extensive pre-credits sequence that stood largely alone from the main storyline, multiple foreign locales and tongue-in-cheek humour. *Goldfinger* was the first Bond film to win an Oscar (for Best Sound Editing) and opened to largely favourable critical reception. The film was a financial success, recouping its budget in two weeks and grossing over $120 million worldwide.

In 1999, it was ranked No. 70 on the BFI Top 100 British films list compiled by the British Film Institute.

## Plot

 File:An UH-1 Iroquois helicopter flies over the US Gold Bullion Depository.jpg
After destroying a drug laboratory in Latin America, MI6 agent James Bond vacations in Miami Beach. His superior, M, via CIA agent Felix Leiter, directs Bond to observe bullion dealer Auric Goldfinger at the hotel there. Bond discovers Goldfinger cheating at a high-stakes gin rummy game, aided remotely by his employee, Jill Masterson, who prompts him using binoculars and a one-way radio. Bond interrupts Jill and then blackmails Goldfinger into losing. After a night with Jill, Bond is knocked out by Goldfinger's Korean manservant Oddjob. Bond comes round to find Jill dead, covered in gold paint, having died from "skin suffocation".

In London, the governor of the Bank of England and M tell Bond that varying gold prices are allowing someone to profit by selling bullion internationally. Bond's objective is determining how Goldfinger smuggles gold across countries' borders. Q supplies Bond with a modified Aston Martin DB5 and two tracking devices. Bond meets Goldfinger at his country club in Kent and plays a round of golf with him, wagering a bar of recovered Nazi gold (provided by MI6) against £5,000 of Goldfinger's money. Goldfinger attempts to cheat, but Bond tricks him into losing the last hole and the match. Goldfinger warns Bond against interfering in his affairs, and Oddjob demonstrates his own formidable strength and the lethality of the steel-rimmed hat he wears. Bond trails Goldfinger to Switzerland. There, Bond meets Jill's sister, Tilly, who attempts and fails to assassinate Goldfinger.

Bond sneaks into Goldfinger's refinery and overhears him telling a Chinese nuclear physicist, Ling, that he incorporates gold into the bodywork of his Rolls-Royce Phantom III in order to smuggle it out of England. Bond also overhears Goldfinger mention "Operation Grand Slam." Leaving, Bond encounters Tilly, who again tries to kill Goldfinger. An alarm is tripped and Oddjob kills Tilly with his lethal hat. Bond is captured and strapped to a table with an overhead industrial laser, the beam slicing through the surface toward him. Bond lies to Goldfinger, saying that MI6 knows about Operation Grand Slam. Goldfinger spares Bond's life so the MI6 agents surveilling the compound can see him and think 007 is safe.

Pilot Pussy Galore flies the captive Bond to Goldfinger's stud farm near Louisville, Kentucky in a private jet. Once there, Bond escapes his cell and witnesses Goldfinger's meeting with American mafiosi, who are supplying materials needed for Operation Grand Slam. Goldfinger plans to breach the U.S. Bullion Depository at Fort Knox by releasing delta-9 nerve gas into the atmosphere, killing the personnel. The mobsters ridicule Goldfinger's scheme, particularly a Mr Solo who demands to be paid immediately before the others are gassed to death by Goldfinger. Bond is captured by Pussy Galore, but attempts to alert the CIA by planting a homing device in Solo's pocket as he leaves. Unfortunately, Solo is killed by Oddjob and his body destroyed in a car crusher along with the homing device.

Bond tells Goldfinger it would be impossible to move that much gold before American military forces intervened. Goldfinger hints he is not intending to steal it, and Bond deduces that Goldfinger plans to detonate a dirty bomb inside the vault to irradiate the gold, contaminating it with radiation for over half a century. Goldfinger's own gold will then increase in value and the Chinese gain an advantage from the resulting economic chaos. Goldfinger warns that any attempt to locate the bomb or interfere will result in the bomb being detonated at another vital U.S. location.

Operation Grand Slam launches with Pussy Galore's Flying Circus spraying gas over Fort Knox, seemingly killing the military guards and government personnel, including Felix Leiter. Goldfinger's private army breaks into Fort Knox and accesses the vault as Goldfinger arrives in a helicopter with the bomb. In the vault, Goldfinger's henchman, Kisch, handcuffs Bond to the bomb. Unbeknownst to Goldfinger, Bond seduced Pussy and convinced her to alert the American authorities, after which the gas was replaced with a harmless substance. As the troops attack Goldfinger's men, he locks the vault. He removes his coat to reveal a U.S. Army colonel's uniform and escapes.

Bond, Oddjob, and Kisch are trapped inside the vault. Kisch attempts to disarm the bomb, but Oddjob, loyal to Goldfinger, throws him to his death. Bond frees himself, but the physically stronger Oddjob batters him before he can stop the bomb. Bond electrocutes Oddjob to death, then forces open the cabinet containing the bomb but he is unable to disarm the complex mechanism. After killing Goldfinger's men, U.S. troops open the vault. An atomic specialist rushes in and, with seven seconds left on the countdown clock, simply turns off the device.

Later, Bond is being flown to the White House for lunch with the president. En route with Pussy, Goldfinger hijacks the plane. In a struggle for Goldfinger's revolver, the gun discharges through a window and creates an explosive decompression. Goldfinger is blown out through the ruptured window. With the plane out of control, Bond and Pussy parachute safely from the aircraft before it crashes. Some time after, Leiter's search helicopter passes over the pair, who have landed in a wood. Bond declares: "this is no time to be rescued", and draws the parachute over himself and Galore.

## Cast

* Sean Connery as James Bond (007): An MI6 agent who is sent to investigate Auric Goldfinger. Connery reprised the role of Bond for the third time in a row. His salary rose, but a pay dispute later broke out during filming. After he suffered a back injury when filming the scene where Oddjob knocks Bond unconscious in Miami, the dispute was settled: Eon and Connery agreed to a deal where the actor would receive 5% of the gross of each Bond film he starred in.
* Honor Blackman as Pussy Galore: Goldfinger's personal pilot and leader of an all-female team of pilots known as Pussy Galore's Flying Circus. Blackman was selected for the role of Pussy Galore because of her role in *The Avengers* and the script was rewritten to show Blackman's judo abilities. The character's name follows in the tradition of other Bond girls names that are double entendres. Concerned about censors, the producers thought about changing the character's name to "Kitty Galore", but they and Hamilton decided "if you were a ten-year old boy and knew what the name meant, you weren't a ten-year old boy, you were a dirty little bitch. The American censor was concerned, but we got round that by inviting him and his wife out to dinner and [told him] we were big supporters of the Republican Party." During promotion, Blackman took delight in embarrassing interviewers by repeatedly mentioning the character's name.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Whilst the American censors did not interfere with the name in the film, they refused to allow the name "Pussy Galore" to appear on promotional materials and for the US market she was subsequently called "Miss Galore" or "Goldfinger's personal pilot".
* Gert Fröbe as Auric Goldfinger: A wealthy, psychopathic man obsessed with gold. Orson Welles was considered as Goldfinger, but his financial demands were too high;**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Theodore Bikel auditioned for the role, but failed.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Fröbe was cast because the producers saw his performance as a child molester in the German film *Es geschah am hellichten Tag*. Fröbe, who spoke little English, said his lines phonetically, but was too slow. To redub him, he had to double the speed of his performance to get the right tempo. The only time his real voice is heard is during his meeting with members of the Mafia at Auric Stud. Bond is hidden below the model of Fort Knox whilst Fröbe's natural voice can be heard above. However, he was redubbed for the rest of the film by TV actor Michael Collins.
* Shirley Eaton as Jill Masterson: Bond Girl and Goldfinger's aide-de-camp, whom Bond catches helping the villain cheat at a game of cards. He seduces her, but for her betrayal, she is completely painted in gold paint and, according to Bond, dies from "skin suffocation". Eaton was sent by her agent to meet Harry Saltzman and agreed to take the part if the nudity was done tastefully. It took an hour and a half to apply the paint to her body. Although only a small part in the film, the image of her painted gold was renowned and Eaton appeared on the cover of *Life* magazine on 6 November 1964.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**
* Tania Mallet as Tilly Masterson: The sister of Jill Masterson, she is on a vendetta to avenge her sister, but is killed by Oddjob.
* Harold Sakata as Oddjob: Goldfinger's lethal Korean manservant. Director Guy Hamilton cast Sakata, an Olympic silver medalist weightlifter, as Oddjob after seeing him on a wrestling programme. Hamilton called Sakata an "absolutely charming man", and found that "he had a very unique way of moving, [so] in creating Oddjob I used all of Harold's own characteristics".**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Sakata was badly burned when filming his death scene, in which Oddjob was electrocuted by Bond. Sakata, however, kept holding onto the hat with determination, despite his pain, until the director called "Cut!" Oddjob has been described as "a wordless role, but one of cinema's great villains."
* Bernard Lee as M: 007's boss and head of the British Secret Service.
* Martin Benson as Mr Solo: The lone gangster who refuses to take part in Operation Grand Slam and is later killed by Oddjob.
* Cec Linder as Felix Leiter: Bond's CIA liaison in the United States. Linder was the only actor actually on location in Miami.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Linder's interpretation of Leiter was that of a somewhat older man than the way the character was played by Jack Lord in *Dr. No*; in reality, Linder was a year younger than Lord. According to screenwriter Richard Maibaum, Lord demanded co-star billing, a bigger role and more money to reprise the Felix Leiter role in *Goldfinger* that led the producers to recast the role. At the last minute, Cec Linder switched roles with Austin Willis who played cards with Goldfinger.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**
* Austin Willis as Mr Simmons: Goldfinger's gullible gin rummy opponent in Miami.
* Lois Maxwell as Miss Moneypenny.
* Bill Nagy as Mr Midnight: The gangster whose contributions Goldfinger says helped smuggle the nerve gas across the Canadian border. He initially complains that New York and West Coast mafiosi were also participating, and is the first one to remind Goldfinger that he was specifically promised $1 million.
* Michael Mellinger as Kisch: Goldfinger's secondary and quiet henchman and loyal lieutenant who leads his boss's false Army convoy to Fort Knox.
* Nadja Regin as Bonita: dancer who sets a trap for Bond in the pre-credit sequence.
* Richard Vernon as Colonel Smithers: the Bank of England official.
* Burt Kwouk as Mr Ling: A Communist Chinese nuclear fission specialist who provides Goldfinger with the dirty bomb to irradiate the gold inside Fort Knox.
* Desmond Llewelyn as Q: The head of Q-Branch, he supplies 007 with a modified Aston Martin DB5. Hamilton told Llewelyn to inject humour into the character, thus beginning the friendly antagonism between Q and Bond that became a hallmark of the series.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** He had already appeared in the previous Bond film *From Russia with Love* and, with the exception of *Live and Let Die*, would continue to play Q in the next 16 Bond films.
* Margaret Nolan as Dink: Bond's masseuse from the Miami hotel sequence. Nolan also appeared as the gold-covered body in advertisements for the film and in the opening title sequence as the golden silhouette, described as "Gorgeous, iconic, seminal".**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**
* Gerry Duggan as Hawker: Bond's golf caddy.

## Production

### Development

While *From Russia With Love* was in production, Richard Maibaum began working on the script for *On Her Majesty's Secret Service* as the intended next film in the series, but with the release date set for September 1964 there was not enough time to prepare for location shooting in Switzerland and that adaptation was put on hold. With the court case between Kevin McClory and Fleming surrounding *Thunderball* still in the High Court, producers Albert R. Broccoli and Harry Saltzman turned to *Goldfinger* as the third Bond film.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** *Goldfinger* had what was then considered a large budget of $3 million (US$Template:Inflation million in Template:Inflation-year dollarsTemplate:Inflation-fn), the equivalent of the budgets of *Dr. No* and *From Russia with Love* combined, and was the first Bond film classified as a box-office blockbuster. *Goldfinger* was chosen with the North American cinema market in mind, as the previous films had concentrated on the Caribbean and Europe.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**

Terence Young, who directed the previous two films, chose to film *The Amorous Adventures of Moll Flanders* instead, after a pay dispute that saw him denied a percentage of the film's profits.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Broccoli and Saltzman turned instead to Guy Hamilton to direct. Hamilton, who had turned down directing *Dr. No*,**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** felt that he needed to make Bond less of a "superman" by making the villains seem more powerful.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Hamilton knew Fleming, as both were involved during intelligence matters in the Royal Navy during World War II.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** *Goldfinger* saw the return of two crew members who were not involved with *From Russia with Love*: stunt coordinator Bob Simmons and production designer Ken Adam. Both played crucial roles in the development of *Goldfinger*, with Simmons choreographing the fight sequence between Bond and Oddjob in the vault of Fort Knox, which was not just seen as one of the best Bond fights, but also "must stand as one of the great cinematic combats"**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** whilst Adam's efforts on *Goldfinger* were "luxuriantly baroque" and have resulted in the film being called "one of his finest pieces of work".**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**

### Writing

Richard Maibaum, who co-wrote the previous films, returned to adapt the seventh Bond novel. Maibaum fixed the novel's heavily criticised plot hole, where Goldfinger actually attempts to empty Fort Knox. In the film, Bond notes it would take twelve days for Goldfinger to steal the gold, before the villain reveals he actually intends to irradiate it with the then topical concept of a Red Chinese atomic bomb.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** However, Harry Saltzman disliked the first draft as being "too American," and brought in Paul Dehn to revise it.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Hamilton said Dehn "brought out the British side of things".**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Connery disliked his draft, so Maibaum returned.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Dehn also suggested the pre-credit sequence be an action scene with no relevance to the actual plot. Maibaum, however, based the pre-credit sequence on the opening scene of the novel, where Bond is waiting at Miami Airport contemplating his recent killing of a Latin American drug smuggler.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Wolf Mankowitz, an un-credited screenwriter on *Dr. No*, suggested the scene where Oddjob puts his car into a car crusher to dispose of Mr. Solo's body. Because of the quality of work of Maibaum and Dehn, the script and outline for *Goldfinger* became the blueprint for future Bond films.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**

### Filming

Principal photography commenced on 20 January 1964 in Miami Beach, Florida, at the Fontainebleau Hotel; the crew was small, consisting only of Hamilton, Broccoli, Adam and cinematographer Ted Moore. Connery never travelled to Florida to film because he was shooting *Marnie* elsewhere in the United States. On the DVD audio commentary, director Hamilton states that other than Linder, who played Felix Leiter, none of the main actors in the Miami sequence were actually there. Connery, Fröbe, Eaton, Nolan, who played Dink, and Willis, who played Goldfinger's card victim, all filmed their parts on a soundstage at Pinewood Studios when filming moved. Miami also served as location to the scenes involving Leiter's pursuit of Oddjob.

After five days in the US,**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** production returned to England. The primary location was Pinewood Studios, home to, among other sets, a recreation of the Fontainebleau, the South American city of the pre-title sequence and both Goldfinger's estate and factory.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Three places near the studio were used: Black Park for the car chase involving Bond's Aston Martin and Goldfinger's henchmen inside the factory complex, RAF Northolt for the American airports and Stoke Park Club for the golf club scene.

The end of the chase, when Bond's Aston Martin crashes into a wall because of the mirror, as well as the chase immediately preceding it, were filmed on the road at the rear of Pinewood Studios Sound Stages A and E and the Prop Store. The road is now called Goldfinger Avenue. Southend Airport was used for the scene where Goldfinger flies to Switzerland. Ian Fleming visited the set of *Goldfinger* in April 1964; he died a few months later in August 1964, shortly before the film's release. The second unit filmed in Kentucky, and these shots were edited into scenes filmed at Pinewood.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**

 File:ETH-BIB Goldfinger 1964 – Com C13-035-007.jpg
Principal photography then moved to Switzerland, with the car chase being filmed at the small curved roads near Realp, the exterior of the Pilatus Aircraft factory in Stans serving as Goldfinger's factory, and Tilly Masterson's attempt to snipe Goldfinger being shot in the Furka Pass. Filming wrapped on 11 July at Andermatt, after nineteen weeks of shooting. Just three weeks prior to the film's release, Hamilton and a small team, which included Broccoli's stepson and future producer Michael G. Wilson as assistant director, went for last-minute shoots in Kentucky. Extra people were hired for post-production issues such as dubbing so the film could be finished in time.

Broccoli earned permission to film in the Fort Knox area with the help of his friend, Lt. Colonel Charles Russhon. To shoot Pussy Galore's Flying Circus gassing the soldiers, the pilots were only allowed to fly above 3,000 feet. Hamilton recalled this was "hopeless", so they flew at about 500 feet, and "the military went absolutely ape". The scenes of people fainting involved the same set of soldiers moving to different locations.

For security reasons, filming and photography were not allowed near or inside the United States Bullion Depository. All sets for the interiors of the building were designed and built from scratch at Pinewood Studios. The filmmakers had no clue as to what the interior of the depository looked like, so Ken Adam's imagination provided the idea of gold stacked upon gold behind iron bars.

Adam later told UK daily newspaper *The Guardian*: "No one was allowed in Fort Knox but because [producer] Cubby Broccoli had some good connections and the Kennedys loved Ian Fleming's books I was allowed to fly over it once. It was quite frightening – they had machine guns on the roof. I was also allowed to drive around the perimeter but if you got out of the car there was a loudspeaker warning you to keep away. There was not a chance of going in it, and I was delighted because I knew from going to the Bank of England vaults that gold isn't stacked very high and it's all underwhelming. It gave me the chance to show the biggest gold repository in the world as I imagined it, with gold going up to heaven. I came up with this cathedral-type design. I had a big job to persuade Cubby and the director Guy Hamilton at first."

Saltzman disliked the design's resemblance to a prison, but Hamilton liked it enough that it was built.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** The comptroller of Fort Knox later sent a letter to Adam and the production team, complimenting them on their imaginative depiction of the vault. United Artists even had irate letters from people wondering "how could a British film unit be allowed inside Fort Knox?"**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Adam recalled, "In the end I was pleased that I wasn't allowed into Fort Knox, because it allowed me to do whatever I wanted." In fact, the set was deemed so realistic that Pinewood Studios had to post a 24-hour guard to keep the gold bar props from being stolen. Another element which was original was the atomic device, for which Hamilton requested the special effects crew get inventive instead of realistic. Technician Bert Luxford described the end result as looking like an "engineering work", with a spinning engine, a chronometer and other decorative pieces.

### Effects

Template:See also

 File:DB5-2.jpg
"Before [*Goldfinger*], gadgets were not really a part of Bond's world," Hamilton remarked. Production designer Ken Adam chose the DB5 because it was the latest version of the Aston Martin (in the novel Bond drove a DB Mark III, which he considered England's most sophisticated car). The company was initially reluctant, but was finally convinced to make a product placement deal. In the script, the car was armed only with a smoke screen, but every crew member began suggesting gadgets to install in it: Hamilton conceived the revolving license plate because he had been getting many parking tickets, while his stepson suggested the ejector seat (which he saw on television).**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** A gadget near the lights that would drop sharp nails was replaced with an oil dispenser because the producers thought the original could be easily copied by viewers. Adam and engineer John Stears overhauled the prototype of the Aston Martin DB5 coupe, installing these and other features into a car over six weeks. The scene where the DB5 crashes was filmed twice, with the second take being used in the film. The first take, in which the car drives through the fake wall, can be seen in the trailer. Two of the gadgets were not installed in the car: the wheel-destroying spikes, inspired by *Ben-Hur*'s scythed chariots, were entirely made in-studio; and the ejector seat used a seat thrown by compressed air, with a dummy sitting atop it. Another car without the gadgets was created, which was eventually furnished for publicity purposes. It was reused for *Thunderball*.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**

Lasers did not exist in 1959 when the book was written, nor did high-power industrial lasers at the time the film was made, making them a novelty. In the novel, Goldfinger uses a circular saw to try to kill Bond, but the filmmakers changed it to a laser to make the film feel fresher.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Hamilton immediately thought of giving the laser a place in the film's story as Goldfinger's weapon of choice. Ken Adam was advised on the laser's design by two Harvard scientists who helped design the water reactor in *Dr No*.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** The laser beam itself was an optical effect added in post-production. For close-ups where the flame cuts through metal, technician Bert Luxford heated the metal with a blowtorch from underneath the table to which Bond was strapped.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**

The model jet used for wide shots of Goldfinger's Lockheed JetStar was painted differently on the right side to be used as the presidential plane that crashes at the film's end.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Several cars were provided by the Ford Motor Company including a Mustang that Tilly Masterson drives, a Ford Country Squire station wagon used to transport Bond from the airport to the stud ranch, a Ford Thunderbird driven by Felix Leiter, and a Lincoln Continental in which Oddjob kills Solo. The Continental had its engine removed before being placed in a car crusher, and the destroyed car had to be partially cut so that the bed of the Ford Falcon Ranchero in which it was deposited could support the weight.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**

### Opening sequence

The opening credit sequence was designed by graphic artist Robert Brownjohn, featuring clips of all James Bond films thus far projected on Margaret Nolan's body. Its design was inspired by seeing light projecting on people's bodies as they got up and left a cinema.

 File:Shirley Eaton as Jill Masterson in Goldfinger.jpg
Visually, the film uses many golden motifs, reflecting the novel's treatment of Goldfinger's obsession with the metal. All of Goldfinger's female henchwomen in the film except his private jet's co-pilot (black hair) and stewardess (who is Korean) are red-blonde, or blonde, including Pussy Galore and her Flying Circus crew (both the characters Tilly Masterson and Pussy specifically have black hair in the novel). Goldfinger has a yellow-painted Rolls-Royce with number plate "AU 1" (*Au* being the chemical symbol for gold), and also sports yellow or golden items or clothing in every film scene, including a golden pistol, when disguised as a colonel. Jill Masterson is famously killed by being painted with gold, which according to Bond causes her to die of "skin suffocation". (An entirely fictional cause of death, but the iconic scene caused much of the public to accept it as a medical fact. An urban legend circulated that the scene was inspired by a Swiss model who accidentally died the same way, while preparing for a photo shoot.) Bond is bound to a cutting bench with a sheet of gold on it (as Goldfinger points out to him) before nearly being lasered. Goldfinger's factory henchmen in the film wear yellow sashes, Pussy Galore twice wears a metallic gold vest, and Pussy's pilots all wear yellow sunburst insignia on their uniforms. Goldfinger's Jetstar hostess, Mei-Lei, wears a golden bodice and gold-accented sarong. The concept of the recurring gold theme running through the film was a design aspect conceived and executed by Ken Adam and art director Peter Murton.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**

## Music

*Main article: Goldfinger (soundtrack)*
Since the release date for the film had been pre-determined and filming had finished close to that date, John Barry scored some sequences to rough, non-final versions of the sequences.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Barry described his work in *Goldfinger* as a favourite of his, saying it was "the first time I had complete control, writing the score and the song". The musical tracks, in keeping with the film's theme of gold and metal, make heavy use of brass, and also metallic chimes. The film's score is described as "brassy and raunchy" with "a sassy sexiness to it".**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**

*Goldfinger* began the tradition of Bond theme songs introduced over the opening title sequence, the style of the song from the pop genre and using popular artists.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** (Although the title song, sung by Matt Monro, in *From Russia with Love* was introduced in a few phrases on Bond's first appearance, a full rendition on the soundtrack only commenced for the final scene on the waters at Venice and through the following end titles.) Shirley Bassey established the opening title tradition giving her distinguished style to "Goldfinger", and would sing the theme songs for two future Bond films, *Diamonds are Forever* and *Moonraker*. The song *Goldfinger* was composed by John Barry, with lyrics by Anthony Newley and Leslie Bricusse. The track features a young Jimmy Page, who was doing many sessions at the time. The lyrics were described in one contemporary newspaper as "puerile", but what remained undisturbed was the Shirley Bassey interpretation world impact. Like the score, the arrangement makes heavy use of brass, meeting well Miss Bassey's signature belting, and incorporates the Bond theme from *Dr. No*. Newley recorded the early versions, which were even considered for inclusion in the film. The soundtrack album topped the *Billboard* 200 chart,**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** and reached 14th place in the UK Albums Chart. The single for "Goldfinger" was also successful, reaching 8th in the *Billboard* Hot 100 and 21st in the UK charts.

## Release and reception

*Goldfinger* premiered at the Odeon Leicester Square in London on 17 September 1964, with general release in the United Kingdom the following day. Leicester Square was packed with sightseers and fans and police were unable to control the crowd. A set of glass doors to the cinema was accidentally broken and the premiere was shown ten minutes late because of the confusion. The United States premiere occurred on 21 December 1964, at the DeMille Theatre in New York. The film opened in 64 cinemas across 41 cities and eventually peaked at 485 screens.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** *Goldfinger* was temporarily banned in Israel because of Gert Fröbe's connections with the Nazi Party. The ban, however, was lifted many years later when a Jewish family publicly thanked Fröbe for protecting them from persecution during World War II.

### Promotion

 File:1964 Corgi Aston Martin DB5.jpg
The film's marketing campaign began as soon as filming started in Florida, with Eon allowing photographers to enter the set to take pictures of Shirley Eaton painted in gold. Robert Brownjohn, who designed the opening credits, was responsible for the posters for the advertising campaign, which also used actress Margaret Nolan. To promote the film, the two Aston Martin DB5s were showcased at the 1964 New York World's Fair and it was dubbed "the most famous car in the world";**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** consequently, sales of the car rose.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Corgi Toys began its decades-long relationship with the Bond franchise, producing a toy of the car, which became the biggest selling toy of 1964.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** The film's success also led to licensed tie-in clothing, dress shoes, action figures, board games, jigsaw puzzles, lunch boxes, toys, record albums, trading cards and slot cars.

### Critical response

Derek Prouse of *The Sunday Times* said of *Goldfinger* that it was "superbly engineered. It is fast, it is most entertainingly preposterous and it is exciting."

The reviewer from *The Times* said "All the devices are infinitely sophisticated, and so is the film: the tradition of self-mockery continues, though at times it over-reaches itself", also saying that "It is the mixture as before, only more so: it is superb hokum." Connery's acting efforts were overlooked by this reviewer, who did say: "There is some excellent bit-part playing by Mr. Bernard Lee and Mr. Harold Sakata: Mr. Gert Fröbe is astonishingly well cast in the difficult part of Goldfinger." Donald Zec, writing for the *Daily Mirror*, said of the film that "Ken Adam's set designs are brilliant; the direction of Guy Hamilton tautly exciting; Connery is better than ever, and the titles superimposed on the gleaming body of the girl in gold are inspired."

Penelope Gilliatt, writing in *The Observer*, said that the film had "a spoofing callousness" and that it was "absurd, funny and vile". *The Guardian* said that *Goldfinger* was "two hours of unmissable fantasy", also saying that the film was "the most exciting, the most extravagant of the Bond films: garbage from the gods", adding that Connery was "better than ever as Bond". Alan Dent, writing for *The Illustrated London News*, thought *Goldfinger* "even tenser, louder, wittier, more ingenious and more impossible than '*From Russia with Love*'... [a] brilliant farrago", adding that Connery "is ineffable".

Philip Oakes of *The Sunday Telegraph* said that the film was "dazzling in its technical ingenuity", while *Time* said that "this picture is a thriller exuberantly travestied." Bosley Crowther, writing in *The New York Times* was less enthusiastic about the film, saying that it was "tediously apparent" that Bond was becoming increasingly reliant on gadgets with less emphasis on "the lush temptations of voluptuous females", although he did admit that "Connery plays the hero with an insultingly cool, commanding air." He saved his praises for other actors in the film, saying that "Gert Fröbe is aptly fat and feral as the villainous financier, and Honor Blackman is forbiddingly frigid and flashy as the latter's aeronautical accomplice."

In *Guide for the Film Fanatic*, Danny Peary wrote that *Goldfinger* is "the best of the James Bond films starring Sean Connery ... There's lots of humor, gimmicks, excitement, an amusing yet tense golf contest between Bond and Goldfinger, thrilling fights to the death between Bond and Oddjob and Bond and Goldfinger, and a fascinating central crime ... Most enjoyable, but too bad Eaton's part isn't longer and that Fröbe's Goldfinger, a heavy but nimble intellectual in the Sydney Greenstreet tradition, never appeared in another Bond film."**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Roger Ebert of the *Chicago Sun Times* declared this to be his favourite Bond film and later added it to his "Great Movies" list.

The film review aggregator Rotten Tomatoes gives a 99% rating and an average score of 8.6/10 based on 69 reviews. The website's consensus reads, "*Goldfinger* is where James Bond as we know him comes into focus – it features one of 007's most famous lines ('A martini. Shaken, not stirred') and a wide range of gadgets that would become the series' trademark". *Goldfinger* is the highest-rated Bond film on the site.

### Box office

*Goldfinger*'s $3 million budget was recouped in two weeks, and it broke box office records in multiple countries around the world. The *Guinness Book of World Records* went on to list *Goldfinger* as the fastest grossing film of all time. Demand for the film was so high that the DeMille cinema in New York City had to stay open twenty-four hours a day. The film closed its original box office run with $23 million in the United States**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** and $46 million worldwide. After reissues, the first being a double feature with *Dr. No* in 1966,**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** *Goldfinger* grossed a total of $51,081,062 in the United States and $73,800,000 elsewhere, for a total worldwide gross of $124,900,000.

The film distributor Park Circus re-released *Goldfinger* in the UK on 27 July 2007 at 150 multiplex cinemas, on digital prints. The re-release put the film twelfth at the weekly box office. *Goldfinger* would again receive a re-release in November 2020 in the wake of Connery's death.

### Awards and nominations

At the 1965 Academy Awards, Norman Wanstall won the Academy Award for Best Sound Effects Editing, making *Goldfinger* the first Bond film to receive an Academy Award.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** John Barry was nominated for the Grammy Award for Best Score for a Motion Picture, and Ken Adam was nominated for the British Academy of Film and Television Arts (BAFTA) for Best British Art Direction (Colour), where he also won the award for Best British Art Direction (Black and White) for *Dr. Strangelove*. The American Film Institute has honoured the film four times: ranking it No. 90 for best movie quote ("A martini. Shaken, not stirred"), No. 53 for best song ("Goldfinger"), No. 49 for best villain (Auric Goldfinger), and No. 71 for most thrilling film. In 2006, *Entertainment Weekly* and IGN both named *Goldfinger* as the best Bond film, while MSN named it as the second best, behind its predecessor. IGN and *EW* also named Pussy Galore as the second best Bond girl. In 2008, *Total Film* named *Goldfinger* as the best film in the series. *The Times* placed Goldfinger and Oddjob second and third on their list of the best Bond villains in 2008. They also named the Aston Martin DB5 as the best car in the films.

## Home media

The film was released in 1994 in the US and Europe on Video CD. It was first released on DVD in the US in 1997 by MGM Home Entertainment and in Europe in 2000. 2006 saw the release of the 'Ultimate Edition' DVD, whose video was sourced from a newly-scanned 4K master of the original film. In 2008, *Goldfinger* was made available on Blu-ray Disc.

## Impact and legacy

*Goldfinger*'s script became a template for subsequent Bond films.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** It was the first of the series showing Bond relying heavily on technology,**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** as well as the first to show a pre-credits sequence with only a tangential link to the main story**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**—in this case allowing Bond to get to Miami after a mission. Also introduced for the first of many appearances is the briefing in Q-branch, allowing the viewer to see the gadgets in development.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** The subsequent films in the Bond series follow most of *Goldfinger*'s basic structure, featuring a henchman with a particular characteristic, a Bond girl who is killed by the villain, big emphasis on the gadgets and a more tongue-in-cheek approach, though trying to balance action and comedy.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).****Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).****Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**
Template:Rquote
*Goldfinger* has been described as perhaps "the most highly and consistently praised Bond picture of them all"**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** and after *Goldfinger*, Bond "became a true phenomenon."**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** The success of the film led to the emergence of many other works in the espionage genre and parodies of James Bond, such as The Beatles film *Help!* in 1965**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** and a spoof of Ian Fleming's first Bond novel, *Casino Royale*, in 1967.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Indeed, it has been said that *Goldfinger* was the cause of the boom in espionage films in the 1960s,**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** so much so that in "1966, moviegoers were offered no less than 22 examples of secret agent entertainment, including several blatant attempts to begin competing series, with James Coburn starring as Derek Flint in the film *Our Man Flint* and Dean Martin as *Matt Helm*".

Even within the Bond canon, *Goldfinger* is acknowledged; the 22nd Bond film, *Quantum of Solace*, includes an homage to the gold body paint death scene by having a female character dead on a bed nude, covered in crude oil. Outside the Bond films, elements of *Goldfinger*, such as Oddjob and his use of his hat as a weapon, Bond removing his drysuit to reveal a tuxedo underneath, and the laser scene have been homaged or spoofed in works such as *True Lies*,**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** *The Simpsons*, and the *Austin Powers* series.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** The US television programme *MythBusters* explored many scenarios seen in the film, such as the explosive depressurisation in a plane at high altitudes, the death by full body painting, an ejector seat in a car and using a tuxedo under a drysuit.

The success of the film led to Ian Fleming's Bond novels receiving an increase of popularity and nearly 6 million books were sold in the United Kingdom in 1964, including 964,000 copies of *Goldfinger* alone.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).** Between the years 1962 to 1967 a total of 22,792,000 Bond novels were sold.**Lua error in Module:Footnotes at line 53: attempt to index local 'anchor\_id\_list' (a nil value).**

The 2012 video game *007 Legends* features a level based on *Goldfinger*.

### Accolades

American Film Institute lists

* AFI's 100 Years...100 Thrills: #71
* AFI's 100 Years...100 Heroes and Villains:
	+ Auric Goldfinger: #49 Villain
* AFI's 100 Years...100 Movie Quotes:
	+ "A Martini. Shaken, not stirred.": #90
* AFI's 100 Years...100 Songs:
	+ "Goldfinger": #53
* AFI's 100 Years...100 Movies (10th Anniversary Edition) – Nominated

## See also

**Lua error: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').**

* Outline of James Bond
* BFI Top 100 British films

## References

1. ↑ Goldfinger (1964) (en). British Film Institute.
2. ↑ Golfinger, AFI Catalog American Film Institute. Retrieved March 25, 2022.
3. ↑ 3.0 3.1 3.2 3.3 Production Notes—Goldfinger. MI6.co.uk.
4. ↑ 4.00 4.01 4.02 4.03 4.04 4.05 4.06 4.07 4.08 4.09 4.10 4.11 Template:Cite video
5. ↑ 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 Template:Cite video
6. ↑ 6.0 6.1 6.2 6.3 6.4 6.5 6.6 Template:Cite video
7. ↑ 7.0 7.1 7.2 7.3 7.4 "Bond: The Legend: 1962–2002", *Empire*, pp. 7–9.
8. ↑ Jenkins, Tricia (September 2005). "James Bond's "Pussy" and Anglo-American Cold War Sexuality". *The Journal of American Culture* **28** (3): 309–317. Template:Citation/identifier.
9. ↑ Leistedt, Samuel J.; Linkowski, Paul (January 2014). "Psychopathy and the Cinema: Fact or Fiction?". *Journal of Forensic Sciences* **59** (1): 167–74. Template:Citation/identifier. Template:Citation/identifier.
10. ↑ "Five great non-speaking roles", 28 June 2006.
11. ↑ Goldberg, Lee, "The Richard Maibaum Interview" p. 26, *Starlog* No. 68, March 1983
12. ↑ 12.0 12.1 Field, Matthew (2015). *Some kind of hero : 007 : the remarkable story of the James Bond films*. ISBN 978-0-7509-6421-0.
13. ↑ Goldfinger (1964). *Screenonline*. British Film Institute.
14. ↑ Sutton, Mike. Goldfinger (1964). *Screenonline*. British Film Institute.
15. ↑ 15.0 15.1 15.2 15.3 Template:Cite video
16. ↑ Movie History at Stoke Park. Stoke Park.
17. ↑ Pinewood Studios Map | Pinewood – Film studio facilities & services. Pinewoodgroup.com.
18. ↑ Template:Harvnb. "Nineteen weeks of principal photography ended with location shooting at Andermatt in Switzerland between 7 and 11 July"
19. ↑ 19.0 19.1 19.2 19.3 Template:Cite video
20. ↑ Dee, Johnny. "Licensed to drill", 17 September 2005.
21. ↑ 21.0 21.1 Template:Cite video
22. ↑ Template:Cite video
23. ↑ Template:Cite video
24. ↑ Template:Cite video
25. ↑ "Title Recall", *Empire*, August 2008, p. 84.
26. ↑ Jenkinson, Helena (2017). "Skin Suffocation". *JAMA Dermatology* **153** (8): 744. Template:Citation/identifier. Template:Citation/identifier. Template:Citation/identifier.
27. ↑ Template:Cite magazine
28. ↑ Template:Harvnb. "Gold seems to persuade every scene, giving it a distinct motif that the other films have lacked".
29. ↑ Template:Cite video
30. ↑ Gaskell, Jane. "Swinging Discs", 24 September 1964.
31. ↑ John Barry. The Official UK Charts Company.
32. ↑ Shirley Bassey—Billboard Singles. AllMusic.
33. ↑ Shirley Bassey. The Official UK Charts Company.
34. ↑ Chambers, Peter. "Shattering James Bond!", 18 September 1964.
35. ↑ Crowther, Bosley (22 December 1964). Screen: Agent 007 Meets 'Goldfinger'. *The New York Times*. “In this third of the Bond screen adventures, which opened last night at the DeMille and goes continuous today at that theater and the Coronet....”
36. ↑ St. Petersburg Times – Google News Archive Search.
37. ↑ Associated Press. (6 September 1989). Gert Frobe, an Actor, Dies at 76 --[[ ----------------------------------

Lua module implementing the Template loop detected: Template:Webarchive template.

A merger of the functionality of three templates: Template:Wayback, Template:Webcite and Template:Cite archives

]]

--[[--------------------------< D E P E N D E N C I E S >------------------------------------------------------
]]

require('Module:No globals');
local getArgs = require ('Module:Arguments').getArgs;

--[[--------------------------< F O R W A R D D E C L A R A T I O N S >--------------------------------------
]]

local categories = {}; -- category names
local config = {}; -- global configuration settings
local digits = {}; -- for i18n; table that translates local-wiki digits to western digits
local err\_warn\_msgs = {}; -- error and warning messages
local excepted\_pages = {};
local month\_num = {}; -- for i18n; table that translates local-wiki month names to western digits
local prefixes = {}; -- service provider tail string prefixes
local services = {}; -- archive service provider data from
local s\_text = {}; -- table of static text strings used to build final rendering
local uncategorized\_namespaces = {}; -- list of namespaces that we should not categorize
local uncategorized\_subpages = {}; -- list of subpages that should not be categorized

--[[--------------------------< P A G E S C O P E I D E N T I F I E R S >----------------------------------
]]

local non\_western\_digits; -- boolean flag set true when data.digits.enable is true
local this\_page = mw.title.getCurrentTitle();

local track = {}; -- Associative array to hold tracking categories
local ulx = {}; -- Associative array to hold template data

--[[--------------------------< S U B S T I T U T E >----------------------------------------------------------

Populates numbered arguments in a message string using an argument table.

]]

local function substitute (msg, args)
 return args and mw.message.newRawMessage (msg, args):plain() or msg;
end

--[[--------------------------< tableLength >-----------------------

Given a 1-D table, return number of elements

]]

local function tableLength(T)
 local count = 0
 for \_ in pairs(T) do count = count + 1 end
 return count
end

--[=[-------------------------< M A K E \_ W I K I L I N K >----------------------------------------------------

Makes a wikilink; when both link and display text is provided, returns a wikilink in the form D; if only
link is provided, returns a wikilink in the form L; if neither are provided or link is omitted, returns an
empty string.

]=]

local function make\_wikilink (link, display, no\_link)
 if nil == no\_link then
 if link and ( *~= link) then*
 if display and ( *~= display) then*
 return table.concat ({'', display, ''});
 else
 return table.concat ({'', link, ''});
 end
 end
 return display or *; -- link not set so return the display text*

 else -- no\_link
 if display and ( *~= display) then -- if there is display text*
 return display; -- return that
 else
 return link or *; -- return the target article name or empty string*
 end
 end
end

--[[--------------------------< createTracking >-----------------------

Return data in track[] ie. tracking categories

]]

local function createTracking()
 if not excepted\_pages[this\_page.fullText] then -- namespace:title/fragment is allowed to be categorized (typically this module's / template's testcases page(s))
 if uncategorized\_namespaces[this\_page.nsText] then
 return *; -- this page not to be categorized so return empty string*
 end
 for \_,v in ipairs (uncategorized\_subpages) do -- cycle through page name patterns
 if this\_page.text:match (v) then -- test page name against each pattern
 return *; -- this subpage type not to be categorized so return empty string*
 end
 end
 end

 local out = {};
 if tableLength(track) > 0 then
 for key, \_ in pairs(track) do -- loop through table
 table.insert (out, make\_wikilink (key)); -- and convert category names to links
 end
 end
 return table.concat (out); -- concat into one big string; empty string if table is empty

end

--[[--------------------------< inlineError >-----------------------

Critical error. Render output completely in red. Add to tracking category.

This function called as the last thing before abandoning this module

]]

local function inlineError (msg, args)
 track[categories.error] = 1
 return table.concat ({
 'Error in ', -- open the error message span
 config.tname, -- insert the local language template name
 ' template: ',
 substitute (msg, args), -- insert the formatted error message
 '.', -- close the span
 createTracking() -- add the category
 })
end

--[[--------------------------< inlineRed >-----------------------

Render a text fragment in red, such as a warning as part of the final output.
Add tracking category.

 ]]

local function inlineRed(msg, trackmsg)
 if trackmsg == "warning" then
 track[categories.warning] = 1;
 elseif trackmsg == "error" then
 track[categories.error] = 1;
 end

 return '' .. msg .. ''
end

--[[--------------------------< base62 >-----------------------

Convert base-62 to base-10
Credit: https://de.wikipedia.org/wiki/Modul:Expr

]]

local function base62( value )
 local r = 1 -- default return value is input value is malformed

 if value:match ('%W') then -- value must only be in the set [0-9a-zA-Z]
 return; -- nil return when value contains extraneous characters
 end

 local n = #value -- number of characters in value
 local k = 1
 local c
 r = 0
 for i = n, 1, -1 do -- loop through all characters in value from ls digit to ms digit
 c = value:byte( i, i )
 if c >= 48 and c <= 57 then -- character is digit 0-9
 c = c - 48
 elseif c >= 65 and c <= 90 then -- character is ascii a-z
 c = c - 55
 else -- must be ascii A-Z
 c = c - 61
 end
 r = r + c \* k -- accumulate this base62 character's value
 k = k \* 62 -- bump for next
 end -- for i

 return r
end

--[[--------------------------< D E C O D E \_ D A T E >--------------------------------------------------------

Given a date string, return it in iso format along with an indicator of the date's format. Except that month names
must be recognizable as legitimate month names with proper capitalization, and that the date string must match one
of the recognized date formats, no error checking is done here; return nil else

]]

local function decode\_date (date\_str)
 local patterns = {
 ['dmy'] = {'^(%d%d?) +([^%s%d]+) +(%d%d%d%d)$', 'd', 'm', 'y'}, -- %a does not recognize unicode combining characters used by some languages
 ['mdy'] = {'^([^%s%d]+) (%d%d?), +(%d%d%d%d)$', 'm', 'd', 'y'},
 ['ymd'] = {'^(%d%d%d%d) +([^%s%d]+) (%d%d?)$', 'y', 'm', 'd'}, -- not mos compliant at en.wiki but may be acceptible at other wikis
 };

 local t = {};

 if non\_western\_digits then -- this wiki uses non-western digits?
 date\_str = mw.ustring.gsub (date\_str, '%d', digits); -- convert this wiki's non-western digits to western digits
 end

 if date\_str:match ('^%d%d%d%d%-%d%d%-%d%d$') then -- already an iso format date, return western digits form
 return date\_str, 'iso';
 end

 for k, v in pairs (patterns) do
 local c1, c2, c3 = mw.ustring.match (date\_str, patterns[k][1]); -- c1 .. c3 are captured but we don't know what they hold

 if c1 then -- set on match
 t = { -- translate unspecified captures to y, m, and d
 [patterns[k][2]] = c1, -- fill the table of captures with the captures
 [patterns[k][3]] = c2, -- take index names from src\_pattern table and assign sequential captures
 [patterns[k][4]] = c3,
 };
 if month\_num[t.m] then -- when month not already a number
 t.m = month\_num[t.m]; -- replace valid month name with a number
 else
 return nil, 'iso'; -- not a valid date form because month not valid
 end

 return mw.ustring.format ('%.4d-%.2d-%.2d', t.y, t.m, t.d), k; -- return date in iso format
 end
 end
 return nil, 'iso'; -- date could not be decoded; return nil and default iso date
end

--[[--------------------------< makeDate >-----------------------

Given year, month, day numbers, (zero-padded or not) return a full date in df format
where df may be one of:
 mdy, dmy, iso, ymd

on entry, year, month, day are presumed to be correct for the date that they represent; all are required

in this module, makeDate() is sometimes given an iso-format date in year:
 makeDate (2018-09-20, nil, nil, df)
this works because table.concat() sees only one table member

]]

local function makeDate (year, month, day, df)
 local format = {
 ['dmy'] = 'j F Y',
 ['mdy'] = 'F j, Y',
 ['ymd'] = 'Y F j',
 ['iso'] = 'Y-m-d',
 };

 local date = table.concat ({year, month, day}, '-'); -- assemble year-initial numeric-format date (zero padding not required here)

 if non\_western\_digits then -- this wiki uses non-western digits?
 date = mw.ustring.gsub (date, '%d', digits); -- convert this wiki's non-western digits to western digits
 end

 return mw.getContentLanguage():formatDate (format[df], date);
end

--[[--------------------------< I S \_ V A L I D \_ D A T E >----------------------------------------------------

Returns true if date is after 31 December 1899 (why is 1900 the min year? shouldn't the internet's date-of-birth
be min year?), not after today's date, and represents a valid date (29 February 2017 is not a valid date). Applies
Gregorian leapyear rules.

all arguments are required

]]

local function is\_valid\_date (year, month, day)
 local days\_in\_month = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
 local month\_length;
 local y, m, d;
 local today = os.date ('\*t'); -- fetch a table of current date parts

 if not year or  *== year or not month or*  == month or not day or  *== day then*
 return false; -- something missing
 end

 y = tonumber (year);
 m = tonumber (month);
 d = tonumber (day);

 if 1900 > y or today.year < y or 1 > m or 12 < m then -- year and month are within bounds TODO: 1900?
 return false;
 end

 if (2==m) then -- if February
 month\_length = 28; -- then 28 days unless
 if (0==(y%4) and (0~=(y%100) or 0==(y%400))) then -- is a leap year?
 month\_length = 29; -- if leap year then 29 days in February
 end
 else
 month\_length=days\_in\_month[m];
 end

 if 1 > d or month\_length < d then -- day is within bounds
 return false;
 end
 -- here when date parts represent a valid date
 return os.time({['year']=y, ['month']=m, ['day']=d, ['hour']=0}) <= os.time(); -- date at midnight must be less than or equal to current date/time
end

--[[--------------------------< decodeWebciteDate >-----------------------

Given a URI-path to Webcite (eg. /67xHmVFWP) return the encoded date in df format

returns date string in df format - webcite date is a unix timestamp encoded as bae62
or the string 'query'

]]

local function decodeWebciteDate(path, df)

 local dt = {};
 local decode;

 dt = mw.text.split(path, "/")

 -- valid URL formats that are not base62

 -- http://www.webcitation.org/query?id=1138911916587475
 -- http://www.webcitation.org/query?url=http..&date=2012-06-01+21:40:03
 -- http://www.webcitation.org/1138911916587475
 -- http://www.webcitation.org/cache/73e53dd1f16cf8c5da298418d2a6e452870cf50e
 -- http://www.webcitation.org/getfile.php?fileid=1c46e791d68e89e12d0c2532cc3cf629b8bc8c8e

 if dt[2]:find ('query', 1, true) or
 dt[2]:find ('cache', 1, true) or
 dt[2]:find ('getfile', 1, true) or
 tonumber(dt[2]) then
 return 'query';
 end

 decode = base62(dt[2]); -- base62 string -> exponential number
 if not decode then
 return nil; -- nil return when dt[2] contains characters not in %w
 end
 dt = os.date('\*t', string.format("%d", decode):sub(1,10)) -- exponential number -> text -> first 10 characters (a unix timestamp) -> a table of date parts

 decode = makeDate (dt.year, dt.month, dt.day, 'iso'); -- date comparisons are all done in iso format with western digits
 if non\_western\_digits then -- this wiki uses non-western digits?
 decode = mw.ustring.gsub (decode, '%d', digits); -- convert this wiki's non-western digits to western digits
 end

 return decode;
end

--[[--------------------------< decodeWaybackDate >-----------------------

Given a URI-path to Wayback (eg. /web/20160901010101/http://example.com )
or Library of Congress Web Archives (eg. /all/20160901010101/http://example.com)
or UK Government Web Archive (eg. /ukgwa/20160901010101/http://example.com or /tna/20160901010101/http://example.com)

return the formatted date eg. "September 1, 2016" in df format
Handle non-digits in snapshot ID such as "re\_" and "-" and "\*"

 valid date string in df format - wayback date is valid (including the text string 'index' when date is '/\*/')
 empty string - wayback date is malformed (less than 8 digits, not a valid date)
 nil - wayback date is '/save/' or otherwise not a number

 second return value is an appropriate 'message' may or may not be formatted

]]

local function decodeWaybackDate(path, df)

 local msg, snapdate;

 snapdate = path:gsub ('^/web/', *):gsub ('^/all/',* ):gsub ('^/ukgwa/', *):gsub ('^/tna/',* ):gsub ('^/', *); -- remove leading /web/, /all/, /ukgwa/, /tna/, or /*
 snapdate = snapdate:match ('^[^/]+'); -- get timestamp
 if snapdate == "\*" then -- eg. /web/\*/http.., etc.
 return 'index'; -- return indicator that this url has an index date
 end

 snapdate = snapdate:gsub ('%a%a\_%d?$', *):gsub ('%-',* ); -- from date, remove any trailing "re\_", dashes

 msg = *;*
 if snapdate:match ('%\*$') then -- a trailing '\*' causes calendar display at archive .org
 snapdate = snapdate:gsub ('%\*$', *); -- remove so not part of length calc later*
 msg = inlineRed (err\_warn\_msgs.ts\_cal, 'warning'); -- make a message
 end

 if not tonumber(snapdate) then
 return nil, 'ts\_nan'; -- return nil (fatal error flag) and message selector
 end

 local dlen = snapdate:len();
 if dlen < 8 then -- we need 8 digits TODO: but shouldn't this be testing for 14 digits?
 return *, inlineRed (err\_warn\_msgs.ts\_short, 'error'); -- return empty string and error message*
 end

 local year, month, day = snapdate:match ('(%d%d%d%d)(%d%d)(%d%d)'); -- no need for snapdatelong here

 if not is\_valid\_date (year, month, day) then
 return *, inlineRed (err\_warn\_msgs.ts\_date, 'error'); -- return empty string and error message*
 end

 snapdate = table.concat ({year, month, day}, '-'); -- date comparisons are all done in iso format
 if 14 == dlen then
 return snapdate, msg; -- return date with message if any
 else
 return snapdate, msg .. inlineRed (err\_warn\_msgs.ts\_len, 'warning'); -- return date with warning message(s)
 end
end

--[[--------------------------< decodeArchiveisDate >-----------------------

Given an Archive.is "long link" URI-path (e.g. /2016.08.28-144552/http://example.com)
return the date in df format (e.g. if df = dmy, return 28 August 2016)
Handles "." and "-" in snapshot date, so 2016.08.28-144552 is same as 20160828144552

 valid date string in df format - archive.is date is valid (including the text string 'short link' when url is the short form)
 empty string - wayback date is malformed (not a number, less than 8 digits, not a valid date)
 nil - wayback date is '/save/'

 second return value is an appropriate 'message' may or may not be formatted

]]

local function decodeArchiveisDate(path, df)
 local snapdate

 if path:match ('^/%w+$') then -- short form url path is '/' followed by some number of base 62 digits and nothing else
 return "short link" -- e.g. http://archive.is/hD1qz
 end

 snapdate = mw.text.split (path, '/')[2]:gsub('[%.%-]', *); -- get snapshot date, e.g. 2016.08.28-144552; remove periods and hyphens*

 local dlen = string.len(snapdate)
 if dlen < 8 then -- we need 8 digits TODO: but shouldn't this be testing for 14 digits?
 return *, inlineRed (err\_warn\_msgs.ts\_short, 'error'); -- return empty string and error message*
 end

 local year, month, day = snapdate:match ('(%d%d%d%d)(%d%d)(%d%d)'); -- no need for snapdatelong here

 if not is\_valid\_date (year, month, day) then
 return *, inlineRed (err\_warn\_msgs.ts\_date, 'error'); -- return empty string and error message*
 end

 snapdate = table.concat ({year, month, day}, '-'); -- date comparisons are all done in iso format
 if 14 == dlen then
 return snapdate; -- return date
 else
 return snapdate, inlineRed (err\_warn\_msgs.ts\_len, 'warning'); -- return date with warning message
 end
 end

--[[--------------------------< serviceName >-----------------------

Given a domain extracted by mw.uri.new() (eg. web.archive.org) set tail string and service ID

]]

local function serviceName(host, no\_link)
 local tracking;
 local index;

 host = host:lower():gsub ('^web%.(.+)', '%1'):gsub ('^www%.(.+)', '%1'); -- lowercase, remove web. and www. subdomains

 if services[host] then
 index = host;
 else
 for k, \_ in pairs (services) do
 if host:find ('%f[%a]'..k:gsub ('([%.%-])', '%%%1')) then
 index = k;
 break;
 end
 end
 end

 if index then
 local out = {*}; -- empty string in [1] so that concatenated result has leading single space*
 ulx.url1.service = services[index][4] or 'other';
 tracking = services[index][5] or categories.other;
 -- build tail string
 if false == services[index][1] then -- select prefix
 table.insert (out, prefixes.at);
 elseif true == services[index][1] then
 table.insert (out, prefixes.atthe);
 else
 table.insert (out, services[index][1]);
 end

 table.insert (out, make\_wikilink (services[index][2], services[index][3], no\_link)); -- add article wikilink
 if services[index][6] then -- add tail postfix if it exists
 table.insert (out, services[index][6]);
 end

 ulx.url1.tail = table.concat (out, ' '); -- put it all together; result has leading space character

 else -- here when unknown archive
 ulx.url1.service = 'other';
 tracking = categories.unknown;
 ulx.url1.tail = table.concat ({*, prefixes.at, host, inlineRed (err\_warn\_msgs.unknown\_url, error)}, ' ');*
 end

 track[tracking] = 1
end

--[[--------------------------< parseExtraArgs >-----------------------

Parse numbered arguments starting at 2, such as url2..url10, date2..date10, title2..title10
 For example: Template loop detected: Template:Webarchive
 Three url arguments not in numeric sequence (1..4..7).
 Function only processes arguments numbered 2 or greater (in this case 4 and 7)
 It creates numeric sequenced table entries like:
 urlx.url2.url = <argument value for url4>
 urlx.url3.url = <argument value for url7>
 Returns the number of URL arguments found numbered 2 or greater (in this case returns "2")

 ]]

local function parseExtraArgs(args)

 local i, j, argurl, argurl2, argdate, argtitle

 j = 2
 for i = 2, config.maxurls do
 argurl = "url" .. i
 if args[argurl] then
 argurl2 = "url" .. j
 ulx[argurl2] = {}
 ulx[argurl2]["url"] = args[argurl]
 argdate = "date" .. i
 if args[argdate] then
 ulx[argurl2]["date"] = args[argdate]
 else
 ulx[argurl2]["date"] = inlineRed (err\_warn\_msgs.date\_miss, 'warning');
 end

 argtitle = "title" .. i
 if args[argtitle] then
 ulx[argurl2]["title"] = args[argtitle]
 else
 ulx[argurl2]["title"] = nil
 end
 j = j + 1
 end
 end

 if j == 2 then
 return 0
 else
 return j - 2
 end
end

--[[--------------------------< comma >-----------------------

Given a date string, return "," if it's MDY

]]

local function comma(date)
 return (date and date:match ('%a+ +%d%d?(,) +%d%d%d%d')) or *;*
end

--[[--------------------------< createRendering >-----------------------

Return a rendering of the data in ulx[][]

]]

local function createRendering()

 local displayfield
 local out = {};

 local index\_date, msg = ulx.url1.date:match ('(index)(.\*)'); -- when ulx.url1.date extract 'index' text and message text (if there is a message)
 ulx.url1.date = ulx.url1.date:gsub ('index.\*', 'index'); -- remove message

 if 'none' == ulx.url1.format then -- For Template:Wayback, Template:Webcite
 table.insert (out, '['); -- open extlink markup
 table.insert (out, ulx.url1.url); -- add url

 if ulx.url1.title then
 table.insert (out, ' ') -- the required space
 table.insert (out, ulx.url1.title) -- the title
 table.insert (out, ']'); -- close extlink markup
 table.insert (out, ulx.url1.tail); -- tail text
 if ulx.url1.date then
 table.insert (out, ' ('); -- open date text; TODO: why the html entity? replace with regular space?
 table.insert (out, 'index' == ulx.url1.date and s\_text.archive or s\_text.archived); -- add text
 table.insert (out, ' '); -- insert a space
 table.insert (out, ulx.url1.date); -- add date
 table.insert (out, ')'); -- close date text
 end
 else -- no title
 if index\_date then -- when url date is 'index'
 table.insert (out, table.concat ({' ', s\_text.Archive\_index, ']'})); -- add the index link label
 table.insert (out, msg or *); -- add date mismatch message when url date is /\*/ and |date= has valid date*
 else
 table.insert (out, table.concat ({' ', s\_text.Archived, '] '})); -- add link label for url has timestamp date (will include mismatch message if there is one)
 end
 if ulx.url1.date then
 if 'index' ~= ulx.url1.date then
 table.insert (out, ulx.url1.date); -- add date when data is not 'index'
 end
 table.insert (out, comma(ulx.url1.date)); -- add ',' if date format is mdy
 table.insert (out, ulx.url1.tail); -- add tail text
 else -- no date
 table.insert (out, ulx.url1.tail); -- add tail text
 end
 end

 if 0 < ulx.url1.extraurls then -- For multiple archive URLs
 local tot = ulx.url1.extraurls + 1
 table.insert (out, '.') -- terminate first url
 table.insert (out, table.concat ({' ', s\_text.addlarchives, ': '})); -- add header text

 for i=2, tot do -- loop through the additionals
 local index = table.concat ({'url', i}); -- make an index
 displayfield = ulx[index]['title'] and 'title' or 'date'; -- choose display text
 table.insert (out, '['); -- open extlink markup
 table.insert (out, ulx[index]['url']); -- add the url
 table.insert (out, ' '); -- the required space
 table.insert (out, ulx[index][displayfield]); -- add the label
 table.insert (out, ']'); -- close extlink markup
 table.insert (out, i==tot and '.' or ', '); -- add terminator
 end
 end
 return table.concat (out); -- make a big string and done

 else -- For Template:Cite archives
 if 'addlarchives' == ulx.url1.format then -- Multiple archive services
 table.insert (out, table.concat ({s\_text.addlarchives, ': '})); -- add header text
 else -- Multiple pages from the same archive
 table.insert (out, table.concat ({s\_text.addlpages, ' '})); -- add header text
 table.insert (out, ulx.url1.date); -- add date to header text
 table.insert (out, ': '); -- close header text
 end

 local tot = ulx.url1.extraurls + 1;
 for i=1, tot do -- loop through the additionals
 local index = table.concat ({'url', i}); -- make an index
 table.insert (out, '['); -- open extlink markup
 table.insert (out, ulx[index]['url']); -- add url
 table.insert (out, ' '); -- add required space

 displayfield = ulx[index]['title'];
 if 'addlarchives' == ulx.url1.format then
 if not displayfield then
 displayfield = ulx[index]['date']
 end
 else -- must be addlpages
 if not displayfield then
 displayfield = table.concat ({s\_text.Page, ' ', i});
 end
 end
 table.insert (out, displayfield); -- add title, date, page label text
 table.insert (out, ']'); -- close extlink markup
 table.insert (out, (i==tot and '.' or ', ')); -- add terminator
 end
 return table.concat (out); -- make a big string and done
 end
end

--[[--------------------------< P A R A M E T E R \_ N A M E \_ X L A T E >--------------------------------------

for internaltionalization, translate local-language parameter names to their English equivalents

TODO: return error message if multiple aliases of the same canonical parameter name are found?

returns two tables:
 new\_args - holds canonical form parameters and their values either from translation or because the parameter was already in canonical form
 origin - maps canonical-form parameter names to their untranslated (local language) form for error messaging in the local language

unrecognized parameters are ignored

]]

local function parameter\_name\_xlate (args, params, enum\_params)
 local name; -- holds modifiable name of the parameter name during evaluation
 local enum; -- for enumerated parameters, holds the enumerator during evaluation
 local found = false; -- flag used to break out of nested for loops
 local new\_args = {}; -- a table that holds canonical and translated parameter k/v pairs
 local origin = {}; -- a table that maps original (local language) parameter names to their canonical name for local language error messaging
 local unnamed\_params; -- set true when unsupported positional parameters are detected

 for k, v in pairs (args) do -- loop through all of the arguments in the args table
 name = k; -- copy of original parameter name

 if 'string' == type (k) then
 if non\_western\_digits then -- true when non-western digits supported at this wiki
 name = mw.ustring.gsub (name, '%d', digits); -- convert this wiki's non-western digits to western digits
 end

 enum = name:match ('%d+$'); -- get parameter enumerator if it exists; nil else

 if not enum then -- no enumerator so looking for non-enumnerated parameters
 -- TODO: insert shortcut here? if params[name] then name holds the canonical parameter name; no need to search further
 for pname, aliases in pairs (params) do -- loop through each parameter the params table
 for \_, alias in ipairs (aliases) do -- loop through each alias in the parameter's aliases table
 if name == alias then
 new\_args[pname] = v; -- create a new entry in the new\_args table
 origin [pname] = k; -- create an entry to make canonical parameter name to original local language parameter name
 found = true; -- flag so that we can break out of these nested for loops
 break; -- no need to search the rest of the aliases table for name so go on to the next k, v pair
 end
 end

 if found then -- true when we found an alias that matched name
 found = false; -- reset the flag
 break; -- go do next args k/v pair
 end
 end
 else -- enumerated parameters
 name = name:gsub ('%d$', '#'); -- replace enumeration digits with place holder for table search
 -- TODO: insert shortcut here? if num\_params[name] then name holds the canonical parameter name; no need to search further
 for pname, aliases in pairs (enum\_params) do -- loop through each parameter the num\_params table
 for \_, alias in ipairs (aliases) do -- loop through each alias in the parameter's aliases table
 if name == alias then
 pname = pname:gsub ('#$', enum); -- replace the '#' place holder with the actual enumerator
 new\_args[pname] = v; -- create a new entry in the new\_args table
 origin [pname] = k; -- create an entry to make canonical parameter name to original local language parameter name
 found = true; -- flag so that we can break out of these nested for loops
 break; -- no need to search the rest of the aliases table for name so go on to the next k, v pair
 end
 end

 if found then -- true when we found an alias that matched name
 found = false; -- reset the flag
 break; -- go do next args k/v pair
 end
 end
 end
 else
 unnamed\_params = true; -- flag for unsupported positional parameters
 end
 end -- for k, v
 return new\_args, origin, unnamed\_params;
end

--[[--------------------------< W E B A R C H I V E >----------------------------------------------------------

template entry point

]]

local function webarchive(frame)
 local args = getArgs (frame);

 local data = mw.loadData (table.concat ({ -- make a data module name; sandbox or live
 'Module:Webarchive/data',
 frame:getTitle():find('sandbox', 1, true) and '/sandbox' or  *-- this instance is ./sandbox then append /sandbox*
 }));
 categories = data.categories; -- fill in the forward declarations
 config = data.config;
 if data.digits.enable then
 digits = data.digits; -- for i18n; table of digits in the local wiki's language
 non\_western\_digits = true; -- use\_non\_western\_digits
 end
 err\_warn\_msgs = data.err\_warn\_msgs;
 excepted\_pages = data.excepted\_pages;
 month\_num = data.month\_num; -- for i18n; table of month names in the local wiki's language
 prefixes = data.prefixes;
 services = data.services;
 s\_text = data.s\_text;
 uncategorized\_namespaces = data.uncategorized\_namespaces;
 uncategorized\_subpages = data.uncategorized\_subpages;

 local origin = {}; -- holds a map of English to local language parameter names used in the current template; not currently used
 local unnamed\_params; -- boolean set to true when template call has unnamed parameters
 args, origin, unnamed\_params = parameter\_name\_xlate (args, data.params, data.enum\_params); -- translate parameter names in args to English

 local date, format, msg, udate, uri, url;
 local ldf = 'iso'; -- when there is no |date= parameter, render url dates in iso format

 if args.url and args.url1 then -- URL argument (first)
 return inlineError (data.crit\_err\_msgs.conflicting, {origin.url, origin.url1});
 end

 url = args.url or args.url1;

 if not url then
 return inlineError (data.crit\_err\_msgs.empty);
 end
 -- these iabot bugs perportedly fixed; removing these causes lua script error
--[[ -- at Template:Webarchive/testcases/Production; resolve that before deleting these tests
 if mw.ustring.find( url, "https://web.http", 1, true ) then -- track bug - TODO: IAbot bug; not known if the bug has been fixed; deferred
 track[categories.error] = 1;
 return inlineError (data.crit\_err\_msgs.iabot1);
 end
 if url == "https://web.archive.org/http:/" then -- track bug - TODO: IAbot bug; not known if the bug has been fixed; deferred
 track[categories.error] = 1;
 return inlineError (data.crit\_err\_msgs.iabot2);
 end
]]

 if not (url:lower():find ('^http') or url:find ('^//')) then
 return inlineError (data.crit\_err\_msgs.invalid\_url );
 end

 ulx.url1 = {}
 ulx.url1.url = url

 ulx.url1.extraurls = parseExtraArgs(args)

 local good = false;
 good, uri = pcall (mw.uri.new, ulx.url1.url); -- get a table of uri parts from this url; protected mode to prevent lua error when ulx.url1.url is malformed

 if not good or nil == uri.host then -- abandon when ulx.url1.url is malformed
 return inlineError (data.crit\_err\_msgs.invalid\_url);
 end

 serviceName(uri.host, args.nolink)

 if args.date and args.date1 then -- Date argument
 return inlineError (data.crit\_err\_msgs.conflicting, {origin.date, origin.date1});
 end

 date = args.date or args.date1;
 date = date and date:gsub (' +', ' '); -- replace multiple spaces with a single space

 if date and config.verifydates then
 if '\*' == date then
 date = 'index';
 ldf = 'iso'; -- set to default format
 elseif 'mdy' == date then
 date = nil; -- if date extracted from URL,
 ldf = 'mdy'; -- then |date=mdy overrides iso
 elseif 'dmy' == date then
 date = nil; -- if date extracted from URL,
 ldf = 'dmy'; -- then |date=dmy overrides iso
 elseif 'ymd' == date then
 date = nil; -- if date extracted from URL,
 ldf = 'ymd'; -- then |date=ymd overrides iso
 else
 date, ldf = decode\_date (date); -- get an iso format date from date and get date's original format
 end
 end

 if 'wayback' == ulx.url1.service or 'locwebarchives' == ulx.url1.service or 'ukgwa' == ulx.url1.service then
 if date then
 if config.verifydates then
 if ldf then
 udate, msg = decodeWaybackDate (uri.path); -- get the url date in iso format and format of date in |date=; 'index' when wayback url date is \*
 if not udate then -- this is the only 'fatal' error return
 return inlineError (data.crit\_err\_msgs[msg]);
 end

 if udate ~= date then -- date comparison using iso format dates
 date = udate;
 msg = table.concat ({
 inlineRed (err\_warn\_msgs.mismatch, 'warning'), -- add warning message
 msg, -- add message if there is one
 });
 end
 end
 end
 else -- no |date=
 udate, msg = decodeWaybackDate (uri.path);

 if not udate then -- this is the only 'fatal' error return
 return inlineError (data.crit\_err\_msgs[msg]);
 end

 if  *== udate then*
 date = nil; -- unset
 else
 date = udate;
 end
 end

 elseif 'webcite' == ulx.url1.service then
 if date then
 if config.verifydates then
 if ldf then
 udate = decodeWebciteDate (uri.path); -- get the url date in iso format
 if 'query' ~= udate then -- skip if query
 if udate ~= date then -- date comparison using iso format dates
 date = udate;
 msg = table.concat ({
 inlineRed (err\_warn\_msgs.mismatch, 'warning'),
 });
 end
 end
 end
 end
 else
 date = decodeWebciteDate( uri.path, "iso" )
 if date == "query" then
 date = nil; -- unset
 msg = inlineRed (err\_warn\_msgs.date\_miss, 'warning');
 elseif not date then -- invalid base62 string
 date = inlineRed (err\_warn\_msgs.date1, 'error');
 end
 end

 elseif 'archiveis' == ulx.url1.service then
 if date then
 if config.verifydates then
 if ldf then
 udate, msg = decodeArchiveisDate (uri.path) -- get the url date in iso format
 if 'short link' ~= udate then -- skip if short link
 if udate ~= date then -- date comparison using iso format dates
 date = udate;
 msg = table.concat ({
 inlineRed (err\_warn\_msgs.mismatch, 'warning'), -- add warning message
 msg, -- add message if there is one
 });
 end
 end
 end
 end
 else -- no |date=
 udate, msg = decodeArchiveisDate( uri.path, "iso" )
 if udate == "short link" then
 date = nil; -- unset
 msg = inlineRed (err\_warn\_msgs.date\_miss, 'warning');
 elseif  *== udate then*
 date = nil; -- unset
 else
 date = udate;
 end
 end

 else -- some other service
 if not date then
 msg = inlineRed (err\_warn\_msgs.date\_miss, 'warning');
 end
 end

 if 'index' == date then
 ulx.url1.date = date .. (msg or *); -- create index + message (if there is one)*
 elseif date then
 ulx.url1.date = makeDate (date, nil, nil, ldf) .. (msg or *); -- create a date in the wiki's local language + message (if there is one)*
 else
 ulx.url1.date = msg;
 end

 format = args.format; -- Format argument

 if not format then
 format = "none"
 else
 for k, v in pairs (data.format\_vals) do -- |format= accepts two specific values loop through a table of those values
 local found; -- declare a nil flag
 for \_, p in ipairs (v) do -- loop through local language variants
 if format == p then -- when |format= value matches
 format = k; -- use name from table key
 found = true; -- declare found so that we can break out of outer for loop
 break; -- break out of inner for loop
 end
 end

 if found then
 break;
 end
 end

 if format == "addlpages" then
 if not ulx.url1.date then
 format = "none"
 end
 elseif format == "addlarchives" then
 format = "addlarchives"
 else
 format = "none"
 end
 end
 ulx.url1.format = format

 if args.title and args.title1 then -- Title argument
 return inlineError (data.crit\_err\_msgs.conflicting, {origin.title, origin.title1});
 end

 ulx.url1.title = args.title or args.title1;

 local rend = createRendering()
 if not rend then
 return inlineError (data.crit\_err\_msgs.unknown);
 end

 return rend .. ((unnamed\_params and inlineRed (err\_warn\_msgs.unnamed\_params, 'warning')) or *) .. createTracking();*

end

--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]

return {webarchive = webarchive};.
38. ↑ Prouse, Derek. "Review", 20 September 1964.
39. ↑ 39.0 39.1 "An Immensely Successful Film Formula", 17 September 1964.
40. ↑ Zec, Donald. "If deadly females, death-ray torture, strangling and dry martinis beguile your lighter moments", 16 September 1964.
41. ↑ Gilliatt, Penelope. "So elegant—so vile", 20 September 1964.
42. ↑ "The most exciting Bond: two hours of unmissable fantasy", 5 October 1964.
43. ↑ Dent, Alan. "Cinema", 26 September 1964.
44. ↑ "Review", 20 September 1954.
45. ↑ "Cinema: Knocking Off Fort Knox", 18 December 1964.
46. ↑ 46.0 46.1 Crowther, Bosley. "Screen: Agent 007 Meets 'Goldfinger': James Bond's Exploits on Film Again", 22 December 1964.
47. ↑ Goldfinger Movie Review & Film Summary (1964) | Roger Ebert.
48. ↑ Goldfinger. Rotten Tomatoes (Flixster).
49. ↑ Total Recall: James Bond Countdown – Find Out Where Quantum of Solace Fits In!. Rotten Tomatoes (Flixster) (18 November 2008).
50. ↑ Template:Harvnb. "On Christmas Eve, the DeMille officially opened for 24 hours straight and did not close again until after New Year's Day"
51. ↑ Template:Harvnb. "Produced at a budget of $3 million, *Goldfinger* grossed a phenomenal $46 million worldwide the first time around."
52. ↑ James Bond Movies. Box Office Mojo.
53. ↑ Goldfinger. The Numbers.
54. ↑ 00-Heaven: Digital Goldfinger Reissue in UK Theaters. Cinema Retro.
55. ↑ Goldfinger. Park Circus Films.
56. ↑ "Goldfinger has the midas touch at UK cinemas, impressive returns on big screen rerelease", Mi6-HQ.com, 6 August 2007.
57. ↑ Goldfinger. Box Office Mojo.
58. ↑ Goldfinger (1964)—Awards and Nominations. Yahoo! Movies.
59. ↑ BAFTA Awards Database—1964. British Academy of Film and Television Arts.
60. ↑ AFI's 100 years...100 movie quotes. American Film Industry.
61. ↑ AFI's 100 years...100 songs. American Film Institute.
62. ↑ AFI's 100 years...100 heroes & villains. American Film Institute.
63. ↑ AFI's 100 years...100 thrills. American Film Institute.
64. ↑ Ranking the Bond Films. *Entertainment Weekly* (24 November 2006).
65. ↑ James Bond's Top 20 (5–1). IGN.
66. ↑ Wilner, Norman. Rating the Spy Game. MSN.
67. ↑ Countdown! The 10 best Bond girls. *Entertainment Weekly* (24 November 2006).
68. ↑ Zdyrko, Dave. "Top 10 Bond Babes", IGN, 15 November 2006.
69. ↑ "Rating Bond", Total Film, 18 February 2008.
70. ↑ Brendan Plant. "Top 10 Bond villains", *The Times*, 1 April 2008.
71. ↑ Brendan Plant. "Top 10 Bond cars", *The Times*, 1 April 2008.
72. ↑ VC – GOLDFINGER. 007collector.com (6 October 2015).
73. ↑ DVD. 007homevideo.com.
74. ↑ Blu-ray Gold Sleeve Edition. 007homevideo.com.
75. ↑ Valero, Gerardo (4 December 2010). The James Bond template. *Chicago Sun-Times*.
76. ↑ Moniot, Drew (Summer 1976). "James Bond and America in the Sixties: An Investigation of the Formula Film in Popular Culture". *Journal of the University Film Association* **28** (3): 25–33. Template:Citation/identifier.
77. ↑ Carty, Ciaran. "I felt there was pain in Bond", *Sunday Tribune*, 2 November 2008.
78. ↑ Template:Cite video
79. ↑ Template:Cite episode
80. ↑ Template:Cite episode
81. ↑ Template:Cite episode
82. ↑ Template:Cite episode
83. ↑ "007 Legends achievements".

## Sources

Template:Refbegin

* Balio, Tino (1987). *United Artists: the Company that Changed the Film Industry*. University of Wisconsin Press. ISBN 978-0-299-11440-4.
* Balio, Tino (2009). *United Artists, Volume 2, 1951–1978: the Company that Changed the Film Industry*. University of Wisconsin Press. ISBN 978-0-299-23014-2.
* (1997) *Kiss Kiss Bang! Bang!: the Unofficial James Bond Film Companion*. Batsford Books. ISBN 978-0-7134-8182-2.
* Benson, Raymond (1988). *The James Bond Bedside Companion*. London: Boxtree Ltd. ISBN 978-1-85283-234-6.
* Black, Jeremy (2005). *The Politics of James Bond: from Fleming's Novel to the Big Screen*. University of Nebraska Press. ISBN 978-0-8032-6240-9.
* Bouzerau, Laurent (2006). *The Art of Bond*. London: Macmillan Publishers. ISBN 978-0-7522-1551-8.
* Bray, Christopher (2010). *Sean Connery; The Measure of a Man*. London: Faber and Faber. ISBN 978-0-571-23807-1.
* Britton, Wesley Alan (2004). *Spy Television*. Greenwood Publishing Group. ISBN 978-0-275-98163-1.
* Broccoli, Albert R (1998). *When the Snow Melts*. London: Boxtree Ltd. ISBN 978-0-7522-1162-6.
* Chapman, James (1999). *Licence to Thrill*. London/New York City: Cinema and Society. ISBN 978-1-86064-387-3.
* (2006) *James Bond: The Legacy 007*. Harry N. Abrams. ISBN 978-0-8109-8252-9.
* Dunbar, Brian (2001). *Goldfinger*. Longman. ISBN 978-0-582-45249-7.
* Frayling, Christopher (2005). *Ken Adam and the Art of Production Design*. London/New York City: Macmillan Publishers. ISBN 978-0-571-22057-1.
* (2010) *Epics, Spectacles, and Blockbusters: a Hollywood History*. Wayne State University Press. ISBN 978-0-8143-3008-1.
* (2003) *Thinking About Movies: Watching, Questioning, Enjoying*. Wiley-Blackwell. ISBN 978-0-631-23358-9.
* Lindner, Christoph (2003). *The James Bond Phenomenon: a Critical Reader*. Manchester University Press. ISBN 978-0-7190-6541-5.
* Macintyre, Ben (2008). *For Yours Eyes Only*. London: Bloomsbury Publishing. ISBN 978-0-7475-9527-4.
* Neaverson, Bob (1997). *The Beatles Movies*. Cassell. ISBN 978-0-304-33796-5.
* Peary, Danny (1986). *Guide for the Film Fanatic*. Simon & Schuster.
* (1997) *The Films of Sean Connery*. Carol Publishing Group. ISBN 978-0-8065-1837-4.
* (1998) *The Essential Bond*. London: Boxtree Ltd. ISBN 978-0-7522-2477-0.
* Rubin, Steven Jay (1981). *The James Bond Films: a Behind the Scenes History*. Arlington House Publishers. ISBN 978-0-87000-523-7.
* Smith, Jim (2002). *Bond Films*. London: Virgin Books. ISBN 978-0-7535-0709-4.
* Starkey, Lycurgus Monroe (1966). *James Bond's World of Values*. Abingdon Press.

Template:Refend

## External links

* Goldfinger at Wikipedia

* *Goldfinger* at James Bond Wiki
* *Goldfinger* at the Internet Movie Database
* *Goldfinger* at the TCM Movie Database
* *Goldfinger* at Metro-Goldwyn-Mayer
* *Goldfinger* at BFI Screenonline
* Honor Blackman Presents Guy Hamilton with the Cinema Retro Award at the Pinewood Studios Goldfinger Reunion. CinemaRetro.com (14 April 2008).

**Soundtracks:** *Moonraker*