colobridge Posted December 6, 2010 Share Posted December 6, 2010 (edited) Hallo all, how to convert templete from version 4.1 to version 4.3? I cannot launch custom templete I used on version 4.1 on 4.3. Is there some type export possibilities or at list some templete validation checker? Edited December 6, 2010 by colobridge 0 Quote Link to comment Share on other sites More sharing options...
jeremyhaber Posted December 6, 2010 Share Posted December 6, 2010 Version 4.1 and version 4.3 use the exact same template system and WHMCS should be able to use your template with no problem. Are you asking what files are new to the template directory since version 4.1? This code will compare the two directories to find out what files don't exist in the old template file: <?php $templateDirBase = "{WHMCS ROOT DIRECTORY}/templates/"; // Main template directory "WHMCSDIR/templates/" $templateOld = "old_default"; // Your version 4.1 template $templateNew = "default"; // Your version 4.3 template (default is overwritten on upload) /* ================ DO NOT MODIFY PAST HERE! ===================== */ $oldArray = array(); $newArray = array(); $cmpArray = array(); if ($handle = opendir($templateDirBase.$templateOld)) { while (false !== ($file = readdir($handle))) { $oldArray[] = $file; } closedir($handle); } if ($handle = opendir($templateDirBase.$templateNew)) { while (false !== ($file = readdir($handle))) { $newArray[] = $file; } closedir($handle); } $cmpArray = array_diff($newArray, $oldArray); if (count($cmpArray)) { echo "The following files are in the new template:<br /><ul>"; foreach ($cmpArray as $tmp) { echo "<li>".$tmp."</li>"; } echo "</ul>"; } else { echo "There was no difference found between the template folders."; } ?> 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.