• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Thread Title Edit History 1.0.8

No permission to download

Xon

Well-known member
#1

Isil`Zha

Active member
#2
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:

Xon

Well-known member
#3
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.
 

Xon

Well-known member
#4

Ludachris

Well-known member
#8
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.
 

Xon

Well-known member
#9
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.
 

sbj

Well-known member
#10
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:

Xon

Well-known member
#11
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.
 

sbj

Well-known member
#12
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?
 

Xon

Well-known member
#17
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

Well-known member
#20
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...