World Library  
Flag as Inappropriate
Email this Article

Methylenedioxypyrovalerone

Article Id: WHEBN0009120802
Reproduction Date:

Title: Methylenedioxypyrovalerone  
Author: World Heritage Encyclopedia
Language: English
Subject: 3',4'-Methylenedioxy-α-pyrrolidinobutiophenone, Pentylone, Prolintane, Mephedrone, Bath salts (drug)
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Methylenedioxypyrovalerone

Methylenedioxypyrovalerone
Systematic (IUPAC) name
(RS)-1-(Benzo[d] [1,3]dioxol-5-yl)-2-(pyrrolidin-1-yl)pentan-1-one
Clinical data
Legal status
Routes of
administration
Oral, insufflation, intravenous, rectal, vaporization
Pharmacokinetic data
Metabolism Hepatic
Excretion Primarily urine (renal)
Identifiers
CAS Registry Number  YesY
24622-62-6 (HCl)
PubChem CID:
ChemSpider  YesY
UNII  N
Chemical data
Formula C16H21NO3
Molecular mass 275.343 g/mol (freebase)
 N   

Methylenedioxypyrovalerone (MDPV) is a psychoactive recreational drug with stimulant properties which acts as a norepinephrine-dopamine reuptake inhibitor (NDRI).[1] It was first developed in the 1960s by a team at Boehringer Ingelheim.[2] MDPV remained an obscure stimulant until around 2004 when it was reportedly sold as a designer drug. Products labeled as bath salts containing MDPV were previously sold as recreational drugs in gas stations and convenience stores in the United States, similar to the marketing for Spice and K2 as incense.[3][4]

Incidents of psychological and physical harm have been attributed to MDPV use.[5][6]

Appearance

The hydrochloride salt exists as a very fine, hygroscopic, crystalline powder that tends to clump to itself, resembling something like powdered sugar. Its color can range from pure white to a yellowish-tan and has a slight odor that strengthens as it colors. Impurities are likely to consist of either pyrrolidine or alpha-dibrominated alkylphenones from either excess pyrrolidine or incomplete amination, respectively, during synthesis. These impurities likely account for its discoloration and fishy (pyrrolidine) or bromine-like odor, which worsens upon exposure to air, moisture, or bases.[7]

Pharmacology

Methylenedioxypyrovalerone has no record of FDA approved medical use.[8] Reportedly, it has four times the potency of methylphenidate (Ritalin, Concerta),[9] although its pharmacology has only recently been studied in detail.[10] MDPV has been shown to produce robust reinforcing effects and compulsive self-administration in rats, though this had already been provisionally established by a number of documented cases of misuse and addiction in humans, before the animal tests had been carried out.[11]

MDPV is the 3,4-methylenedioxy ring-substituted analog of the compound pyrovalerone, developed in the 1960s, which has been used for the treatment of chronic fatigue and as an anorectic, but caused problems of abuse and dependence. However, despite its structural similarity, the effects of MDPV bear little resemblance to other methylenedioxy phenylalkylamine derivatives such as 3,4-methylenedioxy-N-methylamphetamine (MDMA), instead producing primarily stimulant effects with only mild entactogenic qualities.

Other drugs with a similar chemical structure include α-pyrrolidinopropiophenone (α-PPP), 4'-methyl-α-pyrrolidinopropiophenone (M-α-PPP), 3',4'-methylenedioxy-α-pyrrolidinopropiophenone (MDPPP) and 1-phenyl-2-(1-pyrrolidinyl)-1-pentanone (α-PVP).

Effects

MDPV acts as a stimulant and has been reported to produce effects similar to those of cocaine, methylphenidate, and the amphetamines. The acute effects may include:[12]

Desired psychological effects

Description of effects

The primary psychological effects have a duration of roughly 3 to 4 hours, with after effects such as tachycardia, hypertension, and mild stimulation lasting from 6 to 8 hours.[12] High doses have been observed to cause intense, prolonged panic attacks in stimulant-intolerant users,[12] and there are anecdotal reports of psychosis from sleep withdrawal and addiction at higher doses or more frequent dosing intervals.[12] It has also been repeatedly noted for inducing strong cravings to re-administer.[12][13] Users have reported a compulsive desire to continuously re-dose, even following onset of the unpleasant side effects induced by prolonged use and higher doses.require('Module:No globals')

local p = {}

-- articles in which traditional Chinese preceeds simplified Chinese local t1st = { ["228 Incident"] = true, ["Chinese calendar"] = true, ["Lippo Centre, Hong Kong"] = true, ["Republic of China"] = true, ["Republic of China at the 1924 Summer Olympics"] = true, ["Taiwan"] = true, ["Taiwan (island)"] = true, ["Taiwan Province"] = true, ["Wei Boyang"] = true, }

-- the labels for each part local labels = { ["c"] = "Chinese", ["s"] = "simplified Chinese", ["t"] = "traditional Chinese", ["p"] = "pinyin", ["tp"] = "Tongyong Pinyin", ["w"] = "Wade–Giles", ["j"] = "Jyutping", ["cy"] = "Cantonese Yale", ["poj"] = "Pe̍h-ōe-jī", ["zhu"] = "Zhuyin Fuhao", ["l"] = "literally", }

-- article titles for wikilinks for each part local wlinks = { ["c"] = "Chinese language", ["s"] = "simplified Chinese characters", ["t"] = "traditional Chinese characters", ["p"] = "pinyin", ["tp"] = "Tongyong Pinyin", ["w"] = "Wade–Giles", ["j"] = "Jyutping", ["cy"] = "Yale romanization of Cantonese", ["poj"] = "Pe̍h-ōe-jī", ["zhu"] = "Bopomofo", }

-- for those parts which are to be treated as languages their ISO code local ISOlang = { ["c"] = "zh", ["t"] = "zh-Hant", ["s"] = "zh-Hans", ["p"] = "zh-Latn-pinyin", ["tp"] = "zh-Latn", ["w"] = "zh-Latn-wadegile", ["j"] = "yue-jyutping", ["cy"] = "yue", ["poj"] = "hak", ["zhu"] = "zh-Bopo", }

local italic = { ["p"] = true, ["tp"] = true, ["w"] = true, ["j"] = true, ["cy"] = true, ["poj"] = true, } -- Categories for different kinds of Chinese text local cats = { ["c"] = "", ["s"] = "", ["t"] = "", }

function p.Zh(frame) -- load arguments module to simplify handling of args local getArgs = require('Module:Arguments').getArgs local args = getArgs(frame) return p._Zh(args) end function p._Zh(args) local uselinks = not (args["links"] == "no") -- whether to add links local uselabels = not (args["labels"] == "no") -- whether to have labels local capfirst = args["scase"] ~= nil

        local t1 = false -- whether traditional Chinese characters go first
        local j1 = false -- whether Cantonese Romanisations go first
        local testChar
        if (args["first"]) then
                 for testChar in mw.ustring.gmatch(args["first"], "%a+") do
          if (testChar == "t") then
           t1 = true
           end
          if (testChar == "j") then
           j1 = true
           end
         end
        end
        if (t1 == false) then
         local title = mw.title.getCurrentTitle()
         t1 = t1st[title.text] == true
        end

-- based on setting/preference specify order local orderlist = {"c", "s", "t", "p", "tp", "w", "j", "cy", "poj", "zhu", "l"} if (t1) then orderlist[2] = "t" orderlist[3] = "s" end if (j1) then orderlist[4] = "j" orderlist[5] = "cy" orderlist[6] = "p" orderlist[7] = "tp" orderlist[8] = "w" end -- rename rules. Rules to change parameters and labels based on other parameters if args["hp"] then -- hp an alias for p ([hanyu] pinyin) args["p"] = args["hp"] end if args["tp"] then -- if also Tongyu pinyin use full name for Hanyu pinyin labels["p"] = "Hanyu Pinyin" end if (args["s"] and args["s"] == args["t"]) then -- Treat simplified + traditional as Chinese if they're the same args["c"] = args["s"] args["s"] = nil args["t"] = nil elseif (not (args["s"] and args["t"])) then -- use short label if only one of simplified and traditional labels["s"] = labels["c"] labels["t"] = labels["c"] end local body = "" -- the output string local params -- for creating HTML spans local label -- the label, i.e. the bit preceeding the supplied text local val -- the supplied text -- go through all possible fields in loop, adding them to the output for i, part in ipairs(orderlist) do if (args[part]) then -- build label label = "" if (uselabels) then label = labels[part] if (capfirst) then label = mw.language.getContentLanguage():ucfirst(

