=====Uncategory Actions=====
**actions/uncategory.php**
%%(php)
getPageTag();
$tag = $this->getPageTag();
$categorys = $this->LoadAll("select tag from ".$this->config["table_prefix"]."pages where latest = 'Y' and body like '%{{category%'");
foreach ($categorys as $i)
{
$tmp_sql_like .= " and body not like '%" . $i['tag'] . "%'";
}
$results = $this->LoadAll("select tag from ".$this->config["table_prefix"]."pages where latest = 'Y' and tag !='" .$tag. "' " .$tmp_sql_like);
if ($results)
{
if (!$compact) $str .= ' pages:
';
else $str .= '';
$count = 0;
$pagecount = 0;
$list = array();
echo $this->Format('====' . PAGE_HEADING . '==== --- <<'. TEXT_CAPTION. '--- << ::c:: ---');
foreach ($results as $i => $cpage)
// check page distint current page and user write privileges
if($cpage['tag'] != $page && $this->HasAccess('write', $cpage['tag']))
{
array_push($list,$cpage['tag']);
}
sort($list);
while (list($key, $val) = each($list)) {
if ($count == $col & !$compact) { $str .= "
"; $count=0; }
if (!$compact) $str .= ''.$this->Format('[['.$val.']]'). ' | ' ."\n" ;
else $str .= ''.$this->Format('[['.$val.' | '.preg_replace( "/Category/", "",$val).']]').'' ;
$count++;
$pagecount++;
}
$str = 'The following '.$pagecount.$str;
if (!$compact) $str .= '
'; else $str .= '';
}
else $str = 'Not exists pages without category to be written or modify';
if ($count==0){
$str = 'Not exists pages without category to be written or modify';
}
print($str);
}
?>%%
----
CategoryUserContributions