MyBB Hacks

Full Version: [Update3] Email @ eml_field, post thread , copy sent 2 eml_field addrs w/ admin mesg?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Possible to set up forum with xthread field for email address, and when submit thread, copy is sent to that email address along with admin message ?

If possible, where might find info about ?
It cannot be done with XThreads.
(03-17-2012 07:00 PM)ZiNgA BuRgA Wrote: [ -> ]It cannot be done with XThreads.

Fair enough, thank you for the info !
As someone said, if u dont ask...

Actually trying to figure way to let person know (automatedly), by email, that a thread is being started about them.
Any ideas on another way ?

Ps:
Might be able to do with 'subject' or 'message' field at template: tp_newthread (modified for name and display only), which are still normal MyBB fields ?
Maybe at tp_newthread.php with something from sendthread.php ?

Ps2:
Ie if 'message' field was email address ?

Ps3:
Starting to look at edit cr_newthread.
Does start even look possible ?

Code:
<html>
<head>

<!-- revise cr_newthread for send to threadfield email address -->

<title>{$lang->newthread_in}</title>
{$headerinclude}
<script type="text/javascript" src="jscr
ipts/post.js?ver=1400"></script>
</head>
<body>
{$header}
{$preview}
{$thread_errors}
{$attacherror}
<form action="newthread.php?fid={$fid}&amp;processed=1" method="post" 
enctype="multipart/form-data" name="input">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->cr_post_new_thread}</strong></td>
</tr>
{$loginbox}

<!-- use same textfield format as subject for message -->
<tr>
<td class="trow2" width="20%"><strong><font size="5">{$lang->cr_thread_subject}</font></strong></td>
<td class="trow2">{$prefixselect}
<input type="text" class="textbox" name="subject" 
size="40" maxlength="30" value="{$subject}" tabindex="1" /></td>
</tr>

<tr>
<td class="trow2" width="20%"><strong><font size="5">{$lang->cr_your_message}</font></strong></td>
<td class="trow2">
{$prefixselect}
<input type="text" class="textbox" name="message" 
size="12" maxlength="12" value="{$message}" tabindex="1" />
<small style="display: block;">Use format: 000-000-0000</small></td>
</tr>

{$codebuttons}
{$multiquote_external}
</td>
</tr>
{$extra_threadfields}

<!-- omit
$(modoptions)
$(subscriptionmethod)
$(pollbox)
$(captcha)
-->

</table>

<!-- below for additional after threadfield input note -->

<div style="text-align:center">xxx</div>

<br />
<div style="text-align:center">

<input type="submit" class="button" name="submit" value="Submit" 
tabindex="4" accesskey="s" />  

<input type="submit" class="button" name="previewpost" value="Preview" 
tabindex="5" />

{$savedraftbutton}

</div>

<input type="hidden" name="action" value="do_newthread" />
<input type="hidden" name="posthash" value="{$posthash}" />
<input type="hidden" name="attachmentaid" value="" />
<input type="hidden" name="attachmentact" value="" />
<input type="hidden" name="quoted_ids" value="{$quoted_ids}" />
<input type="hidden" name="tid" value="{$tid}" />
{$editdraftpid}

</form>


<!-- from Edit Template: sendthread, to friend -->

<form action="sendthread.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">

<tr>
<td colspan="2" width="100%" class="thead"><strong>{$lang->send_thread}</strong></td>
</tr>

<tr>

<td width="40%" class="trow1"><strong>{$lang->cr_your_message}</strong><br />

<span class="smalltext">{$lang->recipient_note}</span></td>

</table>

<br />

<input type="hidden" name="action" value="do_sendtofriend" />
<input type="hidden" name="tid" value="{$tid}" />

<div align="center"><input type="submit" class="button" value="{$lang->send_thread}" />

</div>
</form>

{$forumrules}
{$footer}
</body>
</html>

...if possible, need to figure out how to just do send-to-friend process without textbox and other display code ?

I'm sorry, but is there any reason why you don't want to use the Send Thread to a Friend feature?
(03-19-2012 06:11 AM)RateU Wrote: [ -> ]I'm sorry, but is there any reason why you don't want to use the Send Thread to a Friend feature?

Thank you for the followup question.

Per the previous post...
Quote:Actually trying to figure way to let person know (automatedly), by email, that a thread is being started about them.
Any ideas on another way ?

Ie, do not want to eliminate 'Send Thread to a Friend', just trying to use part of that code (if possible) to send a new thread post to a person to let them know (send them a notice) there is a new thread being posted which has information about them... actually an 'online' business referral, ie the forum is a list of business referrals (threads).
And would like the notice to be sent when the new thread post is 'submitted'.

Hope that clarifies.

Ps:
Maybe this thread should be moved to MyBB Hacks / Modifications ?
The forum uses xthread fields along with the normal 'subject' and 'message' fields, which hopefully could be used for this 'auto email' question (ie the 'message' field has the 'friend' (person who needs to be notified) email address in it.

Latest attempt a cr_newthread modify...

Code:
<html>
<head>

<!-- revise cr_newthread for send to threadfield ('message') email address -->

<title>{$lang->newthread_in}</title>
{$headerinclude}
<script type="text/javascript" src="jscr
ipts/post.js?ver=1400"></script>
</head>
<body>
{$header}
{$preview}
{$thread_errors}
{$attacherror}
<form action="newthread.php?fid={$fid}&amp;processed=1" method="post" 
enctype="multipart/form-data" name="input">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->cr_post_new_thread}</strong></td>
</tr>
{$loginbox}

<!-- use same textfield format as subject for message -->
<tr>
<td class="trow2" width="20%"><strong><font size="5">{$lang->cr_thread_subject}</font></strong></td>
<td class="trow2">{$prefixselect}
<input type="text" class="textbox" name="subject" 
size="40" maxlength="30" value="{$subject}" tabindex="1" /></td>
</tr>

<tr>
<td class="trow2" width="20%"><strong><font size="5">{$lang->cr_your_message}</font></strong></td>
<td class="trow2">
{$prefixselect}
<input type="text" class="textbox" name="message" 
size="12" maxlength="12" value="{$message}" tabindex="1" />
<small style="display: block;">Use format: 000-000-0000</small></td>
</tr>

{$codebuttons}
{$multiquote_external}
</td>
</tr>
{$extra_threadfields}

<!-- omit
$(modoptions)
$(subscriptionmethod)
$(pollbox)
$(captcha)
-->

</table>

<!-- below for additional after threadfield input note -->

<div style="text-align:center">xxx</div>

<br />
<div style="text-align:center">

<input type="submit" class="button" name="submit" value="Submit" 
tabindex="4" accesskey="s" />  

<input type="submit" class="button" name="previewpost" value="Preview" 
tabindex="5" />

{$savedraftbutton}

</div>

<input type="hidden" name="action" value="do_newthread" />
<input type="hidden" name="posthash" value="{$posthash}" />
<input type="hidden" name="attachmentaid" value="" />
<input type="hidden" name="attachmentact" value="" />
<input type="hidden" name="quoted_ids" value="{$quoted_ids}" />
<input type="hidden" name="tid" value="{$tid}" />
{$editdraftpid}

</form>

<!-- from Edit Template: sendthread, to friend -->

<form action="sendthread.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />

<input type="hidden" name="action" value="do_sendtofriend" />
<input type="hidden" name="tid" value="{$tid}" />

<div align="center"><input type="submit" class="button" value="{$lang->send_thread}" />

</div>
</form>

{$forumrules}
{$footer}
</body>
</html>

Reference URL's