mirror of
https://github.com/sorenpeter/timeline.git
synced 2025-12-15 10:57:01 +00:00
Webmentions in topnav and config.ini
This commit is contained in:
parent
61e3311bb6
commit
97a97122bb
4 changed files with 10 additions and 4 deletions
|
|
@ -506,6 +506,9 @@ function getTwtsFromTwtxtString($url) {
|
||||||
$twtContent = str_replace("(#$hash)", '', $twtContent);
|
$twtContent = str_replace("(#$hash)", '', $twtContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Make ?tag= filtering feature
|
||||||
|
$twtContent = replaceTagsFromTwt($twtContent);
|
||||||
|
|
||||||
// Interpret the content as markdown
|
// Interpret the content as markdown
|
||||||
$Parsedown = new Parsedown();
|
$Parsedown = new Parsedown();
|
||||||
$twtContent = $Parsedown->text($twtContent);
|
$twtContent = $Parsedown->text($twtContent);
|
||||||
|
|
@ -515,8 +518,6 @@ function getTwtsFromTwtxtString($url) {
|
||||||
//$twtContent = replaceImagesFromTwt($twtContent);
|
//$twtContent = replaceImagesFromTwt($twtContent);
|
||||||
//$twtContent = replaceLinksFromTwt($twtContent);
|
//$twtContent = replaceLinksFromTwt($twtContent);
|
||||||
|
|
||||||
// TODO: Make ?tag= filtering feature
|
|
||||||
$twtContent = replaceTagsFromTwt($twtContent);
|
|
||||||
|
|
||||||
// TODO: Get mentions
|
// TODO: Get mentions
|
||||||
$mentions = getMentionsFromTwt($twtContent);
|
$mentions = getMentionsFromTwt($twtContent);
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ $profile = getTwtsFromTwtxtString($config['public_txt_url']);
|
||||||
if($_SESSION['password']=="$password") {*/ // Hacky login ?>
|
if($_SESSION['password']=="$password") {*/ // Hacky login ?>
|
||||||
<li><a href="<?= $baseURL ?>/refresh?url=<?= $url ?>"><i class="fa fa-refresh"></i><span>Refresh</span></a></li>
|
<li><a href="<?= $baseURL ?>/refresh?url=<?= $url ?>"><i class="fa fa-refresh"></i><span>Refresh</span></a></li>
|
||||||
<li><a href="<?= $baseURL ?>"><i class="fa fa-comments-o"></i><span>Timeline</span></a></li>
|
<li><a href="<?= $baseURL ?>"><i class="fa fa-comments-o"></i><span>Timeline</span></a></li>
|
||||||
|
<li><a href="<?= $baseURL ?>/profile?url=<?= $config['public_webmentions'] ?>"><i class="fa fa-at"></i><span>Mentions</span></a></li>
|
||||||
<li><a href="<?= $baseURL ?>/profile"><i class="fa fa-user-circle"></i><span>Profile</span></a></li>
|
<li><a href="<?= $baseURL ?>/profile"><i class="fa fa-user-circle"></i><span>Profile</span></a></li>
|
||||||
<li><a href="<?= $baseURL ?>/gallery?url=<?= $config['public_txt_url'] ?>"><i class="fa fa-picture-o"></i><span>Gallery</span></a></li>
|
<li><a href="<?= $baseURL ?>/gallery?url=<?= $config['public_txt_url'] ?>"><i class="fa fa-picture-o"></i><span>Gallery</span></a></li>
|
||||||
<li><a href="<?= $baseURL ?>/following"><i class="fa fa-users"></i><span>Following <?php // echo count($twtFollowingList); ?></span></a></li>
|
<li><a href="<?= $baseURL ?>/following"><i class="fa fa-users"></i><span>Following <?php // echo count($twtFollowingList); ?></span></a></li>
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,10 @@ twts_per_page = 50
|
||||||
; E-mail for comments
|
; E-mail for comments
|
||||||
email = ""
|
email = ""
|
||||||
|
|
||||||
|
; Webmentions log file
|
||||||
|
webmentions_txt_path = "./mentions.txt"
|
||||||
|
public_webmentions = "https://example.com/timeline/mentions.txt"
|
||||||
|
|
||||||
[security]
|
[security]
|
||||||
; Generate it with the TOTP module
|
; Generate it with the TOTP module
|
||||||
totp_digits = 10
|
totp_digits = 10
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
|
||||||
// Set path to your mentions twtxt file:
|
// Set path to your mentions twtxt file:
|
||||||
$logfile = './mentions.txt'; /* Make sure file is writeable */
|
//$logfile = './mentions.txt'; /* Make sure file is writeable */
|
||||||
|
$logfile = $config['webmentions_txt_path'];
|
||||||
|
|
||||||
|
|
||||||
if (!isset($_POST['source']) || !isset($_POST['target'])) {
|
if (!isset($_POST['source']) || !isset($_POST['target'])) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue