[DEV] Introduciator : extension in phpBB 3.2.x

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
Feneck91
Registered User
Posts: 77
Joined: Mon May 20, 2013 9:47 am
Name: Stéphane Château
Contact:

[DEV] Introduciator : extension in phpBB 3.2.x

Post by Feneck91 » Wed Feb 21, 2018 12:02 pm

I work on the MOD Introduciator convertion to extension.

I work fine on it but I have a big problem: the user that introduce himself is able to see / edit it's own introduce while it is always approbation pending : this kind of work is working fine now.
But, it was possible to a moderator to reply to the introduce pending approbation : it cannot do that : into posting.php, there is this code:

Code: Select all

$post_data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

if (!$post_data)
{
	if (!($mode == 'post' || $mode == 'bump' || $mode == 'reply'))
	{
		$user->setup('posting');
	}
	trigger_error(($mode == 'post' || $mode == 'bump' || $mode == 'reply') ? 'NO_TOPIC' : 'NO_POST');
}

// Not able to reply to unapproved posts/topics
// TODO: add more descriptive language key
if ($auth->acl_get('m_approve', $forum_id) && ((($mode == 'reply' || $mode == 'bump') && $post_data['topic_visibility'] != ITEM_APPROVED) || ($mode == 'quote' && $post_data['post_visibility'] != ITEM_APPROVED)))
{
	trigger_error(($mode == 'reply' || $mode == 'bump') ? 'TOPIC_UNAPPROVED' : 'POST_UNAPPROVED');
}
Here, the last trigger_error is called because the approbation is pending and between the SQL execution code and the error trigger no callback is executed...
Only one callback in the begining of the file is called : core.modify_posting_parameters but I can do nothing with that!

Or ask to phpBB team to add a callback at this point to force a reply that let the right to post into an approval pending message.. Or a workaroud to find to make it possible...

No way, I have no idea...
Last edited by kinerity on Wed Feb 21, 2018 12:58 pm, edited 1 time in total.
Reason: Moved to Extension Writers Discussion

User avatar
fliper4o
Registered User
Posts: 267
Joined: Wed Mar 23, 2011 8:15 pm
Contact:

Re: [DEV] Introduciator : extension in phpBB 3.2.x

Post by fliper4o » Wed Feb 21, 2018 12:12 pm

Maybe here?
EXTENSIONS FORUMS > Extension Writers Discussion (Discussion forum for Extension Writers regarding Extension Development.)

User avatar
posey
Registered User
Posts: 706
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: [DEV] Introduciator : extension in phpBB 3.2.x

Post by posey » Wed Feb 21, 2018 12:53 pm

First of all, you should post in the Extension Writes Discussion.

And secondly, I have no idea what you're asking and what you're trying to achieve.
Could you please provide a link to your code and more clearly explain what you're trying to achieve?
''I'm pretty sure there's a lot more to life than being really, really, ridiculously good looking. And I plan on finding out what that is.''

User avatar
Feneck91
Registered User
Posts: 77
Joined: Mon May 20, 2013 9:47 am
Name: Stéphane Château
Contact:

Re: [DEV] Introduciator : extension in phpBB 3.2.x

Post by Feneck91 » Wed Feb 21, 2018 3:45 pm

Sorry for my bad location posting...

The extension should be able to let the moderator reply to a pending approval topic. And it seems to be not possible.
I will let the source code later, I'm at work right now.

User avatar
Feneck91
Registered User
Posts: 77
Joined: Mon May 20, 2013 9:47 am
Name: Stéphane Château
Contact:

Re: [DEV] Introduciator : extension in phpBB 3.2.x

Post by Feneck91 » Wed Feb 21, 2018 8:46 pm

Feneck91 wrote:
Wed Feb 21, 2018 3:45 pm
Sorry for my bad location posting...

The extension should be able to let the moderator reply to a pending approval topic. And it seems to be not possible.
I will let the source code later, I'm at work right now.
This is the sample :
Image

User avatar
3Di
Registered User
Posts: 12893
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [DEV] Introduciator : extension in phpBB 3.2.x

Post by 3Di » Fri Feb 23, 2018 9:43 pm

A github repository is better if you want someone to get a look at your code, anyway..

As far as I know is not possible to do what you want with the present core code, possible actions seems to be 'approve' or 'restore' or 'disapprove' if you look at includes/mcp/mcp_queue.php

Perhaps you should move the topic to a forum and there let the moderators have to discuss onto it, once done, split the topic and make it visible in the appropriate forum.

It's just a guess mine, I didn't read your code therefore I don't know exactly what you are about.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests