Contact us form on custom page

Discussion forum for Extension Writers regarding Extension Development.
User avatar
R3gi
Registered User
Posts: 103
Joined: Mon May 05, 2014 4:33 pm
Location: Czech Republic

Re: Contact us form on custom page

Post by R3gi » Wed Mar 02, 2016 4:45 pm

I'm confused. So I don't have to include the admin_form.php file to the main_listener.php file but istead I should somehow insert something from memberlist.php or from admin_form.php file to the main_listener.php file? Okay, I am totally lost :cry:

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Contact us form on custom page

Post by RMcGirr83 » Wed Mar 02, 2016 5:03 pm

Your listener file simply displays a link to the $this->helper->route('R3gi_about_route' file. You need to insert something like this into that file and adjust your yml file accordingly as well as the construct within that file (eg for the container and request class).

Code: Select all

        if (!class_exists('messenger'))
        {
            include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
        }
        $form = $phpbb_container->get('message.form.admin');
        $form->bind($request);
        $error = $form->check_allow();
        if ($error)
        {
            trigger_error($error);
        }
        if ($request->is_set_post('submit'))
        {
            $messenger = new /messenger(false);
            $form->submit($messenger);
        }
        $template_html = $form->get_template_file();
        $form->render($template); 
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
R3gi
Registered User
Posts: 103
Joined: Mon May 05, 2014 4:33 pm
Location: Czech Republic

Re: Contact us form on custom page

Post by R3gi » Wed Mar 02, 2016 6:04 pm

I'm sorry, I really appreciate your help, but this sounds too complicated for me. Especially when there's no phpBB extension guide available which would help me to understand "what the hell is going on" for newbies like me :cry:

The only I've realized is that there's no way to create even this simple extension without deep knowledge of php and the phpBB system structure…

Why we have to insert something like this? And how did you realize what's necessary to make the contact form working? And please what does it mean
RMcGirr83 wrote:You need to insert something like this into that file and adjust your yml file accordingly as well as the construct within that file (eg for the container and request class)
I'm sorry for my ignorance.
Here is the whole extension, I've done so far (still not working).
Attachments

[The extension zip has been deactivated and can no longer be displayed.]


Post Reply

Return to “Extension Writers Discussion”