Check-in [2b7a3bb2bb]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Comment: | Introduce ./template/ |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
2b7a3bb2bb9ea4e728cbfee71015b417 |
User & Date: | mario 2014-07-08 09:27:21 |
2014-07-08
| ||
09:30 | Copy current sidebar setup of //freshcode.club check-in: f894e408bc user: mario tags: trunk, 0.4 | |
09:27 | Introduce ./template/ check-in: 2b7a3bb2bb user: mario tags: trunk | |
09:24 | Cut off at 7 tags. check-in: 60b589b3ad user: mario tags: trunk | |
Changes to index.php.
1 2 3 4 5 | <?php /** * api: php * title: Freshcode.club * description: FLOSS software release tracking website | | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | <?php /** * api: php * title: Freshcode.club * description: FLOSS software release tracking website * version: 0.4.2 * author: mario * license: AGPL * * Implements a freshmeat/freecode-like directory for open source * release publishing / tracking. * */ #-- init include("config.php"); #$_SESSION["openid"] = "http://milki.include-once.org/"; #-- dispatch switch ($page = $_GET->id["page"]) { case "index": case "projects": case "feed": |
Changes to page_feed.php.
162 163 164 165 166 167 168 | $o->output($f); } } #-- else print an info page else { | | | | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | $o->output($f); } } #-- else print an info page else { include("template/header.php"); ?> <section id=main> <h4>Feeds</h4> <p> You can get any projects <b>releases.json</b> feed using<br><tt>http://freshcode.club/feed/<i>projectname</i></tt>. </p> <p> Whereas using <i>xfer</i> will return the whole recent changes list. </p> <?php include("template/bottom.php"); } |
Changes to page_flag.php.
1 2 3 4 5 6 7 8 9 10 11 12 | <?php /** * type: page * title: Flagging * description: Allows users to flag project listings for moderator attention. * * A submission here will both increase the `release`.`flag` counter, * as well as leave a documentation entry in the `flags` table. * */ | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <?php /** * type: page * title: Flagging * description: Allows users to flag project listings for moderator attention. * * A submission here will both increase the `release`.`flag` counter, * as well as leave a documentation entry in the `flags` table. * */ include("template/header.php"); ?> <section id=main> <?php $name = $_REQUEST->proj_name["name"]; // submit if ($_REQUEST->has("reason", "note", "name")) { |
99 100 101 102 103 104 105 | <p>This is also a reasonable contact mechanism if you want to report another type of bug. For reclaiming a lost OpenID logon please preferrably contact us per mail.</p> HTML; } | | | 99 100 101 102 103 104 105 106 107 108 | <p>This is also a reasonable contact mechanism if you want to report another type of bug. For reclaiming a lost OpenID logon please preferrably contact us per mail.</p> HTML; } include("template/bottom.php"); ?> |
Changes to page_index.php.
18 19 20 21 22 23 24 | * HTML: * → RSS/Atom links for update feed comprised of all projects. * */ $header_add = "<link rel=alternate type=application/rss+xml href=/feed/xfer.rss>\n<link rel=alternate type=application/atom+xml href=/feed/xfer.atom>"; | | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | * HTML: * → RSS/Atom links for update feed comprised of all projects. * */ $header_add = "<link rel=alternate type=application/rss+xml href=/feed/xfer.rss>\n<link rel=alternate type=application/atom+xml href=/feed/xfer.atom>"; include("template/header.php"); include("template/sidebar_index.php"); ?> <section id=main> <?php // query projects $releases = db(" SELECT * FROM release_versions |
61 62 63 64 65 66 67 | <p class="release-notes trimmed"><b>$entry[scope]:</b> $entry[changes]</p> <p class=tags><img src="img/tag.png" width=30 align=middle height=22 border=0><a class=license>$entry[license]</a>{$_(wrap_tags($entry["tags"]))}</p> </article> HTML; } | | | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | <p class="release-notes trimmed"><b>$entry[scope]:</b> $entry[changes]</p> <p class=tags><img src="img/tag.png" width=30 align=middle height=22 border=0><a class=license>$entry[license]</a>{$_(wrap_tags($entry["tags"]))}</p> </article> HTML; } include("template/bottom.php"); ?> |
Changes to page_links.php.
10 11 12 13 14 15 16 | * + http://opensourcelinux.org/ * + http://www.linuxgames.com/ * + http://www.opensourcescripts.com/ * */ | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | * + http://opensourcelinux.org/ * + http://www.linuxgames.com/ * + http://www.opensourcescripts.com/ * */ include("template/header.php"); ?> <aside id=sidebar class="absolute-float community-web"> <section> <h5>Ecosystem</h5> Open Source development is driven by idealism and enthusiasm. While it's foremost about software and coding, the user community has an even larger stake in its progress. </section> |
169 170 171 172 173 174 175 | $row[3] </div> HTML; } | | | 169 170 171 172 173 174 175 176 177 178 179 | $row[3] </div> HTML; } include("template/bottom.php"); ?> |
Changes to page_login.php.
22 23 24 25 26 27 28 | $openid->identity = $_POST->uri["login_url"]; $openid->optional = array("namePerson/friendly"); exit(header("Location: " . $openid->authUrl())); } // else | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | $openid->identity = $_POST->uri["login_url"]; $openid->optional = array("namePerson/friendly"); exit(header("Location: " . $openid->authUrl())); } // else include("template/header.php"); ?> <section id=main> <?php // display login form if (empty($_SESSION["openid"])) { print<<<HTML |
74 75 76 77 78 79 80 | print isset($login_hint) ? "<p>$login_hint</p>" : "<p>You have already associated an OpenID name. <form action='/login/logout' method=POST><button>Logout</button></form></p>"; } | | | 74 75 76 77 78 79 80 81 82 | print isset($login_hint) ? "<p>$login_hint</p>" : "<p>You have already associated an OpenID name. <form action='/login/logout' method=POST><button>Logout</button></form></p>"; } include("template/bottom.php"); ?> |
Changes to page_projects.php.
18 19 20 21 22 23 24 | // current project id $name = $_REQUEST->proj_name["name"]; // inject RSS/Atom links $header_add = "<link rel=alternate type=application/rss+xml href=/feed/$name.rss>\n" . "<link rel=alternate type=application/atom+xml href=/feed/$name.atom>\n" . "<link rel=alternate type=json/vnd.freshcode.club href=/feed/$name.json>"; | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | // current project id $name = $_REQUEST->proj_name["name"]; // inject RSS/Atom links $header_add = "<link rel=alternate type=application/rss+xml href=/feed/$name.rss>\n" . "<link rel=alternate type=application/atom+xml href=/feed/$name.atom>\n" . "<link rel=alternate type=json/vnd.freshcode.club href=/feed/$name.json>"; include("template/header.php"); // fetch most current project/release entry $releases = db(" SELECT * FROM release_versions WHERE name = ? |
120 121 122 123 124 125 126 | VERSION_ENTRY; } ?> </article> <?php // html tail | | | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | VERSION_ENTRY; } ?> </article> <?php // html tail include("template/bottom.php"); /** * Convert "url1=, url2=, url3=" list into titled hyperlinks. * */ |
Changes to page_submit.php.
24 25 26 27 28 29 30 | "version", "state", "scope", "changes", "download", "urls", "autoupdate_module", "autoupdate_url", "autoupdate_regex", "submitter", "lock", ); // Start page output | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | "version", "state", "scope", "changes", "download", "urls", "autoupdate_module", "autoupdate_url", "autoupdate_regex", "submitter", "lock", ); // Start page output include("template/header.php"); ?> <aside id=sidebar> <section> <h5>Submit project<br>and/or release</h5> <p> You can submit <em title="Free, Libre, and Open Source Software">FLOSS</em> or <em title="or Solaris/Darwin/Hurd">BSD/Linux</em> software here. |
311 312 313 314 315 316 317 | </p> </form> HTML; } | | | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | </p> </form> HTML; } include("template/bottom.php"); // Output a list of select <option>s function form_select_options($names, $value, $r="") { $map = is_string($names) ? array_combine($names = str_getcsv($names), $names) : $names; if ($value and !isset($map[$value])) { $map[$value] = $map[$value]; } |
Changes to page_tags.php.
11 12 13 14 15 16 17 | * * Currently just outputs a plain search result list. Later versions * should delegate this to a proper /search feature. * */ | | | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * * Currently just outputs a plain search result list. Later versions * should delegate this to a proper /search feature. * */ include("template/header.php"); ?> <section id=main> <?php #-- search by tags if ($_GET->words["name"]) { |
76 77 78 79 80 81 82 | } } print "</p>"; } | | | 76 77 78 79 80 81 82 83 84 85 86 | } } print "</p>"; } include("template/bottom.php"); ?> |
Name change from layout_bottom.php to template/bottom.php.
Name change from layout_header.php to template/header.php.