To say I am shocked that there are no Instructions I can find in the Wiki or the Forum relating to Adding Extensions without
AutoMod, is an understatement.
However I did solve my problem in the case of
navens_tz_fix.zip by doing the following:
After Downloading
navens_tz_fix.zip I opened the Archive then VIewed the file 'install.xml'
I replaced the current script in includes/class_main.php
Code:
//Used by tzlist()
function array_flatten($array) {
$result = array();
foreach ($array as $key => $value) {
if (is_array($value)) {
$result = array_merge($result, $this->array_flatten($value));
}else{
$result[$key] = $value;
}
}
return $result;
}
//Creates a drop down list of all the timezones. (Used for people to set their time zones.)
public function tzlist($default = ""){
static $regions = array(
DateTimeZone::AFRICA,
DateTimeZone::AMERICA,
DateTimeZone::ANTARCTICA,
DateTimeZone::ASIA,
DateTimeZone::ATLANTIC,
DateTimeZone::EUROPE,
DateTimeZone::INDIAN,
DateTimeZone::PACIFIC
);
foreach ($regions as $name => $mask) {
$tzlist[] = DateTimeZone::listIdentifiers($mask);
}
$tzones = "<select name = 'tzones' id = 'tzones'>\n";
$tzones .= "<option value = 'GMT'".$selected.">GMT</option>\n";
$tzlist = $this->array_flatten($tzlist);
foreach ($tzlist as $tzone_key => $tzone_val) {
if($default == $tzone_val){
$selected = " selected";
}
$tzones .= "<option value = '".$tzone_val."'".$selected.">".$tzone_val."</option>\n";
unset($selected);
}
$tzones .= "</select>";
return $tzones;
}
With the Replace Script from the install.xml file:
Code:
//Creates a drop down list of all the timezones. (Used for people to set their time zones.)
public function tzlist($default = ""){
$tzones = "<select name = 'tzones' id = 'tzones'>";
$timezone_identifiers = DateTimeZone::listIdentifiers();
foreach($timezone_identifiers as $value){
$n++;
if($n == 1){
if($default == "GMT" || !$default){
$selected = " selected";
}
$tzones .= '<option value="GMT"'.$selected.'>GMT</option>';
}
unset($selected);
if(preg_match('/^(Africa|America|Antartica|Arctic|Asia|Atlantic|Australia|Europe|Indian|Pacific)\//', $value)){
$ex = explode("/", $value);//obtain continent,city
if($continent != $ex[0]){
$tzones .= '</optgroup>';
$tzones .= '<optgroup label="'.$ex[0].'">';
}
$city = str_replace("_", " ", $ex[1]);
$continent = $ex[0];
if($default == $value){
$selected = " selected";
}
$tzones .= '<option value="'.$value.'"'.$selected.'>'.$city.'</option>';
}
}
$tzones .= '</optgroup>';
$tzones .= '</select>';
return $tzones;
}
Everything is working as it should now!
I would still like to know the correct procedure on how to install extensions without AutoMod though!
All pertinent Links relating to the reason for installing this script are at:
http://thehostingtool.com/forum/thread-1...l#pid11252