[CDB] Move Topics When Locked

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 4067
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [DEV] Move Topics When Locked

Post by kasimi »

pantherfan wrote:I have set user permissions to be able to lock their own topics
Can you explain how you did that? I can't remember ever seeing this permission in phpBB, is there an extension that adds this?
pantherfan wrote:when I lock a topic in the quick mod tools, I get the following error
Does it work when you lock the topic using the MCP? I just tested both quick mod tools and MCP (again) and it worked fine.

pantherfan
Registered User
Posts: 44
Joined: Thu Nov 12, 2015 12:15 am
Name: Tangela

Re: [DEV] Move Topics When Locked

Post by pantherfan »

Under users and groups>groups>group forum permissions>actions, there is a can lock own topics radio button.

Where in the acp/mcp are you able to manage topics?

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 4067
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [DEV] Move Topics When Locked

Post by kasimi »

pantherfan wrote:there is a can lock own topics radio button
Interesting, thanks for the pointer. :mrgreen:

It works on my test board. If your board is online, can you give me access to a test account? Otherwise I'll guide you through grabbing the error message from your browser's dev tools.

To lock a topic in the MCP, browse to the forum, click the MCP link at the top, select the topics you want locked, scroll all the way down to "Select desired action" and select "Lock". This way you can lock multiple topics.

pantherfan
Registered User
Posts: 44
Joined: Thu Nov 12, 2015 12:15 am
Name: Tangela

Re: [DEV] Move Topics When Locked

Post by pantherfan »

This is the error I get when I try to lock/unlock a topic: [link to post]
AJAX ERROR
Internal Server Error

I will make you a test account for you to see.

witvisser
Registered User
Posts: 62
Joined: Wed Nov 25, 2009 9:08 am

Re: [DEV] Move Topics When Locked

Post by witvisser »

Today, i tested this extension on my test board 3.1.6.
First i added the code in the file includes/mcp/mcp_main.php as intended in the first post of this topic.
Then upload the changed file and the extesion and enable the extesion.
In the ACP tab Forums i made the settings.
But this does not work: when i close a topic the Ajax loader keep on turning and turning and nothing happens till i click on another link everywhere at the forum. I can see now that the topic is closed but it is not moved to the forum i set in the ACP?
@kasimi, i will PM you a testaccount if you want. I really need this extension before i go to 3.1.6 :)

Bruninoit
Registered User
Posts: 499
Joined: Thu Jun 13, 2013 2:34 pm
Location: Florence (Italy)
Name: Bruno Andrew
Contact:

Re: [DEV] Move Topics When Locked

Post by Bruninoit »

If you disable this extension, the lock function work?

witvisser
Registered User
Posts: 62
Joined: Wed Nov 25, 2009 9:08 am

Re: [DEV] Move Topics When Locked

Post by witvisser »

Good idea, you are right :)
When i disable this extension, the lock and reopen moderator function also doesn't work and the Ajax loader keep on turning and turning and nothing happens :)
So this problem has nothing to do with this extension.
But what can cause this problem?

Bruninoit
Registered User
Posts: 499
Joined: Thu Jun 13, 2013 2:34 pm
Location: Florence (Italy)
Name: Bruno Andrew
Contact:

Re: [DEV] Move Topics When Locked

Post by Bruninoit »

Probably the addition of the event. I have the same problem, started after I've added the event.

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 4067
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [DEV] Move Topics When Locked

Post by kasimi »

Sorry about that, I forgot to report the results of the investigation at pantherfan's board. It turned out that I missed to declare the $phpbb_dispatcher. After applying this patch to your /includes/mcp/mcp_main.php it should work without any issues:

https://github.com/phpbb/phpbb/pull/4109/files

witvisser
Registered User
Posts: 62
Joined: Wed Nov 25, 2009 9:08 am

Re: [DEV] Move Topics When Locked

Post by witvisser »

Now everything is working correct with this patch :D
Thanks kasimi ;)

witvisser
Registered User
Posts: 62
Joined: Wed Nov 25, 2009 9:08 am

Re: [DEV] Move Topics When Locked

Post by witvisser »

When i lock a topic from a forum the topic go's automaticly to the forum as it's set in ACP (for example Trash).
Afterwards in the Trash Forum the Topics counter is set correct (+1) but the Posts counter displays not correct anymore (is stays always the same).

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 4067
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [DEV] Move Topics When Locked

Post by kasimi »

Post count synchronization is now in the master (download), thanks for reporting this.

witvisser
Registered User
Posts: 62
Joined: Wed Nov 25, 2009 9:08 am

Re: [DEV] Move Topics When Locked

Post by witvisser »

Thanks for this.
Just tested and now the Post count synchronization is working perfect :D

CarolC1
Registered User
Posts: 572
Joined: Sat Dec 02, 2006 4:26 pm

Re: [DEV] Move Topics When Locked

Post by CarolC1 »

The extension is working perfectly when I lock a topic using the Quick-Mod tools.

What I want to do is use it with Topic Solved.
Topic Solved locks the topic automatically when the user clicks Solved.

I want the user to click Solved, Topic Solved locks it, then Move Topics When Locked moves it to the archive forum.

The idea is not working.

When I click Solved, the topic is locked.
I see the locked icon, and in the db I see topic_status is 1.
When I click the Quick-Mod tools I see the option to unlock.
It seems to be locked.
But it did not move.

Would love to be able to do this to save moderator time.
thanks

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 4067
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [DEV] Move Topics When Locked

Post by kasimi »

The reason for this is that the event core.mcp_lock_unlock_after isn't triggered (which this extension uses to be notified of a topic being locked) which in turn is because the Topic Solved extension doesn't call the lock_unlock() function to lock the topic. I'll have a look at the extension to see if it offers any custom events to hook into.

Locked

Return to “Extensions in Development”