OK (*nix)';
} else {
echo 'Not executable! Please set directory permission of ' . $path . ' to 777.';
}
} else {
echo 'OK (Windows)';
}
} else {
echo 'Not writable! Please set directory permission of ' . $path . ' to 777.';
}
} else {
echo 'Not readable! Please set directory permission of ' . $path . ' to 777.';
}
} else {
echo 'Not existant! Please create directory ' . $path . '';
}
}
/**
* Function compares current WordPress version string against YAPB requirements
*
* @param string $installedWordPressVersion
**/
function checkWpVersion($installedWordPressVersion) {
global $yapb;
$works = false;
if ($installedWordPressVersion == $yapb->requiredWordPressVersion) {
// Same Version Strings
$works = true;
} else {
// Version strings do not equal
// Split the tokens for an 1:1 comparison
$version = explode('.', $installedWordPressVersion);
$required = explode('.', $yapb->requiredWordPressVersion);
// Equalize token length
if (count($version) < count($required)) {
$version = array_pad($version, count($required), '0');
}
if (count($required) < count($version)) {
$required = array_pad($required, count($version), '0');
}
// 1:1 comparsion of each an every token
for ($i=0, $len=count($required); $i<$len; $i++) {
// if the version is bigger than required:
// everything is ok: we quit with positive result
if ($version[$i] > $required[$i]) {
$works = true;
break;
}
// if the version is smaller than required:
// we quit with an negative result
if ($version[$i] < $required[$i]) {
$works = false;
break;
}
// if the result is equal we cycle to the next
// iteration or quit with positive result if
// this is the last iteration
if (($i == $len-1) && $version[$i] == $required[$i]) {
// Absolute Gleichheit
$works = true;
break;
}
}
}
// Output
if ($works) {
echo 'OK (' . $installedWordPressVersion . ')';
} else {
echo '' . $installedWordPressVersion . ' (YAPB ' . $yapb->pluginVersion . ' requires WordPress ' . $yapb->requiredWordPressVersion . ' or higher)';
}
}
/**
* Templating function
*
* @param string $name
* @param string $value
*/
function the_value($name, $value) {
if (empty($value)) $value = '-';
echo '| ' . $name . ' | ' . $value . ' |
';
}
?>
YAPB Diagnostics
YAPB Diagnostics
This information may help you getting YAPB to work.
Version Information
- YAPB Version: pluginVersion ?>
- WordPress version:
- WordPress version tested up to: highestTestedWordPressVersion ?>
- WordPress version required at least: requiredWordPressVersion ?>
Automatic Diagnostics
- WordPress Version:
- WordPress Upload Base Directory:
-
YAPB Cache Directory:
Debugging Information
This information (if given) will help me, getting your YAPB to work -
Every server configuration is unique and special ;-)
PHP / Webserver
WordPress
Options
Internal
| Info |
Value |
| wp_upload_dir() |
|
Constants
YAPB
Constants
Latest 10 YAPB images
| id |
post_id |
URI |
YapbImage::systemFilePath(URI) |
post guid |
posts . ' p
ON i.post_id = p.ID
ORDER BY i.id DESC
LIMIT 0,10';
$latest_images = $wpdb->get_results($query);
?>
|
| image_id ?> |
post_id ?> |
image_uri ?> |
image_uri) ?> |
post_guid ?> |