miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

Hiding Direct Email From Guests But Not Admin and Chosen User?

Author Bluesplayer
Registered
#1 | Posted: 13 Mar 2014 13:40 
How can I achieve the above?

Thanks

Author Paul
Lead Developer
#2 | Posted: 13 Mar 2014 21:17 
Do you mean the "Direct Email" add-on? Or the Email field's value?

Author Bluesplayer
Registered
#3 | Posted: 14 Mar 2014 09:18 | Edited by: Moderator 
The Direct Email addon.

I have a need to make the admin and a user email links in their profiles accessible to guests but not the rest of the members. The member email links should only be viewable to logged in users.

Author Paul
Lead Developer
#4 | Posted: 14 Mar 2014 13:25 | Edited by: Paul 
Sorry, I'm a bit confused. On one hand, you propose that

Bluesplayer:
the admin and a user email links in their profiles accessible to guests but not the rest of the members

and on the other,

Bluesplayer:
The member email links should only be viewable to logged in users.

Both statements exclude each other ;)

Anyway, this add-on has an option by default, in bb_plugins code you could change this:

$directEmailGuests=TRUE;

setting it to FALSE will disallow Guests from contacting members using this add-on and it will be only allowed to registered members. May be this is what you need; if not, let me know, rephrasing your question.

Author Bluesplayer
Registered
#5 | Posted: 14 Mar 2014 13:50 
Paul:
setting it to FALSE will disallow Guests from contacting members using this add-on and it will be only allowed to registered members. May be this is what you need; if not, let me know, rephrasing your question.

Lets see if I can make this as plain as possible.

My forum had a 'contact us' and a 'contact site creator' link that used a particular form of email process that worked fine on my own server but not on the server where I moved the forum. These links I have redirected to Direct Email profile links - admin and myself, therefore $directEmailGuests has to be set to TRUE. This, though, allows access to all other profile email links to guests which I consider a problem - spam and the like, therefore I need only the 2 mentioned to be accessible to guests and the rest to logged in members only.

Sorry for the confusion.

Author Paul
Lead Developer
#6 | Posted: 14 Mar 2014 16:09 | Edited by: Paul 
So, let me rephrase this in a coding term :)

You have couple of links which lead somewhere from your HTML template, to profiles like this:

index.php?action=senddirect&user=1
index.php?action=senddirect&user=2 (or ID of your own account)

So when directly emailing those profiles, you want Guests would be able to post, right?
But you want to exclude Guest emailing to other accounts.

If so, you could add a little switch to bb_plugins code of this add-on, replacing

$directEmailGuests=TRUE;

to something like:

if(isset($_GET['user'])) $user=(integer)$_GET['user']+0; elseif(isset($_POST['user'])) $user=(integer)$_POST['user']+0; else $user=0;
if($user==1 or $user==2) $directEmailGuests=TRUE; else $directEmailGuests=FALSE;

Specify user IDs properly in the bolder code.

Let me know if it worked.

Author Bluesplayer
Registered
#7 | Posted: 15 Mar 2014 10:11 
Works perfectly.

Thanks

Author Bluesplayer
Registered
#8 | Posted: 15 Mar 2014 10:19 
Still a problem with the setup of Direct Email I think.

When a user decides to show their email address to members the Direct Email link doesn't show? I can't see the reasoning behind this. I would like to make the Direct Email link display whether this setting is activated or not. How to do this please?

Author Paul
Lead Developer
#9 | Posted: 16 Mar 2014 00:42 | Edited by: Paul 
Bluesplayer:
When a user decides to show their email address to members the Direct Email link doesn't show?

It is logical. If someone chooses to show an email to public, then why to display a link to email through server? Let other users to contact this member directly, why to use server's resources? Didn't get the idea of it... sorry.

Author Bluesplayer
Registered
#10 | Posted: 16 Mar 2014 06:44 
Paul:
It is logical. If someone chooses to show an email to public, then why to display a link to email through server? Let other users to contact this member directly, why to use server's resources? Didn't get the idea of it... sorry.

I can see your point but then again Direct Email is an addon to make life easier for members. So the very people who don't mind being contacted by showing their email address are the very ones who can't take advantage of the Direct Email addon?

Author Paul
Lead Developer
#11 | Posted: 16 Mar 2014 12:15 
Bluesplayer:
Direct Email is an addon to make life easier for members

The purpose of this add-on is to provide a way to contact a member via his email address, but at the time this email address is not shown to the contacting person. It is the add-on's primary purpose, it doesn't provide any other advantage but this.

There is no need to use server's resources, if someone's email address is clearly shown to public. Additionally, using email address in native email clients brings more safety in delivering, because email sent from PHP script could be often blocked by spam/bulk filters.

Specific miniBB Support Forums / Specific / Hiding Direct Email From Guests But Not Admin and Chosen User? Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB