mirror of
https://github.com/gryf/window-maker.github.io.git
synced 2025-12-17 11:10:18 +01:00
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);
This commit is contained in:
committed by
Carlos R. Mafra
parent
115102dd0f
commit
4d7731efa6
@@ -38,14 +38,19 @@ include("../header.php");?>
|
|||||||
<h1><a href=".">Dockapps</a></h1>
|
<h1><a href=".">Dockapps</a></h1>
|
||||||
<?php
|
<?php
|
||||||
if ($name) {
|
if ($name) {
|
||||||
|
$hosted = $dockapps[$name]["hosted"];
|
||||||
echo "<h2>$name</h2>\n";
|
echo "<h2>$name</h2>\n";
|
||||||
echo "<b>Category:</b> <a href=\"?category=" .
|
echo "<b>Category:</b> <a href=\"?category=" .
|
||||||
$dockapps[$name]["category"] . "\">" .
|
$dockapps[$name]["category"] . "\">" .
|
||||||
$dockapps[$name]["category"] .
|
$dockapps[$name]["category"] .
|
||||||
"</a><br/>\n";
|
"</a><br/>\n";
|
||||||
if ($dockapps[$name]["url"])
|
if ($dockapps[$name]["url"]) {
|
||||||
echo "<b>Original Website</b>: <a href=\"" . $dockapps[$name]["url"] .
|
echo "<b>";
|
||||||
|
if ($hosted)
|
||||||
|
echo "Original ";
|
||||||
|
echo "Website</b>: <a href=\"" . $dockapps[$name]["url"] .
|
||||||
"\">" . $dockapps[$name]["url"] . "</a><br/>\n";
|
"\">" . $dockapps[$name]["url"] . "</a><br/>\n";
|
||||||
|
}
|
||||||
echo "<b>Description:</b> " . nl2br($dockapps[$name]["description"]) .
|
echo "<b>Description:</b> " . nl2br($dockapps[$name]["description"]) .
|
||||||
"<br/>\n";
|
"<br/>\n";
|
||||||
$images = explode(",", $dockapps[$name]["image"]);
|
$images = explode(",", $dockapps[$name]["image"]);
|
||||||
@@ -54,24 +59,30 @@ if ($name) {
|
|||||||
foreach ($images as $image)
|
foreach ($images as $image)
|
||||||
echo "<img src=\"img/$image\"/>\n";
|
echo "<img src=\"img/$image\"/>\n";
|
||||||
}
|
}
|
||||||
echo "<h3>Available Versions:</h3>\n";
|
if ($hosted) {
|
||||||
$versions = array();
|
echo "<h3>Available Versions:</h3>\n";
|
||||||
$info = $dockapps[$name];
|
$versions = array();
|
||||||
foreach ($info as $key => $value) {
|
$info = $dockapps[$name];
|
||||||
if (substr($key, 0, 8) == "version-")
|
foreach ($info as $key => $value) {
|
||||||
array_push($versions,
|
if (substr($key, 0, 8) == "version-")
|
||||||
substr($key, strrpos($key, "-")+1));
|
array_push($versions,
|
||||||
}
|
substr($key, strrpos($key, "-")+1));
|
||||||
foreach ($versions as $version) {
|
}
|
||||||
echo "<a href=\"?download=$name-$version.tar.gz\">" .
|
foreach ($versions as $version) {
|
||||||
|
echo "<a href=\"?download=$name-$version.tar.gz\">" .
|
||||||
"$name-$version</a><br/>\n";
|
"$name-$version</a><br/>\n";
|
||||||
|
}
|
||||||
}?>
|
echo "<p/>\n<i>Note:</i> 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 <i>Save Link As...</i> option.\n";
|
||||||
|
} else {
|
||||||
|
echo "<p/>\nThis dockapp is not maintained by the Window ";
|
||||||
|
echo "Maker Developers Team. Please visit the dockapp's ";
|
||||||
|
echo "website for downloads.\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
<p/>
|
<p/>
|
||||||
<i>Note:</i> 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 <i>Save Link As...</i>
|
|
||||||
option.
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
} else if ($category) {
|
} else if ($category) {
|
||||||
@@ -93,7 +104,9 @@ the Window Maker Developers Team. You can browse the repository itself at
|
|||||||
<p/>
|
<p/>
|
||||||
If you would like to submit a patch to an existing dockapp or add a new dockapp
|
If you would like to submit a patch to an existing dockapp or add a new dockapp
|
||||||
to the repository, please follow <a href="http://repo.or.cz/w/wmaker-crm.git/blob/HEAD:/The-perfect-Window-Maker-patch.txt">these directions</a>.
|
to the repository, please follow <a href="http://repo.or.cz/w/wmaker-crm.git/blob/HEAD:/The-perfect-Window-Maker-patch.txt">these directions</a>.
|
||||||
|
<p/>
|
||||||
|
Some of the dockapps listed are not maintained by the Window Maker Developers
|
||||||
|
Team. You may download these dockapps at their respective websites.
|
||||||
<h2>Categories</h2>
|
<h2>Categories</h2>
|
||||||
<?php
|
<?php
|
||||||
$categories = array_unique(array_map("getCategory", $dockapps));
|
$categories = array_unique(array_map("getCategory", $dockapps));
|
||||||
|
|||||||
Reference in New Issue
Block a user