*

Burton

  • ***
  • 128
Remove Template Option from Messages
« on: March 20, 2015, 01:36:08 AM »
I would like to remove the Templates option from messages.

I like to keep it simple, less database queries :)

I tried several code removals from this area of the compose.tpl yet none were successful.

Code: [Select]
<!-- MOD START -->

<p ><b>{lang mkey='message_templates'}</b></p>

your help appreciated :)


*

Pharg

  • *****
  • 2,065
  • osDate Version: osDate Evo v1.0
Re: Remove Template Option from Messages
« Reply #1 on: March 20, 2015, 03:56:09 AM »
Hi Burton,

In the compose.tpl On line 228 find this:
Code: [Select]
<p ><b>{lang mkey='message_templates'}</b></p>

<form name="frmTemplate" action="" method="post" onsubmit="javascript: return checkMe(this);">

<input type="hidden" name="frm" value="frmTemplate"/>
<input type="hidden" name="txtrecipient" value="{$smarty.request.recipient}"/>

<input type="hidden" name="chknotify" value="0"/>
<input type="hidden" name="chkinclude" value="0"/>
<input type="hidden" name="spam_code" value="" />

<table width="100%"   cellpadding="{$config.cellpadding}" cellspacing="{$config.cellspacing}" border="0">

{foreach item=item from=$templates}
<tr>
<td width="25" valign="top" ><input type="radio" name="templateid" value="{$item.id}" /></td>
<td>{$item.text|nl2br|stripslashes}</td>
</tr>
{foreachelse}
<tr><td colspan="2" >{lang mkey='no_msg_templates'}</td></tr>
{/foreach}

</table>

{if $templates|@count}
<p ><input type="button" class="formbutton" name="btnsend" value="{lang mkey='send'}" onclick="javascript:document.frmTemplate.spam_code.value=document.frmCompose.spam_code.value; document.frmTemplate.submit();" /></p>
{/if}

</form>

<p ><input type="button" onclick="document.location.href='mytemplates.php?recipient={$smarty.request.recipient}'" class="formbutton" name="btnmyremplates" value="{lang mkey='my_templates'}"/></p>

Either delete it or replace it with this:
Code: [Select]
{* <p ><b>{lang mkey='message_templates'}</b></p>

<form name="frmTemplate" action="" method="post" onsubmit="javascript: return checkMe(this);">

<input type="hidden" name="frm" value="frmTemplate"/>
<input type="hidden" name="txtrecipient" value="{$smarty.request.recipient}"/>

<input type="hidden" name="chknotify" value="0"/>
<input type="hidden" name="chkinclude" value="0"/>
<input type="hidden" name="spam_code" value="" />

<table width="100%"   cellpadding="{$config.cellpadding}" cellspacing="{$config.cellspacing}" border="0">

{foreach item=item from=$templates}
<tr>
<td width="25" valign="top" ><input type="radio" name="templateid" value="{$item.id}" /></td>
<td>{$item.text|nl2br|stripslashes}</td>
</tr>
{foreachelse}
<tr><td colspan="2" >{lang mkey='no_msg_templates'}</td></tr>
{/foreach}

</table>

{if $templates|@count}
<p ><input type="button" class="formbutton" name="btnsend" value="{lang mkey='send'}" onclick="javascript:document.frmTemplate.spam_code.value=document.frmCompose.spam_code.value; document.frmTemplate.submit();" /></p>
{/if}

</form>

<p ><input type="button" onclick="document.location.href='mytemplates.php?recipient={$smarty.request.recipient}'" class="formbutton" name="btnmyremplates" value="{lang mkey='my_templates'}"/></p>*}
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

Burton

  • ***
  • 128
Re: Remove Template Option from Messages
« Reply #2 on: March 20, 2015, 05:02:50 AM »
Thank you Phil :)

Brilliant! Working perfectly :)