From f542656bc995109a2e3dcf4b445bb76c860ce677 Mon Sep 17 00:00:00 2001 From: biglyderv Date: Fri, 7 Feb 2025 11:37:04 -0500 Subject: [PATCH] bugfixes, refactoring --- docs/comment.php | 2 -- docs/meta.php | 35 ++-------------------------------- docs/stats.php | 19 +++---------------- libs/markdown.php | 48 ++++++++++++++++------------------------------- libs/page.php | 40 ++++++++++++++++++++++++++++----------- 5 files changed, 50 insertions(+), 94 deletions(-) diff --git a/docs/comment.php b/docs/comment.php index 1abcdda..4b2c20e 100644 --- a/docs/comment.php +++ b/docs/comment.php @@ -4,8 +4,6 @@ require(__DIR__ . "/../libs/page.php"); require(__DIR__ . "/../libs/form.php"); require(__DIR__ . "/../libs/comment.php"); -$ref = 1732684297; - page_header(); comments("comment", $_GET['id']); page_footer(); diff --git a/docs/meta.php b/docs/meta.php index ba9c6f2..cddee71 100644 --- a/docs/meta.php +++ b/docs/meta.php @@ -50,28 +50,13 @@ function get_handler() $followers = $stmt->fetchAll(PDO::FETCH_DEFAULT); } get_handler(); -//todo: rewrite ?>

Following

-
-
- -
-
- - - - -
-
-
-
- @@ -79,23 +64,7 @@ get_handler(); -
-
- -
-
- - - - -
-
-
-
- - diff --git a/docs/stats.php b/docs/stats.php index 0edcbf2..cdf0f09 100755 --- a/docs/stats.php +++ b/docs/stats.php @@ -27,22 +27,9 @@ function get_handler() $api = file_get_contents($node_backend . "/top?ref=" . $_GET['username']); $pr = json_decode($api); - foreach ($pr as $usern => $rr) { ?> -
-
- -
-
- - - - -
-
-
-
Power:
-
- $rr) { + user_block($usern, $rr, "Popularity"); + } } get_handler(); diff --git a/libs/markdown.php b/libs/markdown.php index eec5fd0..28a7656 100755 --- a/libs/markdown.php +++ b/libs/markdown.php @@ -2,40 +2,24 @@ function markdown($text) { $search = array( - '~(https://[^.]+\.dervland\.net/[^\s<]+\.(png|jpg|jpeg|gif))~i', - '~(https://[^.]+\.dervland\.net/[^\s<]+\.(mp3|wav))~i', - '~(https://[^.]+\.dervland\.net/[^\s<]+\.(webm|mp4))~i', - //'~(https://studio\.penguinmod\.com/[^\s
$1
', - '
$1
', - '
$1
', - //'https://studio.penguinmod.com/?#$2', - //'
$1
', - '$0', - '@$1', - '$2', - '$2', - '$2', - '', - '
  • $2
  • ', - '

    $2

    ', - '$4', - '$2' - ); + '
    $1
    ', + '
    $1
    ', + '
    $1
    ', + //'https://studio.penguinmod.com/?#$2', + //'
    $1
    ', + '$0', + '@$1', + ); $text = preg_replace($search, $replace, $text); diff --git a/libs/page.php b/libs/page.php index 81f7494..cfd9c0a 100755 --- a/libs/page.php +++ b/libs/page.php @@ -7,8 +7,8 @@ function page_header() global $username; $stmt = $db->prepare("SELECT * FROM comment WHERE targetType = ? AND targetId = ? ORDER BY date DESC"); $stmt->execute([ - "notification", - $username, + "notification", + $username, ]); $posts2 = $stmt->fetchAll(PDO::FETCH_DEFAULT); @@ -25,21 +25,39 @@ function page_header()
    BiglyChat - + Wall Mail Users - Leave + Leave Join -Users -Users +
    - - - - + + + +
    +
    + +
    +
    + + + + +
    +
    +
    + $tag: $meta"; ?> +
    +