Keep posts in the same forum when editing

Ben
Keep posts in the same forum when editing
Ben@84171e7c Saturday 22nd July 2023, 18:28:54

I was not sure if this is a bug or something that should be added as a feature. But whenever I edit a post in a particular forum, it automatically moves and places the post in a completely different forum. This is the forum that was chosen to show up under the blog.

It would be best if posts would stay in the forum they were originally assigned to unless a mod or admin wants to move them to another forum.

Last modified by Ben@84171e7c on Saturday 19th August 2023, 03:32:00

Replies 7
Tillreetree
Tillreetree@fc7e1f5a  Sunday 23rd July 2023, 00:49:28

At least I don't have this problem on my site

SurveyBuilder-Admin
SurveyBuilder-Admin  Sunday 23rd July 2023, 13:49:51

This is a easy fix, when you load the edit page, just have the select value.
<?php (isset({JSONTOARRAY}['forum']) ? {JSONTOARRAY}['forum'] : ''); ?>

Last modified by SurveyBuilder-Admin on Sunday 23rd July 2023, 13:50:00
Software engineer, creates plugins for Flatboard, checks source codes, and answers any software errors questions and contributes on the GitHub page as well

Ben
Ben@84171e7c  Monday 24th July 2023, 04:32:28

 

Thank you, but am not quite understanding where to place the code. I tried to add it to the opening line in edit.php but this resulted in a blank edit page. 😒

SurveyBuilder-Admin
SurveyBuilder-Admin  Monday 24th July 2023, 12:15:12

I should be a little more clearer about this,

Path: flatboard/edit.php
Line: 107

This isn't going to work, because $_GET['forum']; is not being received, so there will be no recognition to see if that is the forum it needs.

Last modified by SurveyBuilder-Admin on Monday 24th July 2023, 12:30:00
Software engineer, creates plugins for Flatboard, checks source codes, and answers any software errors questions and contributes on the GitHub page as well

Ben
Ben@84171e7c  Monday 24th July 2023, 15:11:13

 

Thanks, anyways SurveyBuilder, It was worth a try. I've given up and will just need to remember to select the correct forum when doing updates to existing posts.

Last modified by Ben@84171e7c on Monday 24th July 2023, 15:54:00

SurveyBuilder-Admin
SurveyBuilder-Admin  Monday 24th July 2023, 15:17:09

No problem, I have been working on my own project and well, the model for bootstrap doesn't work.
Software engineer, creates plugins for Flatboard, checks source codes, and answers any software errors questions and contributes on the GitHub page as well

Ben
Ben@49a5762e  Saturday 19th August 2023, 03:27:31

I have a simple solution to fix this:

To make the forum posts default to the same forums they are in and not choose by default the first forum on the Forum drop-down list which is in alphabetical order and then move that post to this possibly unrelated forum by default unless you select the original forum you edit a post. This is only visible for admins.

You can simply edit one line. Here is the original line 187 from the edit.php file found inside the Flatboard folder on your webserver.

' .HTMLForm::select('forum', $forumOptions, $forumEntry['name']) : ''). '['name'] 


And this gets replaced by this line which keeps the post you are editing in the same folder by default when you click submit.

' .HTMLForm::select('forum', $forumOptions, isset($topicEntry['forum']) ? $topicEntry['forum'] : '') : ''). ' 


You have no idea how many times I've had to go back and reedit a post again because I forgot to choose the original forum. It's nice to get this working.

Suggested Topics
started
11.5K 0
Tillreetree
Tillreetree@fc7e1f5a started Lost in Code - A Poem
Open Bar
25.4K 1
goopDat
goopDat@5e502df7 started Hello world!
Open Bar
14.5K 0
Want to read more? Browse all categories or view latest topics.