Guest quick reply.

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Cryoma
Registered User
Posts: 15
Joined: Thu Apr 10, 2008 10:45 pm

Guest quick reply.

Post by Cryoma » Thu Sep 16, 2010 5:31 am

Here's the story, I have quick reply enabled in all forums, and guests have permission to post.
I went into viewtopic.php and took out the <--IF NOT GUEST--> or whatever that enclosed the quick reply code, so now it shows up for guests too, which I want.
My problem is that if I type a message in the quick reply form as a guest and submit, the post isn't added.
I'm wondering how I can change guest permissions to allow use of quick reply.
Thanks!

P.S. running fresh install of latest version.

Cryoma
Registered User
Posts: 15
Joined: Thu Apr 10, 2008 10:45 pm

Re: Guest quick reply.

Post by Cryoma » Fri Sep 17, 2010 6:18 pm

No ideas?
Edit: Nevermind, I found a quick reply mod that allows guests to post, so I'll dissect that.

no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: Guest quick reply.

Post by no_comment » Fri Sep 25, 2015 9:02 pm

I am also interested in this. I want to show quick reply for guests.

Anuj Dhawan
Registered User
Posts: 366
Joined: Sat Aug 10, 2013 6:44 pm

Re: Guest quick reply.

Post by Anuj Dhawan » Sat Sep 26, 2015 6:31 am

Cryoma wrote:No ideas?
Edit: Nevermind, I found a quick reply mod that allows guests to post, so I'll dissect that.
What release of phpBB are you using? MODs were used in phpBB 3.0.x and not in phpBB 3.1.x. And "Quick Reply" is a feature of the default phpBB package now, perhaps I've misunderstood...
Thanks,

User avatar
Oyabun1
Former Team Member
Posts: 23163
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: Guest quick reply.

Post by Oyabun1 » Sat Sep 26, 2015 9:36 am

Anuj Dhawan wrote:And "Quick Reply" is a feature of the default phpBB package
Not for guests. They are specifically prevented from using it.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

Anuj Dhawan
Registered User
Posts: 366
Joined: Sat Aug 10, 2013 6:44 pm

Re: Guest quick reply.

Post by Anuj Dhawan » Sat Sep 26, 2015 2:21 pm

I did not realize that. Thanks.
Thanks,

no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: Guest quick reply.

Post by no_comment » Mon Jan 25, 2016 6:06 am

Here it is:

Code: Select all

OPEN
viewtopic.php

FIND
    if ($user->data['is_registered'] && $config['allow_quick_reply'] && ($topic_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY) && $auth->acl_get('f_reply', $forum_id))

IN LINE FIND AND REMOVE
    $user->data['is_registered'] &&
I need to show anti-bot question in quick reply. Does anyone know how to do it?

User avatar
AmigoJack
Registered User
Posts: 5050
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Guest quick reply.

Post by AmigoJack » Mon Jan 25, 2016 9:42 am

Do you now realize why it was never intended for guests? Keep in mind that quick replies always increase traffic bandwidth and impact server performance and only make sense when being used almost always. So, do you still really want this?
The worst thing about censorship is ███████████

no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: Guest quick reply.

Post by no_comment » Mon Jan 25, 2016 9:39 pm

Yes, I still want it. ;)
no_comment wrote:I need to show anti-bot question in quick reply. Does anyone know how to do it?

User avatar
AmigoJack
Registered User
Posts: 5050
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Guest quick reply.

Post by AmigoJack » Tue Jan 26, 2016 8:08 am

Open /viewtopic.php and find:

Code: Select all

        // Originally we use checkboxes and check with isset(), so we only provide them if they would be checked   
Before, add:

Code: Select all

        /*** 2016-01-26 BEGIN AmigoJack
            https://www.phpbb.com/community/viewtopic.php?f=46&t=2104306 ***/
        if ($config['enable_post_confirm'] && !$user->data['is_registered']) {
            include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
            $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
            $captcha->init(CONFIRM_POST);

            $captcha_data = array(
                'message'    => utf8_normalize_nfc(request_var('message', '', true)),
                'subject'    => utf8_normalize_nfc(request_var('subject', '', true)),
                'username'    => '',
            );

            if ($captcha->is_solved() === false) {
                $template->assign_vars(array(
                    'S_CONFIRM_CODE'            => true,
                    'CAPTCHA_TEMPLATE'            => $captcha->get_template(),
                ));
            } else {
                $qr_hidden_fields+= $captcha->get_hidden_fields();
            }
        }
        /*** 2016-01-26 END ***/ 
