MyBB Community Forums

Full Version: Making "Email Notification" default to "checked"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How do I set the default setting for the Email Notification Post Option? I would like all my users to default to "yes" (checked) so that they will automatically receive an email whenever there is a new reply to threads they have posted to.

I assume this is doable, since it seems to be the default setting on this board!

Any help is greatly appreciated...
in the showthread_quickreply template find
<label><input type="checkbox" class="checkbox" name="postoptions[emailnotify]" value="yes" {$postoptionschecked['emailnotify']} />&nbsp;<strong>{$lang->email_notify}</strong></label>
replace with
<label><input type="checkbox" class="checkbox" name="postoptions[emailnotify]" value="yes" {$postoptionschecked['emailnotify']} checked="checked" /> <strong>{$lang->email_notify}</strong></label>

and done
pepotiger Wrote:in the showthread_quickreply template find
<label><input type="checkbox" class="checkbox" name="postoptions[emailnotify]" value="yes" {$postoptionschecked['emailnotify']} />&nbsp;<strong>{$lang->email_notify}</strong></label>
replace with
<label><input type="checkbox" class="checkbox" name="postoptions[emailnotify]" value="yes" {$postoptionschecked['emailnotify']} checked="checked" /> <strong>{$lang->email_notify}</strong></label>

and done

Thanks so much for the quick reply, pepotiger.

I tried it, but it doesn't seem to work. Again, I'm a noob, so perhaps I didn't do it correctly. Here is what I tried:

1. Clicked on Templates: Search; searched Template Names for showthread_quickreply.
2. I edited the MASTER Template, substituting the text as instructed. (When that didn't work, I also tried editing the Default and Global templates also, but neither had the desired effect).

I reverted back to the original template text for now. Could you take a look at the suggested revision above and let me know if there is anything I should correct or change?

Thanks!

-David
You need to make the changes on all the template sets you have on your forum (or at least the ones you have themes associated with).

When you say "[you] edited the MASTER Template" are you talking about the MyBB Default Templates?
DennisTT Wrote:When you say "[you] edited the MASTER Template" are you talking about the MyBB Default Templates?

There seemed to be three templates associated with "showthread_quickreply": MASTER, GLOBAL, and DEFAULT.

Do I need to change this in all three versions?

The only Theme I have installed is the MyBB Default theme.

Thanks for your continued help...

-David
so, do the modification in the defult theme, if you still unable to do it, please go
Templates>>edit / modify>>click exapan that facing your defult theme>>showthread_templates>>showthread_quick_reply
and post it here
pepotiger Wrote:so, do the modification in the defult theme, if you still unable to do it, please go
Templates>>edit / modify>>click exapan that facing your defult theme>>showthread_templates>>showthread_quick_reply
and post it here

Ok...I tried again, and it still didn't work. Here is the code that is currently in the showthread_quick_reply for Default Theme:

<br />
<form method="post" action="newreply.php" name="input">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="hidden" name="subject" value="RE: {$thread['subject']}" />
<input type="hidden" name="action" value="do_newreply" />
<input type="hidden" name="tid" value="{$tid}" />
<input type="hidden" name="posthash" value="{$posthash}" />
<input type="hidden" name="quoted_ids" value="" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td colspan="2" class="thead">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['quickreply']}.gif" id="quickreply_img" class="expander" alt="[-]"/></div>
<div><strong>{$lang->quick_reply}</strong></div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['quickreply_e']}" id="quickreply_e">
<tr>
<td class="trow1" valign="top" width="22%">
<strong>{$lang->message}</strong><br />
<span class="smalltext">{$lang->message_note}<br /><br />
<label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="yes" {$postoptionschecked['signature']} />&nbsp;<strong>{$lang->signature}</strong></label><br />
<label><input type="checkbox" class="checkbox" name="postoptions[emailnotify]" value="yes" {$postoptionschecked['emailnotify']} checked="checked" /> <strong>{$lang->email_notify}</strong></label><br />
<label><input type="checkbox" class="checkbox" name="postoptions[disablesmilies]" value="yes" />&nbsp;<strong>{$lang->disable_smilies}</strong></label>{$closeoption}</span>
</td>
<td class="trow1">
	<div>
		<textarea style="width: 90%; margin: 0;" rows="8" cols="80" name="message" id="message" tabindex="1"></textarea>
	</div>
	<script type="text/javascript">document.write('<div class="editor_control_bar" style="width: 90%; padding: 4px; margin-top: 3px; display: none;" id="quickreply_multiquote"><span class="smalltext">{$lang->quickreply_multiquote_selected} <a href="javascript:Thread.loadMultiQuoted();">{$lang->quickreply_multiquote_now}<\/a> {$lang->or} <a href="javascript:Thread.clearMultiQuoted();">{$lang->quickreply_multiquote_deselect}<\/a>.<\/span><\/div>');</script>
