UBB.Dev
Mod Name / Version: Surpress Email Address Email Form 1.0

Description: Well with the new spam laws for one and the way spider's love to grab people's emails to send them porn I got tired of this happening so I figured it best to create a little email form so allow user's to email each other. The other user of course can choose not to email them back but this enables people not to see people's emails.

I welcome all feedback as this is an initial release and subject to alot of change.

[]http://mywebpages.comcast.net/omegatron/Image2.gif[/]

Working Under: UBB.Threads 6.4

Mod Status: Beta

Any pre-requisites: Threads

Author(s): Omegatron

Date: 12/27/03

Credits:

Files Altered: showprofile.tmpl and showprofile.php language files.

New Files: emailuser.php
doemailuser.php
/languages/english/emailuser.php
/languages/english/doemailuser.php
/templates/default/emailuser.tmpl
/templates/default/doemailuser.tmpl
/templates/default/doemailuser_confirm.tmpl

Database Altered: Nope

Info/Instructions: This is kinda reminisent of VB in how they use an email form instead of displaying a user's email.

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Attached File
103219-emailuser.zip  (45 downloads)
Chuck
it looks great but I got a java error when trying to type in the main text box. "Expects a object"

I added some java to the top of the templates emailuser.tmpl and doemailuser.tmpl
Code
 <? <br />echo <<<EMAILPRINT <br /><script language="javascript" type="text/javascript"> <br /><!-- <br /> <br />function quickreply(id) { <br />	if (!document.getElementById) { <br />		alert("{$ubbt_lang['NOSUPPORT']}"); <br />	} else if (navigator.userAgent.toLowerCase().indexOf("opera") != -1) { <br />		alert("{$ubbt_lang['NOSUPPORT']}"); <br />	} else { <br />		obj = document.replier; <br />		obj.Parent.value = document.getElementById('number' + id).innerHTML; <br />		subject = document.getElementById('subject' + id).innerHTML; <br />		if (!pattern.test(subject)) { <br />			subject = 'Re: ' + subject; <br />		} <br />		obj.Subject.value = subject; <br />		insertAtCaret(obj.Body, ' '); <br />		obj.Body.focus(); <br />	} <br />} <br /> <br />function storeCaret (textEl) { <br />        if (textEl.createTextRange) <br />                textEl.caretPos = document.selection.createRange().duplicate(); <br />} // end fn <br /> <br />function insertAtCaret (textEl, text) { <br />        if (textEl.createTextRange && textEl.caretPos) { <br />                var caretPos = textEl.caretPos; <br />                caretPos.text = <br />                        caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? <br />                        text + ' ' : text; <br />        } else { <br />                textEl.value  = textEl.value + text; // for non MSIE browsers just append it <br />        } <br /> <br />        return true; <br />}// fn <br /> <br />// --> <br /></script> <br />$tbopen 


Need to give josh credit since I lifted the code from his quick reply mod to debug it. Nice job
Updated and no need to Javascript
Requested ability to send attachments. Some users can't edit images so they send to others to help them. Would that add them to the site band width using this? Maybe not such a good idea unless it was only allowed for a select group, admin and mods.
Quite frankly I am not sure about the site bandwidth question as I am not too hip on mail features and how that would relate.

As far as the attachments I am sure that can be arragned quite easily
Would love to see this updated for 6.5
© UBB.Developers