Open /styles/prosilver/template/quickreply_editor.html and find 2 occurances of:

Code: Select all

				<div id="message-box
Before, add:

Code: Select all

	<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
		<!-- DEFINE $CAPTCHA_TAB_INDEX = 3 -->
		<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
	<!-- ENDIF -->

Tested with Q&A.
Last edited by AmigoJack on Tue Jan 26, 2016 4:00 pm, edited 1 time in total.
The worst thing about censorship is ███████████

no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: Guest quick reply.

Post by no_comment » Tue Jan 26, 2016 12:07 pm

Thanks a lot, AmigoJack. It works! :D
Now I want another thing. Hope I am not rude. I would like to show the "Username" field in quick reply. By default, this field is shown only in full editor (preview).

User avatar
AmigoJack
Registered User
Posts: 5050
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Guest quick reply.

Post by AmigoJack » Tue Jan 26, 2016 3:06 pm

And why haven't you said so before? It'd been easier to do both things at once.

Open /viewtopic.php and in my code find:

Code: Select all

               'username'    => '', 
Replace with:

Code: Select all

                'username'    => utf8_normalize_nfc(request_var('username', '', true)), 
In my code find:

Code: Select all

        }
        /*** 2016-01-26 END ***/ 
Before, insert:

Code: Select all

            $template-> assign_var( 'S_DISPLAY_USERNAME', 1 ); 
Open /styles/prosilver/template/quickreply_editor.html and find 2 occurances of:

Code: Select all

				<h2>{L_QUICKREPLY}</h2>
				<fieldset class="fields1">
After, insert:

Code: Select all

		<!-- IF S_DISPLAY_USERNAME -->
		<dl style="clear: left;">
			<dt><label for="username">{L_USERNAME}:</label></dt>
			<dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
		</dl>
		<!-- ENDIF -->
Untested.
Last edited by AmigoJack on Tue Jan 26, 2016 4:01 pm, edited 1 time in total.
The worst thing about censorship is ███████████

no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: Guest quick reply.

Post by no_comment » Tue Jan 26, 2016 3:25 pm

Dear AmigoJack,

I have two small problems: 1.I can't find <div id="message-box"> in my subsilver2 based styles. It is only in prosilver. And 2.I have <fieldset class="fields1"> two times in my file.
I hope you can help me, if it's not too much to ask. :( You are very kind...

User avatar
AmigoJack
Registered User
Posts: 5050
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Guest quick reply.

Post by AmigoJack » Tue Jan 26, 2016 3:59 pm

  1. It's just projecting the same code and positions: before and after the post subject.

    Open /styles/subsilver2/template/quickreply_editor.html and find:

    Code: Select all

    		<tr>
    			<td class="row1" width="22%"><b class="genmed">{L_MESSAGE}:</b></td>
    Before, insert:

    Code: Select all

    		<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
    		<!-- DEFINE $CAPTCHA_TAB_INDEX = 4 -->
    		<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
    		<!-- ENDIF -->
    Find:

    Code: Select all

    			<th align="center" colspan="2">{L_QUICKREPLY}</th>
    		</tr>
    After, insert:

    Code: Select all

    <!-- IF S_DISPLAY_USERNAME -->
    	<tr>
    		<td class="row1"><b class="genmed">{L_USERNAME}:</b></td>
    		<td class="row2"><input class="post" type="text" tabindex="1" name="username" size="25" value="{USERNAME}" /></td>
    	</tr>
    <!-- ENDIF -->
  2. Do it for both occurances. Precisely the changes near <div id="message-box"> should also be done where <div id="message-box-ns"> occurs - I've edited my post.
Untested.
The worst thing about censorship is ███████████

no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: Guest quick reply.

Post by no_comment » Tue Jan 26, 2016 4:50 pm

The username field does not appear. :(
Here is my quickreply_editor.html.

Locked

Return to “[3.0.x] Support Forum”

Who is online

Users browsing this forum: Sogou [Spider] and 75 guests