Jump to content

How toi convert tempelte from version 4.1 to version 4.3?


colobridge

Recommended Posts

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.";
}
?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated