Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free:
Posted: Thursday, 8 February 2007 at 7:40PM (AEDT)
function Rebuild() {
$count = 0;
$dircount = 0;
$fh = fopen(dirname(__FILE__).'/smilies.js', 'w');
$fh2 = fopen(dirname(__FILE__).'/smilies.php', 'w');
$Smilies = "<?php\n";
$Output = "var arrSmilies = new Array();\n";
$SmiliesDir = $this->Context->Configuration["APPLICATION_PATH"] . $this->Context->Configuration["SMILIES_PATH"];
foreach( glob($SmiliesDir.'*', GLOB_ONLYDIR) as $dir ) {
$dircount++;
$Output .= "\narrSmilies[\"".basename($dir)."\"] = new Array();\n";
$i = 0;
foreach( glob($dir.'/*') as $file ) {
$link = $this->GetSmilieUrl(basename($file));
$imgurl = $this->GetSmilieImg(basename($dir), basename($file));
$Output .= "arrSmilies[\"".basename($dir)."\"][".$i."] = '";
$Output .= "<span onclick=\"insertSmilie(\'".$link."\');\" class=\"VanillaconsLink\"><img src=\"".$imgurl."\" alt=\"\" /></span>";
$Output .= "';\n";
$Smilies .= "\$Smilies[\"".$this->GetSmilieUrl(basename($file))."\"] = \"".$this->GetSmilieImg(basename($dir), basename($file))."\";\n";
$i++;
$count++;
}
}
1 to 38 of 38