[repo.or.cz] duojsonparge.git branch master updated: b93dcb04d051ef7eec082b82475c69480f79018d

2 views
Skip to first unread message

hahahahacker2009

<hahahahacker2009@gmail.com>
unread,
Aug 16, 2024, 12:43:10 PM8/16/24
to duovn894@googlegroups.com
This is an automated email generated because a ref change occurred in the
git repository for project duojsonparge.git.

The branch, master has been updated
via b93dcb04d051ef7eec082b82475c69480f79018d (commit)
via eb4147ed6ce91d7dd44b620b631015c13e1e084e (commit)
via 5f73910bc790f79ff6d4b390a92461aa97c89154 (commit)
via fafcf09ff50f46d11eb540cc984c863f53921daa (commit)
via 9e44155aca8e8f03b7905227629a15f678a6cd56 (commit)
via 3043c693a5acc82222d4f3753366f4993932de1e (commit)
via 808c3ebefe55a061658a5049b45fac6114a1da03 (commit)
from ffdc4efcfbdf413450db64f4b7a30505dfda39dd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 808c3ebefe55a061658a5049b45fac6114a1da03
Author: hahahahacker2009 <hahahaha...@gmail.com>
Date: Fri, 16 Aug 2024 21:19:21 +0700
URL: <https://repo.or.cz/duojsonparge.git/808c3ebefe55a061>

i dont like LICENSE

---
extra/{LICENSE => COPYING} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename extra/{LICENSE => COPYING} (100%)

diff --git a/extra/LICENSE b/extra/COPYING
similarity index 100%
rename from extra/LICENSE
rename to extra/COPYING

commit 3043c693a5acc82222d4f3753366f4993932de1e
Author: hahahahacker2009 <hahahaha...@gmail.com>
Date: Fri, 16 Aug 2024 21:22:07 +0700
URL: <https://repo.or.cz/duojsonparge.git/3043c693a5acc822>

we cannot have a generic title for every page

---
comment/index.php | 1 -
1 file changed, 1 deletion(-)

diff --git a/comment/index.php b/comment/index.php
index af79ab411dbf..38b0703fc7e4 100644
--- a/comment/index.php
+++ b/comment/index.php
@@ -17,7 +17,6 @@
?>
<?php
if (!isset($_SERVER['PATH_INFO']) || $_SERVER['PATH_INFO'] == '/') {
- $page_title = "Cac bai viet";
include "{$_SERVER['DOCUMENT_ROOT']}/comment/list.php";
exit;
} else {

commit 9e44155aca8e8f03b7905227629a15f678a6cd56
Author: hahahahacker2009 <hahahaha...@gmail.com>
Date: Fri, 16 Aug 2024 22:37:42 +0700
URL: <https://repo.or.cz/duojsonparge.git/9e44155aca8e8f03>

implement html export mode for myself

---
comment/config.php | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 comment/config.php

diff --git a/comment/config.php b/comment/config.php
new file mode 100644
index 000000000000..969f0a181f57
--- /dev/null
+++ b/comment/config.php
@@ -0,0 +1,3 @@
+<?php
+$mode = 0; /* 0 for dynamic site; 1 for static HTML page */
+?>

commit fafcf09ff50f46d11eb540cc984c863f53921daa
Author: hahahahacker2009 <hahahaha...@gmail.com>
Date: Fri, 16 Aug 2024 22:37:52 +0700
URL: <https://repo.or.cz/duojsonparge.git/fafcf09ff50f46d1>

handle when there is no page; support static html mode for myself

---
comment/list.php | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/comment/list.php b/comment/list.php
index 03dcec67a5a3..2819f568ccf2 100644
--- a/comment/list.php
+++ b/comment/list.php
@@ -16,6 +16,8 @@
*/
?>
<?php
+require_once("{$_SERVER['DOCUMENT_ROOT']}/comment/config.php");
+
$fn = "index.json";
$f = fopen($fn, "r");
$arr = json_decode(fread($f, filesize($fn)), true);
@@ -24,6 +26,9 @@ $n_rows = 20;
if (isset($_GET['page'])) {
$page = intval($_GET['page']);
}
+if ($mode == 1) {
+ $n_rows = 50;
+}
if (isset($_GET['nr']) && intval($_GET['nr']) <= 50) {
$n_rows = intval($_GET['nr']);
}
@@ -32,24 +37,38 @@ $start = ($page - 1) * $n_rows;
$last_key = max(array_keys($arr));
$n_pages = ceil($last_key / $n_rows);

+if ($page <= $n_pages) {
+ $page_title = "Trang $page";
+} else {
+ $page_title = "Không có trang này!";
+ include "{$_SERVER['DOCUMENT_ROOT']}/extra/header.html";
+ echo "<p>Không có trang này!</p>";
+ goto footer;
+}
+
include "{$_SERVER['DOCUMENT_ROOT']}/extra/header.html";
echo "<p>";
for ($p = 1; $p <= $n_pages; $p++) {
if ($p == $page) {
echo "| $p \n";
} else {
- echo "| <a href=\"/comment/?page=$p&&nr=$n_rows\">$p </a>\n";
+ if ($mode == 1) {
+ echo "| <a href=\"/page{$p}.html\">$p </a>\n";
+ } else {
+ echo "| <a href=\"/comment/?page=$p&&nr=$n_rows\">$p </a>\n";
+ }
}
}
echo "</p>";
+if ($mode == 0) {
?>
<form name="n_rows_form" action="/comment/" method="get">
<p>Số kết quả mỗi trang (<= 50)
<input type="text" name="nr" value="<?=$n_rows;?>" size="10">
<input type="submit" name="submit" value="Xem"></p>
</form>
-
<?php
+}
foreach ($arr as $i => $cmtarr) {
if ($i >= $start && $i < ($start + $n_rows)) {
echo "<p><strong><a href=\"/comment/{$cmtarr['id']}\">"
@@ -58,6 +77,7 @@ foreach ($arr as $i => $cmtarr) {
. "{$cmtarr['username']} {$cmtarr['datetime_string']}</pre>\n";
}
}
+footer:
include "{$_SERVER['DOCUMENT_ROOT']}/extra/footer.html";

fclose($f);

commit 5f73910bc790f79ff6d4b390a92461aa97c89154
Author: hahahahacker2009 <hahahaha...@gmail.com>
Date: Fri, 16 Aug 2024 23:42:09 +0700
URL: <https://repo.or.cz/duojsonparge.git/5f73910bc790f79f>

implement html static page

---
comment/list.php | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/comment/list.php b/comment/list.php
index 2819f568ccf2..94e679a93349 100644
--- a/comment/list.php
+++ b/comment/list.php
@@ -71,8 +71,13 @@ if ($mode == 0) {
}
foreach ($arr as $i => $cmtarr) {
if ($i >= $start && $i < ($start + $n_rows)) {
- echo "<p><strong><a href=\"/comment/{$cmtarr['id']}\">"
- . "{$cmtarr['title']}</a></strong></p>\n";
+ if ($mode == 1) {
+ echo "<p><strong><a href=\"/comment/{$cmtarr['id']}.html\">"
+ . "{$cmtarr['title']}</a></strong></p>\n";
+ } else {
+ echo "<p><strong><a href=\"/comment/{$cmtarr['id']}\">"
+ . "{$cmtarr['title']}</a></strong></p>\n";
+ }
echo "<pre>{$cmtarr['votes']} | bởi "
. "{$cmtarr['username']} {$cmtarr['datetime_string']}</pre>\n";
}

commit eb4147ed6ce91d7dd44b620b631015c13e1e084e
Author: hahahahacker2009 <hahahaha...@gmail.com>
Date: Fri, 16 Aug 2024 23:42:22 +0700
URL: <https://repo.or.cz/duojsonparge.git/eb4147ed6ce91d7d>

implement html static page

---
comment/view.php | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/comment/view.php b/comment/view.php
index 25b1de173d8b..61cef3e7cdc3 100644
--- a/comment/view.php
+++ b/comment/view.php
@@ -16,6 +16,9 @@
*/
?>
<?php
+require_once("{$_SERVER['DOCUMENT_ROOT']}/comment/config.php");
+?>
+<?php
function
walk_cmt($cmtarr) /* call: walk_cmt($arr['comment']); */
{
@@ -52,7 +55,11 @@ fclose($file);

$page_title = $arr['title'];
include "{$_SERVER['DOCUMENT_ROOT']}/extra/header.html";
-echo "<p><a href=\"/comment/\">danh sách bài viết</a></p>";
+if ($mode == 1) {
+ echo "<p><a href=\"/page1.html\">danh sách bài viết</a></p>";
+} else {
+ echo "<p><a href=\"/comment/\">danh sách bài viết</a></p>";
+}
echo "<h1>{$arr['title']}</h1>";
if (!isset($arr['user']['deactivated'])) {
echo "<pre>{$arr['user']['username']}</pre>";
@@ -62,7 +69,12 @@ if (!isset($arr['user']['deactivated'])) {
echo "<pre>Vote: {$arr['votes']}</pre>";

echo "{$arr['marked_down_message']}";
-echo "<pre><a href=\"/comment/$req\">{$arr['datetime_string']}</a></pre>";
+if ($mode == 1) {
+ $name = "$req.html";
+} else {
+ $name = $req;
+}
+echo "<pre><a href=\"/comment/$name\">{$arr['datetime_string']}</a></pre>";
echo "<h3>{$arr['num_comments']} bình luận</h3>";
walk_cmt($arr['comments']);
include "{$_SERVER['DOCUMENT_ROOT']}/extra/footer.html";

commit b93dcb04d051ef7eec082b82475c69480f79018d
Author: hahahahacker2009 <hahahaha...@gmail.com>
Date: Fri, 16 Aug 2024 23:42:37 +0700
URL: <https://repo.or.cz/duojsonparge.git/b93dcb04d051ef7e>

new forum

---
index.php | 1 +
1 file changed, 1 insertion(+)

diff --git a/index.php b/index.php
index 55ab78d8b207..bdda7e496be9 100644
--- a/index.php
+++ b/index.php
@@ -6,6 +6,7 @@ include "{$_SERVER['DOCUMENT_ROOT']}/extra/header.html";
<p>Đây là một trang lưu trữ một lượng lớn bài viết của diễn đàn Duolingo
tiếng Việt</p>
<p>mã nguồn: <a href="https://repo.or.cz/duojsonparge.git">repo.or.cz</a></p>
+<h2><a href="https://f894.forumvi.com">Diễn đàn mới</a></h2>
<p><a href="https://groups.google.com/g/duovn894">Hãy tham gia nhóm thư cho người dùng diễn đàn!</a><br></p>
<h2><a href="/comment/">Xem danh sách bài viết</a></h2>


-----------------------------------------------------------------------

Summary of changes:
comment/config.php | 3 +++
comment/index.php | 1 -
comment/list.php | 33 +++++++++++++++++++++++++++++----
comment/view.php | 16 ++++++++++++++--
extra/{LICENSE => COPYING} | 0
index.php | 1 +
6 files changed, 47 insertions(+), 7 deletions(-)
create mode 100644 comment/config.php
rename extra/{LICENSE => COPYING} (100%)


repo.or.cz automatic notification. Contact project admin hahahaha...@gmail.com
if you want to unsubscribe, or site admin ad...@repo.or.cz if you receive
no reply.
--
duojsonparge.git ("UNNAMED PROJECT")
Reply all
Reply to author
Forward
0 new messages