function at_block_titles() { $runningconfig = atGetRunningConfig(); extract($runningconfig); $blocktitle = trim(strip_tags($block['title'], "")); // Check if title is a language define if ($blocktitle[0] == "_" && defined($blocktitle)) { $blocktitle = constant($blocktitle); } // Look for image in themes/thename/images/lang/ then themes/thename/images/ $titleimage = strtolower(preg_replace("^\\W|_^", "", $blocktitle)); if (@file_exists($imagepath . "{$language}/{$titleimage}.gif")) { $block['title'] = "<img src=\"{$imagepath}" . "{$language}/{$titleimage}.gif\" border=\"0\" alt=\"{$blocktitle}\" />"; } elseif (@file_exists($imagepath . "{$titleimage}.gif")) { $block['title'] = "<img src=\"{$imagepath}" . "{$titleimage}.gif\" border=\"0\" alt=\"{$blocktitle}\" />"; } elseif (@file_exists($imagepath . "{$language}/{$titleimage}.jpg")) { $block['title'] = "<img src=\"{$imagepath}" . "{$language}/{$titleimage}.jpg\" border=\"0\" alt=\"{$blocktitle}\" />"; } elseif (@file_exists($imagepath . "{$titleimage}.jpg")) { $block['title'] = "<img src=\"{$imagepath}" . "{$titleimage}.jpg\" border=\"0\" alt=\"{$blocktitle}\" />"; } elseif (@file_exists($imagepath . "{$language}/{$titleimage}.png")) { $block['title'] = "<img src=\"{$imagepath}" . "{$language}/{$titleimage}.png\" border=\"0\" alt=\"{$blocktitle}\" />"; } elseif (@file_exists($imagepath . "{$titleimage}.png")) { $block['title'] = "<img src=\"{$imagepath}" . "{$titleimage}.png\" border=\"0\" alt=\"{$blocktitle}\" />"; } atCommandBuild($block, "block"); }
function at_headcontent($vars) { extract($vars); if ($headcontent[$modtemplate][$modops]) { extract($headcontent[$modtemplate][$modops]); $doit = 1; } elseif ($headcontent['default']) { extract($headcontent['default']); $doit = 1; } elseif (!isset($doit)) { return; } if (defined($title)) { $title = constant($title); } if (defined($keywords)) { $keywords = constant($keywords); } if (defined($description)) { $description = constant($description); } $page["title"] = $title; $page["keywords"] = $keywords; $page["description"] = $description; atCommandBuild($page, "page"); }
function atModCommand($command, &$output) { ${$command} = $output->GetOutput(); atCommandBuild(compact("{$command}")); }