PHP Code:
/**
* Strips away bbcode from a given string, leaving plain text
*
* @param string Text to be stripped of bbcode tags
* @param boolean If true, strip away quote tags AND their contents
* @param boolean If true, use the fast-and-dirty method rather than the shiny and nice method
* @param boolean If true, display the url of the link in parenthesis after the link text
* @param boolean If true, strip away img/video tags and their contents
* @param boolean If true, keep [quote] tags. Useful for API.
*
* @return string
*/
function strip_bbcode($message, $stripquotes = false, $fast_and_dirty = false, $showlinks = true, $stripimg = false, $keepquotetags = false)
So, Something like this?
PHP Code:
$result = $vbulletin->db->query_write("
SELECT linkid
, linkdesc
FROM " . TABLE_PREFIX . "linkslink
");
while ($link = $vbulletin->db->fetch_array($result)) {
$vbulletin->db->query_write(fetch_query_sql(
array('linkdesc' => strip_bbcode($link['linkdesc'])),
'linkslink',
"WHERE linkid = $link[linkid]"
));
}