Username required for guests

For users who wish to pay for specific services from other members.
NOTE: The phpBB team has no responsibility in these services whatsoever. Usage is at your own risk!
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations
READ: Wanted's Forum Rules

NOTE: All contracts and services provided through this forum are at your own responsibility.
The phpBB Teams will NOT deal with disputes resulting from interactions through this forum.
Locked
User avatar
open-your-eyes
Registered User
Posts: 94
Joined: Mon Jul 31, 2017 8:20 am
Contact:

Username required for guests

Post by open-your-eyes »

Title/Job Description: Username required for guests

Target audience: adult

Reward: backlink

Deadline: none

Preferred contact method: PM

Link to the board: http://onanisti.ro

Detailed description of the tasks: I already did the edits from here viewtopic.php?p=14350301#p14350301
So I have the username in my quick reply box, now.

A friend did this trick for me:

Code: Select all

OPEN
posting.php

FIND
	// check form
	if (($submit || $preview) && !check_form_key('posting'))
	{
		$error[] = $user->lang['FORM_INVALID'];
	}

ADAUGA, INAINTE
	//check username field if empty
	if (($submit || $preview) && empty($post_data['username']))
	{
		$error[] = $user->lang['EMPTY_USERNAME'];	
	}

Pentru common.php din language/ro să nu uiți traducerea
'EMPTY_USERNAME'						=> 'You must specify a username when posting a new topic.',
So now the username is required. But there is a BUG! Also logged in users are required to enter username. So what I need now is to do a check to see if the user is logged in or not. This should be easy to do, I guess. ;)
Thank you!

P.S.: My forum version is 3.0.14.
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Username required for guests

Post by MarkDHamill »

If guests create a pseudo-username to make a post, I don't believe it creates an account based on the username entered as all guests share user_id = 1. At best, postings could only be differentiated by a session ID, if one is generated, and passed on the URL,

I would really recommend upgrading to phpBB 3.3 as 3.0.14 has been obsolete since 2014 and few web hosts still support PHP 5.6. If they do, it likely won't be much longer.

In any event, the work involved is not trivial and would require an extension in phpBB 3.3. I doubt you will get anyone willing to do the work for backlinks.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
open-your-eyes
Registered User
Posts: 94
Joined: Mon Jul 31, 2017 8:20 am
Contact:

Re: Username required for guests

Post by open-your-eyes »

Hi and thanks for the reply!
I do not need guests to create accounts. Just not be able to post without entering a username in the quick reply form.
It's totally another thing.
quick-reply.PNG
Thank you!
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Username required for guests

Post by MarkDHamill »

That would require a minor extension. By default these posts show up as Anonymous.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
open-your-eyes
Registered User
Posts: 94
Joined: Mon Jul 31, 2017 8:20 am
Contact:

Re: Username required for guests

Post by open-your-eyes »

I figure it out myself:

Code: Select all

OPEN
posting.php

FIND
	//check username field if empty

BEFORE, ADD
if ($user->data['user_id'] == ANONYMOUS)
Like I said. It was a small edit. ;)
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26508
Joined: Fri Aug 29, 2008 9:49 am

Re: Username required for guests

Post by Mick »

If the request is completed the OP should lock the topic.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
open-your-eyes
Registered User
Posts: 94
Joined: Mon Jul 31, 2017 8:20 am
Contact:

Re: Username required for guests

Post by open-your-eyes »

Done!
Locked

Return to “Wanted!”