Thread Title Edit History

Thread Title Edit History 1.0.10

No permission to download
EDIT: Disregard previous.

Notified @Xon of current issue, which we narrowed down:

If a thread never had its title edited, none of the post histories can be viewed. If you make a thread title edit, then all the post histories in that thread can be viewed. Xon is working on correcting the problem.
 
Last edited:
This is a column name collision when the xf_thread and xf_post table are mashed together in the same query. Working on a fix now.
 
I just ran into a situation today where I found that thread title edits weren't saved in post history... looks like I'll need a plugin like this. Wish more people were using this one to ensure no bugs.
 
  • Like
Reactions: Xon
I just ran into a situation today where I found that thread title edits weren't saved in post history... looks like I'll need a plugin like this. Wish more people were using this one to ensure no bugs.
This addon was developed at the request of SpaceBattles to exactly the reason that title edits are not easily tracked, and is also used on Sufficient Velocity. As such, any bug reports will be handled as part of the support work I do for those sites.

It would be nice for more feedback, but this addon has been running well since early March and leverages the built-in XenForo edit history framework.
 
Hey Xon,

can you explain me how this is supposed to work?

I have installed it but I can't find any logs about thread titles.

The only log I can find is the "history" log under each posting (the button is called history). But I can't see thread title changes.
 
Last edited:
Hey Xon,

can you explain me hos this is supposed to work?

I have installed it but I can't find any logs about thread titles.

The only log I can find is the "history" log under each posting (the button is called history). But I can't see thread title changes.
Hi,

This addon obviously only kicks in once you edit a thread title while this addon is installed.

Once you have edited a thread title (you may need to refresh the page), there will be a "Title History" text/link under the thread title itself on the line describing the forum and date posted. It is quite muted so can be easy to miss.

There are some screenshot attached, but I might need to break out the highlighter.
 
  • Like
Reactions: sbj
Ah, now I know where it is supposed to be.

I know now why I couldn't discover the "title history" link.
Because I have this add-on installed (Thread Title in first Post by Chris D) and then the button isn't showing up.
Is it too much if I ask to make it compatible? Maybe later when you have time?
 
@sbj Should hopefully now work. It was a quick fix, with a new template modification. Hopefully it doesn't have any false positive matches.
 
  • Like
Reactions: sbj
Code:
# grep -iR edit_count *
SV/TitleEditHistory/Listener.php:            SV_TitleEditHistory_Install::addColumn('xf_thread','thread_title_edit_count', 'int not null default 0');
SV/TitleEditHistory/Listener.php:            SV_TitleEditHistory_Install::renameColumn('xf_thread','edit_count', 'thread_title_edit_count', 'int not null default 0');
SV/TitleEditHistory/EditHistoryHandler/Thread.php:        $dw->set('thread_title_edit_count', $dw->get('thread_title_edit_count') + 1);
SV/TitleEditHistory/EditHistoryHandler/Thread.php:        if ($dw->get('thread_title_edit_count'))
SV/TitleEditHistory/XenForo/DataWriter/Discussion/Thread.php:        $fields["xf_thread"]['thread_title_edit_count'] = array('type' => self::TYPE_UINT_FORCED, 'default' => 0);
SV/TitleEditHistory/XenForo/DataWriter/Discussion/Thread.php:            $this->set('thread_title_edit_count', $this->get('thread_title_edit_count') + 1);
UserEss/Install/Construct.php:                                                          $editArray[$contentId]['edit_count'] += 1;
UserEss/Install/Construct.php:                                                          $editArray[$contentId] = array('edit_count' => 1, 'edit_date' => $postEdit['edit_date'], 'edit_user_id' => $postEdit['edit_user_id']);
UserEss/Install/Construct.php:                                                          $postWriter->set('edit_count', $postWriter->get('edit_count') + $editArray[$postId]['edit_count']);
XenForo/ControllerPublic/EditHistory.php:               if (isset($content['edit_count']) && !$content['edit_count'])
XenForo/EditHistoryHandler/Post.php:            $dw->set('edit_count', $dw->get('edit_count') + 1);
XenForo/EditHistoryHandler/Post.php:            if ($dw->get('edit_count'))
XenForo/Install/Data/MySql.php:         edit_count INT UNSIGNED NOT NULL DEFAULT 0,
XenForo/Install/Upgrade/1020010-120a.php:                               ADD edit_count INT UNSIGNED NOT NULL DEFAULT 0
XenForo/Model/Post.php:         $newPost['edit_count'] = 0;
XenForo/DataWriter/DiscussionMessage.php:                       $fields[$structure['table']]['edit_count'] = array('type' => self::TYPE_UINT_FORCED, 'default' => 0);
XenForo/DataWriter/DiscussionMessage.php:                               if (!$this->isChanged('edit_count'))
XenForo/DataWriter/DiscussionMessage.php:                                       $this->set('edit_count', $this->get('edit_count') + 1);
XenForo/DataWriter/DiscussionMessage.php:                       if ($this->isChanged('edit_count') && $this->get('edit_count') == 0)
XenForo/DataWriter/DiscussionMessage.php:                       && $this->isUpdate() && $this->isChanged('edit_count') && $this->get('edit_count'))
XenForo/Importer/IPBoard.php:                                           'edit_count' => !empty($post['edit_date']) ? 1 : 0
XenForo/Importer/vBulletin.php:                                         'edit_count' => !empty($post['editdate']) ? 1 : 0
XenForo/Importer/XenForo.php:                                           'edit_count',
@MattW can you try uninstalling & then installing the addon again? This addon doesn't purge any data out of the xf_edit_history table.
 
Xon updated Thread Title Edit History with a new update entry:

Improve installer & uninstaller

  • Install now ensures incorrect old addon column names are properly renamed/removed if upgrading an older addon.
  • Uninstall now removes added columns and old edit history data.

You may need to run the following SQL to manually remove the columns.
Code:
alter table xf_thread drop column edit_count;
alter table xf_thread drop column last_edit_date;
alter table xf_thread drop column last_edit_user_id;

Thanks @The Sandman for reporting the issue.

Read the rest of this update entry...
 
Back
Top Bottom