From 4d7731efa681f3f3ec4332e5140cab74e5274502 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Mon, 15 Jun 2015 11:45:25 -0500 Subject: [PATCH] Add support for dockapps not hosted in the git repository. Whether a dockapp is hosted or not is determined by the new "hosted" field in dockapps.db (1 = hosted, 0 = not hosted); --- dockapps/index.php | 51 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/dockapps/index.php b/dockapps/index.php index e157fde..d9d8aeb 100644 --- a/dockapps/index.php +++ b/dockapps/index.php @@ -38,14 +38,19 @@ include("../header.php");?>

Dockapps

$name\n"; echo "Category: " . $dockapps[$name]["category"] . "
\n"; - if ($dockapps[$name]["url"]) - echo "Original Website: "; + if ($hosted) + echo "Original "; + echo "Website: " . $dockapps[$name]["url"] . "
\n"; + } echo "Description: " . nl2br($dockapps[$name]["description"]) . "
\n"; $images = explode(",", $dockapps[$name]["image"]); @@ -54,24 +59,30 @@ if ($name) { foreach ($images as $image) echo "\n"; } - echo "

Available Versions:

\n"; - $versions = array(); - $info = $dockapps[$name]; - foreach ($info as $key => $value) { - if (substr($key, 0, 8) == "version-") - array_push($versions, - substr($key, strrpos($key, "-")+1)); - } - foreach ($versions as $version) { - echo "" . + if ($hosted) { + echo "

Available Versions:

\n"; + $versions = array(); + $info = $dockapps[$name]; + foreach ($info as $key => $value) { + if (substr($key, 0, 8) == "version-") + array_push($versions, + substr($key, strrpos($key, "-")+1)); + } + foreach ($versions as $version) { + echo "
" . "$name-$version
\n"; - - }?> + } + echo "

\nNote: By default, the above tarballs will "; + echo "save as dockapps-$string.tar.gz, where $string is a "; + echo "long string of hexadecimal characters. You may wish to "; + echo "right click and use the Save Link As... option.\n"; + } else { + echo "

\nThis dockapp is not maintained by the Window "; + echo "Maker Developers Team. Please visit the dockapp's "; + echo "website for downloads.\n"; + } +?>

-Note: By default, the above tarballs will save as -dockapps-$string.tar.gz, where $string is a long string of hexadecimal -characters. You may wish to right click and use the Save Link As... -option. If you would like to submit a patch to an existing dockapp or add a new dockapp to the repository, please follow these directions. - +

+Some of the dockapps listed are not maintained by the Window Maker Developers +Team. You may download these dockapps at their respective websites.

Categories