I'm not completely happy with my solution, but it works. It goes through Blizzard's armory to search for the item and get the item number, then uses wowhead.com to help make the popup.
Like yesterday's post, add a code block to blog.cfc to look for {item ...} code fragments. This is where I'm not happy, I wanted [wowitem ...] to work.
<!--- Check for wowitem blocks --->
<cfif findNoCase("{item ",arguments.string) and findNoCase("}",arguments.string)>
<cfset armoryCFC=CreateObject("component","sandbox.wow.armory")>
<cfset counter = findNoCase("{item ",arguments.string)>
<cfloop condition="counter gte 1">
<cfset codeblock = reFindNoCase("(?s)(.*)(\{item )(.*)(\})(.*)",arguments.string,1,1)>
<cfif arrayLen(codeblock.len) gte 6>
<cfset codeportion = mid(arguments.string, codeblock.pos[4], codeblock.len[4])>
<cfset result = armoryCFC.getItemLinkFromName(codeportion)>
<cfset newbody = mid(arguments.string, 1, codeblock.len[2]) & result & mid(arguments.string,codeblock.pos[6],codeblock.len[6])>
<cfset arguments.string = newbody>
<cfset counter = findNoCase("{item ",arguments.string,counter)>
<cfelse>
<cfset counter = 0>
</cfif>
</cfloop>
</cfif>
This references armory.cfc, so make it and add these two functions...
getItemLinkFromName
<cffunction name="getItemLinkFromName" access="remote" returntype="string">
<cfargument name="itemName" default="War-Feathered Loop">
<cfargument name="baseURL" required="false" default="http://armory.worldofwarcraft.com/">
<cfset var url = arguments.baseURL
& "search.xml?searchQuery=" & URLEncodedFormat(arguments.itemName)
& "&searchType=Items">
<cfset var itemsheet = makeHTTPCall(url)>
<!--- initialize variables to be used --->
<cfset var items = "">
<cfset var ret = "">
<cfif left(itemsheet.statuscode,3) neq "200">
<cfreturn arguments.itemName/>
</cfif>
<cfset items = XMLParse(itemsheet.fileContent).page.armorySearch.searchResults.items>
<cfif ArrayLen(items.XMLChildren) eq 0>
<cfreturn arguments.itemName/>
</cfif>
<cfset ret = "<a href='http://www.wowhead.com/?item=#items.XMLChildren[1].XMLAttributes.id#'>#arguments.itemName#</a>">
<cfreturn ret>
</cffunction> makeHTTPCall
<cffunction name="makeHTTPCall" returntype="struct">
<cfargument name="url" required="true">
<!---
Store the user agent that I am using with my browser
--->
<cfset var strUserAgent = (
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; " &
"rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3"
) />
<cfhttp
url="#arguments.url#"
method="GET"
result="armoryXML"
useragent="#strUserAgent#"
/>
<cfreturn armoryXML>
</cffunction>
Then add somewhere in your page, a script block for WOW Head ...
The magic in that script will add the popup to all links to wowhead.com, woo! If the item isn't found in the armory, it will just print the name of the item. Problem though, is if more than one item is found, it'll make a link to the first item. This is needed though. is made from . Doing a search for the boots returns the pattern as well. I'm guessing armory returns items in alphabetical order.
So what happened with making a [wowitem ...]? It was fine when there was only one in the post, but could wrap the first "[wowitem" with the final "]" if there was more than one. If someone with better regex knowledge than I can solve this, please share!