$POD->setLibOptions('documentImageMaxWidth', '530'); $POD->setLibOptions('documentImageResize', 'documentImageResize'); $POD->setLibOptions('peopleIconMaxWidth', '60'); $POD->setLibOptions('peopleIconSquare', 'peopleIconSquare'); $POD->setLibOptions('peopleImageMaxWidth', '300'); $POD->setLibOptions('peopleImageResize', 'peopleImageResize'); // FIX THIS // set other default options!! $error = false; $POD->saveLibOptions(true); if ($POD->success()) { echo "<p>Defaults written to " . $POD->libOptions('etcPath') . '/options.php</p>'; $POD->loadAvailablePods(); foreach ($POD->PODS as $name => $podling) { if (in_array($name, $required_pods)) { $POD->enablePOD($name); } } $message = $POD->writeHTACCESS($installDir . "/.."); if (!$POD->success()) { $error = true; unlink($POD->libOptions('etcPath') . "/options.php"); echo '<p class="error">Could not write to .htaccess file! ' . $POD->error() . "</p>"; } else { $POD->saveLibOptions(true); echo "<p>{$message}</p>"; } } else { echo '<p class="error">Could not write to config file! ' . $POD->error() . "</p>"; $error = true; }
$POD->loadAvailablePods(); if ($_GET || $_POST) { if ($_GET) { $form = $_GET; } else { $form = $_POST; } } // if there is a POST coming in, this means I'm updating my pod preferences. if ($form) { ksort($POD->PODS); // iterate through each pod we know about. foreach ($POD->PODS as $name => $podling) { // if it was checked, enable it. if not, disable it. if ($form[$name]) { $message .= $POD->enablePOD($name); } else { if ($POD->isEnabled($name)) { $message .= $POD->disablePOD($name); } } } // save everything to lib/etc/options.php $POD->saveLibOptions(); if (!$POD->success()) { $message .= $POD->error(); } else { $POD->processIncludes(); $message .= $POD->writeHTACCESS($htaccessPath); } }