</td>
</tr>
{$captcha}
<tr>
<td colspan="2" align="center" class="tfoot"><input type="submit" class="button" value="{$lang->post_reply}" tabindex="2" accesskey="s" /> <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="3" /></td>
</tr>
</tbody>
</table>
</form>

Any help is greatly appreciated!

-David
that should do the trick, are you sure you did the modification in your defult theme templates?
pepotiger Wrote:that should do the trick, are you sure you did the modification in your defult theme templates?

Here's what I did; perhaps I am missing a step?

1. From Admin CP, I clicked on Themes: Modify/Delete.
2. Default Templates: Expand
3. Show Thread Templates: Expand
4. showthread_quickreply: Change Original
5. Replaced all the code with:
<br />
<form method="post" action="newreply.php" name="input">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="hidden" name="subject" value="RE: {$thread['subject']}" />
<input type="hidden" name="action" value="do_newreply" />
<input type="hidden" name="tid" value="{$tid}" />
<input type="hidden" name="posthash" value="{$posthash}" />
<input type="hidden" name="quoted_ids" value="" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td colspan="2" class="thead">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['quickreply']}.gif" id="quickreply_img" class="expander" alt="[-]"/></div>
<div><strong>{$lang->quick_reply}</strong></div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['quickreply_e']}" id="quickreply_e">
<tr>
<td class="trow1" valign="top" width="22%">
<strong>{$lang->message}</strong><br />
<span class="smalltext">{$lang->message_note}<br /><br />
<label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="yes" {$postoptionschecked['signature']} />&nbsp;<strong>{$lang->signature}</strong></label><br />
<label><input type="checkbox" class="checkbox" name="postoptions[emailnotify]" value="yes" {$postoptionschecked['emailnotify']} checked="checked" /> <strong>{$lang->email_notify}</strong></label><br />
<label><input type="checkbox" class="checkbox" name="postoptions[disablesmilies]" value="yes" />&nbsp;<strong>{$lang->disable_smilies}</strong></label>{$closeoption}</span>
</td>
<td class="trow1">
    <div>
        <textarea style="width: 90%; margin: 0;" rows="8" cols="80" name="message" id="message" tabindex="1"></textarea>
    </div>
    <script type="text/javascript">document.write('<div class="editor_control_bar" style="width: 90%; padding: 4px; margin-top: 3px; display: none;" id="quickreply_multiquote"><span class="smalltext">{$lang->quickreply_multiquote_selected} <a href="javascript:Thread.loadMultiQuoted();">{$lang->quickreply_multiquote_now}<\/a> {$lang->or} <a href="javascript:Thread.clearMultiQuoted();">{$lang->quickreply_multiquote_deselect}<\/a>.<\/span><\/div>');</script>
</td>
</tr>
{$captcha}
<tr>
<td colspan="2" align="center" class="tfoot"><input type="submit" class="button" value="{$lang->post_reply}" tabindex="2" accesskey="s" /> <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="3" /></td>
</tr>
</tbody>
</table>
</form>

That's it. Do I need to clear my browser cache to see the new results? Maybe I'll try that while I wait for your next suggestion. Thanks so much!
Still struggling with this one...can anyone take a peek and provide a suggestion?

Thanks!

-David
Pages: 1 2