elseif(mb_eregi('^[^<]*?]*)>(.*?)(.*)', $raw_content, $regs)) { $raw_content = $regs[3]; //check if the tag is in the right language if(($this->check_tag_language($regs[1]) === False)) { continue; } //check if the tag is for the right media if(($this->check_tag_media($regs[1]) === False)) { continue; } //this kind of file doesn't change the structure tags or their order. it only updates them $raw_template_patch_content = $regs[2]; while(True) { if(mb_eregi('^[^<]*?<([-_abcdefghijklmnopqrstuvwxyz][-_abcdefghijklmnopqrstuvwxyz0123456789]*)([^>]*?)>(.*?)(.*)', $raw_template_patch_content, $regs_2)) { $raw_template_patch_content = $regs_2[4]; echo("we got stucture tag!: ".$regs_2[1]."\n");//dbg //check if a structure tag with that name exists somewhere in $this->structure. if it does, we reset it with new info. foreach(($this->structure) as $k_structure => $v_structure) { echo($this->structure[$k_structure]->name."\n");//dbg if(mb_strtolower($this->structure[$k_structure]->name) === mb_strtolower($regs_2[1])) { echo(" match!\n");//dbg //we got a match. redo the structure tag with the new info. $this->structure[$k_structure] = new structure_tag($regs_2[1], $regs_2[2], $regs_2[3]); continue 2; } } continue; } else { break;//no tags left to process.. } } continue; }