CHRlS
19. Dezember 2014 um 19:29
1
Hallo zusammen,
da ich zwischendrin danach gefragt werde hier einfach mal öffentlich.
Die Kontaktdaten werden zwar händisch gepflegt, stammen jedoch zentral aus unserem Github Account, wo sie auch gepflegt werden:
[
{
"name": "Template",
"url": "URL to your website with http(s)://",
"map": "URL to your map with http(s)://",
"prefix": "Prefix of your nodes names",
"Domaene": "Name of supporting FFRL Domain",
"Firmware": "URL to the Firmware",
"contacts": [
{
"firstname": "John",
"lastname": "Doe",
"nick": "JoDo",
"mail": "jodo@trashmail.com"
},
{
"firstname": "Jane",
"lastname": "Doe",
"nick": "",
"mail": "jado@trashmail.com"
Diese Datei wurde abgeschnitten. Original zeigen
Dort können auch selber Änderungen requested werden, wenn man ohnehin zufällig einen Github Account zur Hand hat.
Die Webseite zieht sich von dort die entsprechenden Kontakte zur Veröffentlichung auf der Homepage mittels eines Code-Snippets von Domi, das ebenfalls dort zu finden ist:
$comms_url = "https://raw.githubusercontent.com/ffruhr/website-stuff/master/communities/communities.json";
$comms_json = file_get_contents($comms_url);
$comms_arr = json_decode($comms_json,TRUE);
asort($comms_arr);
echo "<table>\n";
echo "<tr><td style=\"font-weight: bold; width: 230px;\">Stadt/Community</td>\n";
echo " <td style=\"font-weight: bold; width: 50px;\">Karte</td>\n";
echo " <td style=\"font-weight: bold;\">Ansprechpartner</td>\n";
echo " <td style=\"font-weight: bold;\">Domäne</td>\n";
echo " <td style=\"font-weight: bold;\">Firmware</td>\n";
echo "</tr>\n";
foreach($comms_arr as $community_arr) { // run through communities
$community = new stdClass();
$community = json_decode(json_encode($community_arr), FALSE);
if($community->name == "Template") continue; // ignore the template
echo "<tr>\n";
if($community->url) { // if url is present
echo " <td valign=\"top\" style=\"padding-left: 10px;\"><a href=\"$community->url\" target=\"_new\">• $community->name</a>"; // link community name
} else {
echo " <td valign=\"top\" style=\"padding-left: 10px;\">• $community->name"; // else print plaintext
Diese Datei wurde abgeschnitten. Original zeigen
Beste Grüße
Chris
1 „Gefällt mir“