reply feature frontend #49

Closed
opened 2021-09-03 22:51:15 +02:00 by BodgeMaster · 1 comment
  • add a reply button that triggers a special mode for the post form
  • add that special mode to the post form that tells the submit page which post to reply to
  • add a special mode to the submit page that gets triggere when it is told to reply to a post
  • add links that point to the messages that the reply is for

For the special mode, just put something in the submit PHP where it goes like this:

// save a reference of which message this reply is for
$reply_to = <code to get a unique post identifier>;
// do nothing with this because we are waiting for issue #50

I don’t exactly recall how we implemented posts but the unique identifier may be just the ID if it’s unique across all threads or it may be an array containing a bunch of information like post ID, board ID, thread ID... (I know, board ID is currently not implemented and threads are being referred to as boards.)

Similarly, you can put a section like this in the part where posts are being loaded to add the link:

// determine if this is a reply to a specific message
// actually don't bc we are waiting for issue #50
$reply_to = [just hard-code a reference always pointing to the first message on the thread];
if (isset($reply_to)) {
echo "Reply to: <a href=\"?jump=[get message ID from $reply_to]\" >" . [grab message title from db] . "</a>";
}
- add a reply button that triggers a special mode for the post form - add that special mode to the post form that tells the submit page which post to reply to - add a special mode to the submit page that gets triggere when it is told to reply to a post - add links that point to the messages that the reply is for For the special mode, just put something in the submit PHP where it goes like this: ```php // save a reference of which message this reply is for $reply_to = <code to get a unique post identifier>; // do nothing with this because we are waiting for issue #50 ``` I don’t exactly recall how we implemented posts but the unique identifier may be just the ID if it’s unique across all threads or it may be an array containing a bunch of information like post ID, board ID, thread ID... (I know, board ID is currently not implemented and threads are being referred to as boards.) Similarly, you can put a section like this in the part where posts are being loaded to add the link: ```php // determine if this is a reply to a specific message // actually don't bc we are waiting for issue #50 $reply_to = [just hard-code a reference always pointing to the first message on the thread]; if (isset($reply_to)) { echo "Reply to: <a href=\"?jump=[get message ID from $reply_to]\" >" . [grab message title from db] . "</a>"; } ```
BodgeMaster added the
ToDo
Priority: Normal
labels 2021-09-03 22:51:15 +02:00
Myos was assigned by BodgeMaster 2021-09-03 22:51:15 +02:00
Poster
Collaborator

So I just went ahead and implemented it.

So I just went ahead and implemented it.
Sign in to join this conversation.
There is no content yet.