Reported modalities of intake include oral consumption, insufflation, smoking, rectal and intravenous use. It is supposedly active at 3–5 mg, with typical doses ranging between 5–20 mg.[12]

Chemistry

MDPV can be prepared by modifying the alkylation-oxidation-bromination-amination route to cathinone analogs. This involves a Grignard alkylation of piperonal, oxidation of the resulting secondary alcohol back into a ketone, alpha halogenation of the aromatic ketone with bromine, and subsequent amination with pyrrolidine.[14]

Possible synthetic route to MDPV from piperonal.

The bromination, and left behind by an expedited or incomplete final workup is the most likely contaminant/impurity to be seen in the final product using this method.[7] Bromination is likely to be in excess, since excess pyrollidine amine will form a black precipitate that is difficult to separate.

Such biological testing on lab animals, especially in mammals, and especially where the possibility exists for diversion and subsequent ingestion by humans for recreational purposes. Preparation for biological purposes and testing must ensure a complete and thorough workup, including several washes with saturated sodium bicarbonate[7] solution after washing with water to remove the brominated intermediates before final salting of the freebase for recrystallization. Aside from the bromine ion being highly electronegative and reactive, the alkyl-bromine compounds often being alkylating agents, and brominated aromatic derivatives being implicated as hormone disruptors, there also exists the mechanism for bromine substituting for the methyl group in the nitrogenous base 5-methyluracil of DNA, creating the base-analog 5-bromouracil, which can be incorporated into DNA and induce a point mutation via base substitution.[15]

Metabolism

