miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  
 

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

 
Author Bluesplayer
Partaker
#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
Partaker
#3 | Posted: 14 Mar 2014 09:18 
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 
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
Partaker
#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 
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
Partaker
#7 | Posted: 15 Mar 2014 10:11 
Works perfectly.

Thanks

Author Bluesplayer
Partaker
#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 
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
Partaker
#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?
 Share Topic's Link

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