Thread View while typing Reply
Homdax
Posted on 09-09-2005 14:02
Posts: 762
Joined: August 30 2005
A function I implemented at HWACCESS (manually) was the ability to see previous posts while typing the reply. Since we have pretty large text masses here, I think that might ease things when replying.
This would show as an scrolling window below the post that are being typed.
It will not work during editing of an existing post.
The implementation is manual, but involves only one coherent line of code, and adding one file to the site. It is documented at HWACCESS.
Opinions?
Edited by Homdax on 09-09-2005 14:02
Inert
Posted on 10-09-2005 16:59
Posts: 388
Joined: September 08 2005
It will be a good idea to implement. (I was wondering, in fact, why it hasn't been already.)
Homdax
Posted on 10-09-2005 19:16
Posts: 762
Joined: August 30 2005
Because if something screws up while doing it, I can blame whoever supported it...
No, becuse we do stuff that have a meaningful purpose, and that is announced and somewhat scrutinized before doing it.
Not to mention documented.
Glacialis
Posted on 10-09-2005 22:53
Posts: 368
Joined: September 02 2005
Vote aye. Very useful feature.
paladin1
Posted on 10-09-2005 23:42
Posts: 36
Joined: September 02 2005
It is a very useful feature as it is easier to type reply's to certain other members posts without having to go to the trouble of quoting eveyone.
I feel like a one legged man in an ASS kickin' contest!
TelQuessir
Posted on 11-09-2005 11:30
Posts: 2598
Joined: August 30 2005
Good thing to have - go for it.
Homdax
Posted on 11-09-2005 12:29
Posts: 762
Joined: August 30 2005
Acknowledged.
Inserted new file in to root/forum/
thread_review.php :
tablebreak();
opentable("Thread Review");
$itemsperpage = 20;
$rows = dbrows(dbquery("SELECT * FROM ".$db_prefix."posts WHERE thread_id='$thread_id'"));
if (!$rowstart) $rowstart = 0;
echo "
\n";
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."posts INNER JOIN ".$db_prefix."users ON ".$db_prefix."posts.post_author=".$db_prefix."users.user_id WHERE thread_id='$thread_id' ORDER BY post_datestamp DESC");
$numrows = dbrows($result);
$i = 0;
$sp = 1;
while ($data = dbarray($result)) {
$i++;
$message = $data['post_message'];
if ($data['post_smileys'] == "y") { $message = parsesmileys($message); }
$message = parseubb($message);
$message = nl2br($message);
//$message = wordwrap($message, 100, "\n", 1);
if ($data['post_edittime'] != "0") {
if ($data['post_author'] != $data['post_edituser']) {
$data2 = dbarray(dbquery("SELECT user_id,user_name FROM ".$db_prefix."users WHERE user_id='".$data['post_edituser']."'"));
$edituser = "".$data2['user_name']." ";
} else {
$edituser = "".$data['user_name']." ";
}
$edittime = strftime($settings['forumdate'], $data['post_edittime']+($settings['timeoffset']*3600));
}
if ($sp == 1) {
$cl = " class='tbl1'";
$sp = 2;
}
elseif ($sp == 2) {
$cl = " class='tbl1'";
$sp = 1;
}
echo "";
echo "";
echo "
$data[user_name]
Posted: ".strftime($settings['forumdate'], $data['post_datestamp']+($settings['timeoffset']*3600))."
$message ";
echo "
";
}
echo " ";
}
closetable();
?>
Changes made in existing root/forum/postreply.php:
Add after:
this:
include "thread_review.php";
Height of created scroll window may be changed by altering the value of:
which originally was 195, but I assumed it would mostly be too short.
The order in which the thread contents is showed, may also be altered by selecting to sort it differently, altering the SQL-command that presently is:
thread_id='$thread_id' ORDER BY post_datestamp DESC
But I figure viewing the last post on top, is the way to go, normally.
I hope it will be useful.
Edited by Homdax on 11-09-2005 13:03
Glacialis
Posted on 11-09-2005 15:28
Posts: 368
Joined: September 02 2005
Good implementation. Last first is indeed useful.
Homdax
Posted on 23-09-2005 10:36
Posts: 762
Joined: August 30 2005
Keeping for documentation.
Jump to Forum
Point Defense Systems 2 R&D Lab
PDS General Discussions
PDS Scenarios and Campaigns
Installation & Download Support
Gameplay Support
Coding / Scripting Support
Miscellaneous Support
Port of Nalthor (Roleplay Forum)
Chronicles of War
Officers' Lounge
Bookworm Zone
RL Military/History Discussions
Site Information
Site & Forum Issues