How to hide contact from guests and newly registered?

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
User avatar
John connor
Registered User
Posts: 2208
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Name: Aaron
Contact:

How to hide contact from guests and newly registered?

Post by John connor » Fri Nov 18, 2016 8:22 am

I thought I changed the correct permission in groups to never, but that didn't do it.

It was "Can view profiles, memberlist and online list."

User avatar
canonknipser
Registered User
Posts: 2063
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: How to hide contact from guests and newly registered?

Post by canonknipser » Fri Nov 18, 2016 8:37 am

The "contact us" has been created to provide everybody - including non registered users - with a simple method to contact the board adminstration.

If you want to enable the "contact us" only for registered users, don't use it. :mrgreen:
Do it the classic way: Post the contact informations in a separate forum where only those registered users have access - maybe just with the information "Send a PM to 'Admin'"
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

User avatar
John connor
Registered User
Posts: 2208
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Name: Aaron
Contact:

Re: How to hide contact from guests and newly registered?

Post by John connor » Fri Nov 18, 2016 2:33 pm

No, no, no! I worded that wrong.

This.


Image

User avatar
Lumpy Burgertushie
Registered User
Posts: 66575
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: How to hide contact from guests and newly registered?

Post by Lumpy Burgertushie » Fri Nov 18, 2016 2:59 pm

on my test board, if you have that permission set to no for guests then guests can not see that contact bubble at all.
If you have it set to never for newly registered members, they can not see it at all either.

not sure why it is not working that way on your board.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50673
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to hide contact from guests and newly registered?

Post by stevemaury » Fri Nov 18, 2016 3:00 pm

You can use this extension - viewtopic.php?f=536&t=2338681#p14220861 - to create template switches for Guests and NRU and then use the switch to turn off the contact display in viewtopic_body.html.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

User avatar
John connor
Registered User
Posts: 2208
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Name: Aaron
Contact:

Re: How to hide contact from guests and newly registered?

Post by John connor » Fri Nov 18, 2016 4:14 pm

stevemaury wrote:You can use this extension - viewtopic.php?f=536&t=2338681#p14220861 - to create template switches for Guests and NRU and then use the switch to turn off the contact display in viewtopic_body.html.

I have no idea how to use this man. How do I use it. It's installed, I see no options and I don't see a viewtopic_body.html in the FTP where this extension lives. I assume I add that somewhere? What would be the code for this? I also don't know the group IDs for NRU and guests.

I'm code stupid.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50673
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to hide contact from guests and newly registered?

Post by stevemaury » Fri Nov 18, 2016 4:47 pm

The extension allows you to use template switches to display or not display certain items in the templates of the styles. Like this:

Code: Select all

<!-- IF S_GROUP_5 --> This is only visible for members of the group with id 5 <!-- ENDIF -->
So you would use this in the viewtopic_body.html template file of your style, like this:

FIND:

Code: Select all

 <dd class="profile-contact">
            <strong>{L_CONTACT}{L_COLON}</strong>
            <div class="dropdown-container dropdown-left">
               <a href="#" class="dropdown-trigger"><span class="imageset icon_contact" title="{postrow.CONTACT_USER}">{postrow.CONTACT_USER}</span></a>
               <div class="dropdown hidden">
                  <div class="pointer"><div class="pointer-inner"></div></div>
                  <div class="dropdown-contents contact-icons">
                     <!-- BEGIN contact -->
                        {% set REMAINDER = postrow.contact.S_ROW_COUNT % 4 %}
                        <!-- DEFINE $S_LAST_CELL = ((REMAINDER eq 3) or (postrow.contact.S_LAST_ROW and postrow.contact.S_NUM_ROWS < 4)) -->
                        <!-- IF REMAINDER eq 0 -->
                           <div>
                        <!-- ENDIF -->
BEFORE, ADD:

Code: Select all

<!-- IF not S_GROUP_N or IF not S_GROUP_X--> (where N and/or X is the group_id of the group you want to hide it from)
AFTER, ADD:

Code: Select all

<!-- ENDIF -->
I haven't tested this, so the exact location of the opening and closing switches may need to be played with.

To find a group ID, ACP, Manage groups, Pre-defined groups, hover the cursor over the "Settings" for the group and look in the browser status bar. The last part there will be "g=N", where N is the group_id for that group.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

User avatar
John connor
Registered User
Posts: 2208
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Name: Aaron
Contact:

Re: How to hide contact from guests and newly registered?

Post by John connor » Sat Nov 19, 2016 12:56 am

I'm having a dickens of a time trying to find the right spot to place <!-- IF not S_GROUP_1 or IF not S_GROUP_7-->
<!-- ENDIF -->

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21455
Joined: Fri Aug 29, 2008 9:49 am
Location: Not watching cricket

Re: How to hide contact from guests and newly registered?

Post by Mick » Sat Nov 19, 2016 12:15 pm

Help for extensions is via the extension author in the dedicated discussion/support area for the extension, here in this case.
"The more connected we get the more alone we become" - Kyle Broflovski

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50673
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to hide contact from guests and newly registered?

Post by stevemaury » Sat Nov 19, 2016 1:14 pm

Well, this is not really an extension support request; it is a template editing request. The extension only creates the switch to put in the template,

Where have you put it and what happens when it doesn't work? Are you purging the cache after edits?
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

User avatar
Lumpy Burgertushie
Registered User
Posts: 66575
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: How to hide contact from guests and newly registered?

Post by Lumpy Burgertushie » Sat Nov 19, 2016 3:27 pm

and, this is not necessary since you can just use permissions to do this.

like I said above, the default guest setting does not allow them to see that little contact bubble and if you set the NRU group to never for that permission they can not see it either.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
John connor
Registered User
Posts: 2208
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Name: Aaron
Contact:

Re: How to hide contact from guests and newly registered?

Post by John connor » Sun Nov 20, 2016 1:22 am

stevemaury wrote:Well, this is not really an extension support request; it is a template editing request. The extension only creates the switch to put in the template,

Where have you put it and what happens when it doesn't work? Are you purging the cache after edits?

I placed it right above <dd class="profile-contact"> and other places above that. I do clear the cache and what happens is that when I click a post I get a blank white page.

User avatar
John connor
Registered User
Posts: 2208
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Name: Aaron
Contact:

Re: How to hide contact from guests and newly registered?

Post by John connor » Sun Nov 20, 2016 1:24 am

Lumpy Burgertushie wrote:and, this is not necessary since you can just use permissions to do this.

like I said above, the default guest setting does not allow them to see that little contact bubble and if you set the NRU group to never for that permission they can not see it either.


robert

It just isn't working with the permissions set to never. I checked the permission masks and everything is never as well. I don't get it. Could an EXT interfere?

Just to clarify. It's the "Can view profiles, memberlist and online list" in the NRU and Guest groups.

User avatar
John connor
Registered User
Posts: 2208
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Name: Aaron
Contact:

Re: How to hide contact from guests and newly registered?

Post by John connor » Sun Nov 20, 2016 9:02 am

So I must not be doing something right. I just installed a new board version 3.1.10 into Xampp on my computer and set the permission for guest and I can still see that bubble for contact. See image. I even changed everything for Guests to Never. No dice.


http://imgur.com/AOkJf8a

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

Re: How to hide contact from guests and newly registered?

Post by RMcGirr83 » Sun Nov 20, 2016 11:23 am

There are no switches within for permissions. It will display as long as the user isn't a bot as defined in the database.
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

Locked

Return to “[3.1.x] Support Forum”