Change Content Owner or Date

Change Content Owner or Date 2.0.15

No permission to download
I installed
PHP Calendar extension. into my server

but if I try to install the addon, it keep saying
  • Change Content Owner requires PHP Calendar extension.
 
I got this error spammed in the logs:
Code:
Server error log
ErrorException: Template error: [E_USER_WARNING] Method canChangeDate is not callable on the given object (SV\ThreadReplyBanTeeth\XF\Entity\Post) src/XF/Template/Templater.php:1186
Generated by: Unknown account Nov 13, 2021 at 9:23 PM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/nginx/dom...', 1186)
#1 src/XF/Template/Templater.php(1186): trigger_error('Method canChang...', 512)
#2 internal_data/code_cache/templates/l1/s61/public/tckChangeContentOwner_macros.php(30): XF\Template\Templater->method(Object(SV\ThreadReplyBanTeeth\XF\Entity\Post), 'canChangeDate', Array)
#3 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, NULL)
#4 src/addons/MaZ/AMP/XF/Template/Templater.php(103): XF\Template\Templater->callMacro('tckChangeConten...', 'action_link', Array, Array, Object(XF\Template\MacroState))
#5 internal_data/code_cache/templates/l1/s61/public/post_macros.php(784): MaZ\AMP\XF\Template\Templater->callMacro('tckChangeConten...', 'action_link', Array, Array)
#6 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, NULL)
#7 src/addons/MaZ/AMP/XF/Template/Templater.php(103): XF\Template\Templater->callMacro('post_macros', 'post_action_bar', Array, Array, Object(XF\Template\MacroState))
#8 internal_data/code_cache/templates/l1/s61/public/post_macros.php(553): MaZ\AMP\XF\Template\Templater->callMacro(NULL, 'post_action_bar', Array, Array)
#9 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, NULL)
#10 src/addons/MaZ/AMP/XF/Template/Templater.php(103): XF\Template\Templater->callMacro('post_macros', 'post_footer', Array, Array, Object(XF\Template\MacroState))
#11 internal_data/code_cache/templates/l1/s61/public/post_macros.php(106): MaZ\AMP\XF\Template\Templater->callMacro(NULL, 'post_footer', Array, Array)
#12 src/XF/Template/Templater.php(987): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#13 src/XF/Template/Templater.php(923): XF\Template\Templater->renderExtensionInternal('footer', Array, Array, Object(XF\Template\ExtensionSet))
#14 internal_data/code_cache/templates/l1/s61/public/post_macros.php(125): XF\Template\Templater->renderExtension('footer', Array, Object(XF\Template\ExtensionSet))
#15 src/XF/Template/Templater.php(987): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#16 src/XF/Template/Templater.php(923): XF\Template\Templater->renderExtensionInternal('main_cell_inner', Array, Array, Object(XF\Template\ExtensionSet))
#17 internal_data/code_cache/templates/l1/s61/public/post_macros.php(136): XF\Template\Templater->renderExtension('main_cell_inner', Array, Object(XF\Template\ExtensionSet))
#18 src/XF/Template/Templater.php(987): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#19 src/XF/Template/Templater.php(923): XF\Template\Templater->renderExtensionInternal('main_cell', Array, Array, Object(XF\Template\ExtensionSet))
#20 internal_data/code_cache/templates/l1/s61/public/post_macros.php(148): XF\Template\Templater->renderExtension('main_cell', Array, Object(XF\Template\ExtensionSet))
#21 src/XF/Template/Templater.php(987): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#22 src/XF/Template/Templater.php(923): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#23 internal_data/code_cache/templates/l1/s61/public/post_macros.php(193): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#24 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#25 src/addons/MaZ/AMP/XF/Template/Templater.php(103): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array, Object(XF\Template\MacroState))
#26 internal_data/code_cache/templates/l1/s61/public/thread_view.php(853): MaZ\AMP\XF\Template\Templater->callMacro(NULL, 'post_macros::po...', Array, Array)
#27 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, Object(XF\Template\ExtensionSet))
#28 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('thread_view', Array, true, NULL)
#29 src/XF/Template/Templater.php(1642): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('public:thread_v...', Array, true, NULL)
#30 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('thread_view_typ...', Array, true, NULL)
#31 src/XF/Template/Template.php(24): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('public:thread_v...', Array)
#32 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#33 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\ViewT...', 'public:amp_thre...', Array)
#34 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#35 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#36 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#37 src/XF/App.php(2345): XF\Mvc\Dispatcher->run()
#38 src/XF.php(512): XF\App->run()
#39 index.php(20): XF::runApp('XF\\Pub\\App')
#40 {main}
Request state
array(4) {
  ["url"] => string(75) "/threads/nba-2k21-next-gen-swaps-the-neighbourhood-for-the-city.8988/?amp=1"
  ["referrer"] => bool(false)
  ["_GET"] => array(2) {
    ["/threads/nba-2k21-next-gen-swaps-the-neighbourhood-for-the-city_8988/"] => string(0) ""
    ["amp"] => string(1) "1"
  }
  ["_POST"] => array(0) {
  }
}
 
Could you try disabling thread reply ban teeth add-on and/or AMP add-on to see if you are still being bombarded by the error logs?
 
Is it safe to change the owner of the thread to a member registered after the thread post date?

It seems to have worked but just wondered if there's any complications?
 
So I went thru the 25 pages and (probably) missed it... but if you change the date on a thread, are the replies supposed to be affected (date) as well? I assumed that's what the interval setting was for? I'm able to change the owner and the date without issue / errors.
 
You can only select one content type at a time, so just posts. I do not consider first post of a thread as a post for some reason I don't recall anymore.
 
so logically you can accomplish what you want to do by selecting all posts in a thread do a interval time change.

ah right. first post would have to be dealt with manually it seems.
 
You can only select one content type at a time, so just posts. I do not consider first post of a thread as a post for some reason I don't recall anymore.
I'm getting confused :) So open a thread. Let's say I first change the thread starters owner. Next action, change the date. Interval is set, say 40 minutes apart. Each post in the thread is still selected. Go. At this point, the first post gets the date you choose, then all remaining posts in the thread get new date/times based on the interval. Correct?
 
from my understanding. first select all the posts in a thread except for the first one.
change time as per your requirement.
then change the time of the first post of the thread from the thread menu.

(this is assuming you want to move forward the time. if you want to move back, change the thread time first i guess. because if the time of an older post is changed to time before the first post, another post would become the first post)

you do not see this addon's option from the moderation bar if the first post in the thread is select. you have to manage it independently from the thread menu bar at the top-right side.
 
Last edited:
Go. At this point, the first post gets the date you choose, then all remaining posts in the thread get new date/times based on the interval. Correct?
Nope.

You need to do something like this in order to achieve what you're looking for:
  1. Change the thread start date to say something like 1st January 2020 and time to 1:00PM
  2. Select all the posts of the above selected thread, set the time to 1st January 2020 , time to 1:40PM and time interval to 40 minutes
 
  1. Change the thread start date to say something like 1st January 2020 and time to 1:00PM
  2. Select all the posts of the above selected thread, set the time to 1st January 2020 , time to 1:40PM and time interval to 40 minutes
FYI ... using this method, all posts under the OP inherit the same time set in #2, the interval is ignored. In addition, the posts do not show-up in What's New - Latest posts. It's entirely possible that I'm expecting this to do a lot more than it was intended to do, if so... apologies!

I've got a lot of great content that is rather old, but still very relevant. In some cases the original author is no longer around and/or I want to use this addon as a way to "bump" these threads, without showing a post from 2001 on the top of a forum :p

I thought I read in this thread somewhere that cache rebuilding is not required, giving that a shot anyway.
 
The time interval selected will be applied to each of the posts/content you have selected.

For example, you select 5 posts and you set the time to 01:00:00 and the time interval to 00:05:00 then the final time for all the posts would be something like:
  • 01:00:00
  • 01:05:00
  • 01:10:00
  • 01:15:00
  • 01:20:00
Oh... this is powerful. I didn't realise this is how it worked.
 
Top Bottom