MDPV undergoes CYP450 2D6, 2C19, 1A2,[16] and COMT phase 1 metabolism (liver) into methylcatechol and pyrrolidine, which in turn are glucuronated (uridine 5'-diphospho-glucuronosyl-transferase) allowing it to be excreted by the kidneys, with only a small fraction of the metabolites being excreted into the stools.[17] No free pyrrolidine will be detected in the urine.[18]

Molecularly, this is seen as demethylenation of methylenedioxypyrovalerone (CYP2D6), followed by methylation of the aromatic ring via catechol-O-methyl transferase. Then hydroxylation of both the aromatic ring and side chain takes place followed by and oxidation of the pyrrolidine ring to the corresponding lactam, with subsequent detachment and ring opening to the corresponding carboxylic acid.[19]

Detection in biological specimens

MDPV may be quantitated in blood, plasma or urine by gas chromatography-mass spectrometry or liquid chromatography-mass spectrometry to confirm a diagnosis of poisoning in hospitalized patients or to provide evidence in a medicolegal death investigation. Blood or plasma MDPV concentrations are expected to be in a range of 10–50 μg/L in persons using the drug recreationally, >50 μg/L in intoxicated patients and >300 μg/L in victims of acute overdosage.[20]

Legality

In the UK, following the ACMD's report on substituted cathinone derivatives,[13] MDPV is a Class B drug under The Misuse of Drugs Act 1971 (Amendment) Order 2010, making it illegal to sell, buy, or possess without a license.[21][22] Penalties include a maximum of five years and/or unlimited fine for possession; up to 14 years and/or unlimited fine for production or trafficking. See list of drugs illegal in the UK for more information.

MDPV is specifically listed as a controlled substance in Finland (listed appendix IV substance as of June 28, 2010),[23] Denmark and Sweden. In Sweden a 33-year-old man has been sentenced to six years in prison by an appellate court, Hovrätt, for possession of 250 grams of MDPV that had been acquired prior to criminalization.[24]

Australia

In Western Australia, MDPV has been banned under the Poisons Act 1964, having been included in Appendix A Schedule 9 of the Poisons Act 1964 as from February 11, 2012. The Director of Public Prosecutions for Western Australia announced that anyone intending to sell or supply MDPV faces a maximum $100,000 fine or 25 years in jail. Users face a $2000 fine or two years' jail. Therefore, anyone caught with MDPV can be charged with possession, selling, supplying or intent to sell or supply.[25]

Canada

Canadian Health Minister Leona Aglukkaq announced on June 5, 2012 that MDPV would be listed on Schedule 1 of the Controlled Drugs and Substances Act. Other drugs on schedule 1 include cocaine and heroin. This will make possession, trafficking, importing, exporting, and production of MDPV illegal. As of September 26, 2012 MDPV has become illegal in Canada as a Schedule 1 drug. Researchers will still be able to use the drug after applying for an exemption to that status.[26]

United States

In the United States, MDPV is a DEA federally scheduled drug. On October 21, 2011, the DEA issued a temporary one-year ban on MDPV, classifying it as a schedule I substance. Schedule I status is reserved for those substances with a high potential for abuse, no currently accepted use for treatment in the United States and a lack of accepted safety for use of the drug under medical supervision.[27][28]

Prior to the Federal ban being announced, it was already banned in Louisiana and Florida.[29][30][31][32] On March 24, 2011, Kentucky passed bill HB 121 which makes MDPV, as well as three other cathinones, controlled substances in the state. It also makes it a Class A misdemeanor to sell the drug, and a Class B misdemeanor to possess it.[33]

MDPV is banned in New Jersey under Pamela's Law. The law is named after Pamela Schmidt, a Rutgers University student, murdered in March 2011 by an alleged user of MDPV.[34] A toxicology report later found that no "bath salts" were present in his system.[35]

On May 5, 2011, Tennessee Governor Bill Haslam signed a law making it a crime "to knowingly produce, manufacture, distribute, sell, offer for sale or possess with intent to produce, manufacture, distribute, sell, or offer for sale" any product containing 3,4-Methylenedioxypyrovalerone (MDPV).[36]

On July 6, 2011, the governor of Maine signed a bill establishing fines for possession and penalties for trafficking of MDPV.[37]

On September 7, 2011, the DEA took advantage of its emergency scheduling authority to ban Mephedrone (4-MMC), MDPV, and Methylone (M1). The substances were made illegal to possess and sell for 12 months until the DEA and Department of Health and Human Services determines if these substances should be permanently banned.require('Module:No globals')

local p = {}

-- articles in which traditional Chinese preceeds simplified Chinese local t1st = { ["228 Incident"] = true, ["Chinese calendar"] = true, ["Lippo Centre, Hong Kong"] = true, ["Republic of China"] = true, ["Republic of China at the 1924 Summer Olympics"] = true, ["Taiwan"] = true, ["Taiwan (island)"] = true, ["Taiwan Province"] = true, ["Wei Boyang"] = true, }

-- the labels for each part local labels = { ["c"] = "Chinese", ["s"] = "simplified Chinese", ["t"] = "traditional Chinese", ["p"] = "pinyin", ["tp"] = "Tongyong Pinyin", ["w"] = "Wade–Giles", ["j"] = "Jyutping", ["cy"] = "Cantonese Yale", ["poj"] = "Pe̍h-ōe-jī", ["zhu"] = "Zhuyin Fuhao", ["l"] = "literally", }

-- article titles for wikilinks for each part local wlinks = { ["c"] = "Chinese language", ["s"] = "simplified Chinese characters", ["t"] = "traditional Chinese characters", ["p"] = "pinyin", ["tp"] = "Tongyong Pinyin", ["w"] = "Wade–Giles", ["j"] = "Jyutping", ["cy"] = "Yale romanization of Cantonese", ["poj"] = "Pe̍h-ōe-jī", ["zhu"] = "Bopomofo", }

-- for those parts which are to be treated as languages their ISO code local ISOlang = { ["c"] = "zh", ["t"] = "zh-Hant", ["s"] = "zh-Hans", ["p"] = "zh-Latn-pinyin", ["tp"] = "zh-Latn", ["w"] = "zh-Latn-wadegile", ["j"] = "yue-jyutping", ["cy"] = "yue", ["poj"] = "hak", ["zhu"] = "zh-Bopo", }

local italic = { ["p"] = true, ["tp"] = true, ["w"] = true, ["j"] = true, ["cy"] = true, ["poj"] = true, } -- Categories for different kinds of Chinese text local cats = { ["c"] = "", ["s"] = "", ["t"] = "", }

function p.Zh(frame) -- load arguments module to simplify handling of args local getArgs = require('Module:Arguments').getArgs local args = getArgs(frame) return p._Zh(args) end function p._Zh(args) local uselinks = not (args["links"] == "no") -- whether to add links local uselabels = not (args["labels"] == "no") -- whether to have labels local capfirst = args["scase"] ~= nil

        local t1 = false -- whether traditional Chinese characters go first
        local j1 = false -- whether Cantonese Romanisations go first
        local testChar
        if (args["first"]) then
                 for testChar in mw.ustring.gmatch(args["first"], "%a+") do
          if (testChar == "t") then
           t1 = true
           end
          if (testChar == "j") then
           j1 = true
           end
         end
        end
        if (t1 == false) then
         local title = mw.title.getCurrentTitle()
         t1 = t1st[title.text] == true
        end

-- based on setting/preference specify order local orderlist = {"c", "s", "t", "p", "tp", "w", "j", "cy", "poj", "zhu", "l"} if (t1) then orderlist[2] = "t" orderlist[3] = "s" end if (j1) then orderlist[4] = "j" orderlist[5] = "cy" orderlist[6] = "p" orderlist[7] = "tp" orderlist[8] = "w" end -- rename rules. Rules to change parameters and labels based on other parameters if args["hp"] then -- hp an alias for p ([hanyu] pinyin) args["p"] = args["hp"] end if args["tp"] then -- if also Tongyu pinyin use full name for Hanyu pinyin labels["p"] = "Hanyu Pinyin" end if (args["s"] and args["s"] == args["t"]) then -- Treat simplified + traditional as Chinese if they're the same args["c"] = args["s"] args["s"] = nil args["t"] = nil elseif (not (args["s"] and args["t"])) then -- use short label if only one of simplified and traditional labels["s"] = labels["c"] labels["t"] = labels["c"] end local body = "" -- the output string local params -- for creating HTML spans local label -- the label, i.e. the bit preceeding the supplied text local val -- the supplied text -- go through all possible fields in loop, adding them to the output for i, part in ipairs(orderlist) do if (args[part]) then -- build label label = "" if (uselabels) then label = labels[part] if (capfirst) then label = mw.language.getContentLanguage():ucfirst(

On October 17, 2011, an Ohio law banning synthetic drugs took effect barring selling and/or possession of "any material, compound, mixture, or preparation that contains any quantity of the following substances having a stimulant effect on the central nervous system, including their salts, isomers, and salts of isomers" listing ephedrine and pyrovalerone. It also specifically includes MDPV, misspelling the full name as "methyenedioxypyrovalerone".[38][39] Four days after this Ohio law was passed, the DEA's national emergency ban was implemented.[27]

On December 8, 2011, under the Synthetic Drug Control Act, the US House of Representatives voted to ban MDPV and a variety of other synthetic drugs which had been sold legally in stores.[40]

Documented misuse

In April 2011, two weeks after they went missing, two men in northwestern Pennsylvania were found dead in a remote location on government land. The official cause of death of both men was hypothermia, but toxicology reports later confirmed that both Troy Johnson, 29, and Terry Sumrow, 28, had ingested MDPV shortly before their deaths. "It wasn't anything to kill them, but enough to get them messed up," the county coroner said. MDPV containers were found in their vehicle along with spoons, hypodermic syringes and marijuana paraphernalia. In April 2011, an Alton, Illinois, woman apparently died from an MDPV overdose.[41] In May 2011, The CDC reported a hospital emergency department (ED) visit after the use of "bath salts" in Michigan. One person was reported dead on arrival at the ED. Associates of the dead person reported that he had used bath salts. His toxicology results revealed high levels of MDPV in addition to marijuana and prescription drugs. The primary factor contributing to death was cited as MDPV toxicity after autopsy was performed.[42] An incident of hemiplegia has been reported.[43]

Overdose treatment

Physicians often treat MDPV overdose cases with anxiolytics, such as benzodiazepines, to lessen the drug-induced activity in the brain and body.[44] In some cases, general anesthesia was used because sedatives were ineffective.[45]

Treatment in the emergency department for severe hypertension, tachycardia, agitation, or seizures consists of large doses of lorazepam in 2–4 mg increments every 10–15 minutes intravenously or intramuscularly. If this is not effective, haloperidol is an alternative treatment. It has been found that the use of any beta blockers to treat hypertension in these patients can cause an unopposed peripheral alpha-adrenergic effect with a dangerous paradoxical rise in blood pressure.[46]

Alternatively, the antihypertensive drug clonidine can be used to treat symptoms of MDPV intoxication. Clonidine has been used clinically in the treatment of acute stimulant intoxication and withdrawal,[47] and is sometimes prescribed to reduce the side effects of stimulant medications used to treat ADHD.[48]

References


-- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the and meta-templates and includes -- -- helper functions for other Lua hatnote modules. --


local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local mArguments -- lazily initialise Module:Arguments local yesno -- lazily initialise Module:Yesno

local p = {}


-- Helper functions


local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end

local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end

function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to true. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end

function p.formatPages(...) -- Formats a list of pages using formatLink and returns it as an array. Nil -- values are not allowed. local pages = {...} local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink(page) end return ret end

function p.formatPageTables(...) -- Takes a list of page/display tables and returns it as a list of -- formatted links. Nil values are not allowed. local pages = {...} local links = {} for i, t in ipairs(pages) do checkType('formatPageTables', i, t, 'table') local link = t[1] local display = t[2] links[i] = p._formatLink(link, display) end return links end

function p.makeWikitextError(msg, helpLink, addTrackingCategory) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- Module:Yesno, and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') local title = mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' (help)' else helpText = end -- Make the category text. local category if not title.isTalkPage and yesno(addTrackingCategory) ~= false then category = 'Hatnote templates with errors' category = string.format( '%s:%s', mw.site.namespaces[14].name, category ) else category = end return string.format( '%s', msg, helpText, category ) end


-- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the template.


function p.formatLink(frame) local args = getArgs(frame) local link = args[1] local display = args[2] if not link then return p.makeWikitextError( 'no link specified', 'Template:Format hatnote link#Errors', args.category ) end return p._formatLink(link, display) end

function p._formatLink(link, display) -- Find whether we need to use the colon trick or not. We need to use the -- colon trick for categories and files, as otherwise category links -- categorise the page and file links display the file. checkType('_formatLink', 1, link, 'string') checkType('_formatLink', 2, display, 'string', true) link = removeInitialColon(link) local namespace = p.findNamespaceId(link, false) local colon if namespace == 6 or namespace == 14 then colon = ':' else colon = end -- Find whether a faux display value has been added with the | magic -- word. if not display then local prePipe, postPipe = link:match('^(.-)|(.*)$') link = prePipe or link display = postPipe end -- Find the display value. if not display then local page, section = link:match('^(.-)#(.*)$') if page then display = page .. ' § ' .. section end end -- Assemble the link. if display then return string.format('%s', colon, link, display) else return string.format('%s%s', colon, link) end end


-- Hatnote -- -- Produces standard hatnote text. Implements the template.


function p.hatnote(frame) local args = getArgs(frame) local s = args[1] local options = {} if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end options.extraclasses = args.extraclasses options.selfref = args.selfref return p._hatnote(s, options) end

function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) local classes = {'hatnote'} local extraclasses = options.extraclasses local selfref = options.selfref if type(extraclasses) == 'string' then classes[#classes + 1] = extraclasses end if selfref then classes[#classes + 1] = 'selfref' end return string.format( '
%s
', table.concat(classes, ' '), s )

end

return p-------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the and meta-templates and includes -- -- helper functions for other Lua hatnote modules. --


local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local mArguments -- lazily initialise Module:Arguments local yesno -- lazily initialise Module:Yesno

local p = {}


-- Helper functions


local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end

local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end

function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to true. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end

function p.formatPages(...) -- Formats a list of pages using formatLink and returns it as an array. Nil -- values are not allowed. local pages = {...} local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink(page) end return ret end

function p.formatPageTables(...) -- Takes a list of page/display tables and returns it as a list of -- formatted links. Nil values are not allowed. local pages = {...} local links = {} for i, t in ipairs(pages) do checkType('formatPageTables', i, t, 'table') local link = t[1] local display = t[2] links[i] = p._formatLink(link, display) end return links end

function p.makeWikitextError(msg, helpLink, addTrackingCategory) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- Module:Yesno, and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') local title = mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' (help)' else helpText = end -- Make the category text. local category if not title.isTalkPage and yesno(addTrackingCategory) ~= false then category = 'Hatnote templates with errors' category = string.format( '%s:%s', mw.site.namespaces[14].name, category ) else category = end return string.format( '%s', msg, helpText, category ) end


-- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the template.


function p.formatLink(frame) local args = getArgs(frame) local link = args[1] local display = args[2] if not link then return p.makeWikitextError( 'no link specified', 'Template:Format hatnote link#Errors', args.category ) end return p._formatLink(link, display) end

function p._formatLink(link, display) -- Find whether we need to use the colon trick or not. We need to use the -- colon trick for categories and files, as otherwise category links -- categorise the page and file links display the file. checkType('_formatLink', 1, link, 'string') checkType('_formatLink', 2, display, 'string', true) link = removeInitialColon(link) local namespace = p.findNamespaceId(link, false) local colon if namespace == 6 or namespace == 14 then colon = ':' else colon = end -- Find whether a faux display value has been added with the | magic -- word. if not display then local prePipe, postPipe = link:match('^(.-)|(.*)$') link = prePipe or link display = postPipe end -- Find the display value. if not display then local page, section = link:match('^(.-)#(.*)$') if page then display = page .. ' § ' .. section end end -- Assemble the link. if display then return string.format('%s', colon, link, display) else return string.format('%s%s', colon, link) end end


-- Hatnote -- -- Produces standard hatnote text. Implements the template.


function p.hatnote(frame) local args = getArgs(frame) local s = args[1] local options = {} if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end options.extraclasses = args.extraclasses options.selfref = args.selfref return p._hatnote(s, options) end

function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) local classes = {'hatnote'} local extraclasses = options.extraclasses local selfref = options.selfref if type(extraclasses) == 'string' then classes[#classes + 1] = extraclasses end if selfref then classes[#classes + 1] = 'selfref' end return string.format( '
%s
', table.concat(classes, ' '), s )

end

return p
  1. ^
  2. ^ 1=1-(3,4-Methylenedioxy Phenyl-2-pyrrolidino-Alkanones
  3. ^
  4. ^
  5. ^
  6. ^
  7. ^ a b c
  8. ^
  9. ^ 1-[(3,4-Methylenedioxy)phenyl]-2-pyrrolidino-1-alkanones as stimulants. (Boehringer Ingelheim G.m.b.H.). Brit. (1969), 7 pp. CODEN: BRXXAA GB 1149366 19690423 Patent. Priority: DE 19650523. CAN 72:21608 AN 1970:21608 CAPLUS
  10. ^
  11. ^
  12. ^ a b c d e f
  13. ^ a b
  14. ^
  15. ^
  16. ^
  17. ^
  18. ^
  19. ^
  20. ^
  21. ^
  22. ^
  23. ^
  24. ^
  25. ^ http://media.mediamonitors.com.au/ArticlePresenter.aspx?GUID=01e77e98-b704-48ab-96bd-9cc941ac963b&ArticleID=133825793&output=pdfsearchable (Not available from IA, WebCite, or Archive.is)
  26. ^
  27. ^ a b
  28. ^
  29. ^
  30. ^
  31. ^
  32. ^
  33. ^
  34. ^
  35. ^
  36. ^
  37. ^
  38. ^
  39. ^
  40. ^
  41. ^
  42. ^
  43. ^
  44. ^
  45. ^
  46. ^
  47. ^ (Adapted or excerpted from: )
  48. ^

External links

  • Erowid MDPV Vault
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.