Some tweaks I'm porting over from am32.org #80

Merged
ben merged 4 commits from :master into master 2021-01-03 23:45:00 +00:00
7 changed files with 20 additions and 3 deletions

View File

@ -1,7 +1,9 @@
<hr>
<footer class="text-center">
<pre>ECDSA fingerprint: SHA256:R3qNfKIF3IiXhKCbFX6rCKl73yzexi9Wodsow6XFres</pre>
<a href="https://tildegit.org/team/site">page source</a>
<a href="https://tildegit.org/team/site">site source</a>
&mdash;
<a href="https://tildegit.org/team/site/src/branch/master/<?=str_ireplace("/var/www/tilde.team/","",$filepath)?>">page source</a>
&mdash;
<a href="https://bhh.sh/donate/">donate</a>
</footer>

View File

@ -1,4 +1,6 @@
<?php
$path = new SplFileInfo(__FILE__);
$filepath = $path->getRealPath();
Review

__FILE__ should have the same contents here, is there a difference with the getRealPath() method?

`__FILE__` should have the same contents here, is there a difference with the getRealPath() method?
Review

looks like you can use realpath(__FILE__) to avoid instantiating another object but just __FILE__ would probably be fine

looks like you can use [`realpath(__FILE__)`](http://php.net/realpath) to avoid instantiating another object but just `__FILE__` would probably be fine
include 'header.php';
require __DIR__.'/vendor/autoload.php';
$parser = Tildeverse\Wiki\Parser::factory();
@ -73,8 +75,11 @@ $parser = Tildeverse\Wiki\Parser::factory();
<div class="list-group-item">
<h3 class="list-group-item-heading"><?=$yaml["title"]?></h3>
<em>
<a href="/news/<?=basename($page, ".md")?>">
<?=$yaml["date"]?></a> - <a href="/~<?=$yaml["author"]?>/"><?=$yaml["author"]?></a>
<a href="/news/<?=basename($page, ".md")?>"><?=$yaml["date"]?></a>
Outdated
Review

i think i prefer having the link on the date instead of the name. i guess it's just a preference thing

i think i prefer having the link on the date instead of the name. i guess it's just a preference thing
</em>
&bull;
<em>
<a href="/~<?=$yaml["author"]?>/"><?=$yaml["author"]?></a>
</em>
<hr>
<div class="list-group-item-text"><?=$parsed->getContent()?></div>

View File

@ -1,4 +1,6 @@
<?php
$path = new SplFileInfo(__FILE__);
$filepath = $path->getRealPath();
require __DIR__.'/../vendor/autoload.php';
$additional_head = "

View File

@ -1,4 +1,6 @@
<?php
$path = new SplFileInfo(__FILE__);
$filepath = $path->getRealPath();
include __DIR__.'/../header.php';
?>

View File

@ -1,4 +1,6 @@
<?php
$path = new SplFileInfo(__FILE__);
$filepath = $path->getRealPath();
require __DIR__.'/../vendor/autoload.php';
require_once "email/smtp.php";

View File

@ -1,4 +1,6 @@
<?php
$path = new SplFileInfo(__FILE__);
$filepath = $path->getRealPath();
include __DIR__.'/../header.php';
$online_users = shell_exec("online-users");

View File

@ -1,4 +1,6 @@
<?php
$path = new SplFileInfo(__FILE__);
$filepath = $path->getRealPath();
require __DIR__.'/../vendor/autoload.php';
$additional_head = "