Mutt
Well-known member
I often PC the staff and I've gotten tired of typing all of their names over & over. I made this quick template edit to make things easier. now I can just click "Quick Staff" & have their names inserted for me.
this will require you to edit the names that get inserted. what I did was manually added all the names to a conversation & then copied & pasted them into my code below.
in template "conversation_add"
find the form tag
and edit it to add a name to the tag
find
and change it to the following. be sure to edit out my staff names & insert your own. names need to be comma separated.
NOTE 1: if you wanted to have more than 1 quick add group, it would be easy enough to edit the javascript to add a if / else based on the value of ItemID. In my situation I didn't need it.
NOTE 2: in my code only mods & admins will see this link but you certainly could edit the conditional or remove it to show to all.
this will require you to edit the names that get inserted. what I did was manually added all the names to a conversation & then copied & pasted them into my code below.
in template "conversation_add"
find the form tag
Code:
<form action="{xen:link 'conversations/insert'}" method="post"
Code:
<form action="{xen:link 'conversations/insert'}" name="Form" method="post"
find
Code:
<xen:if is="{$remaining} != 1">
<p class="explain">{xen:phrase separate_names_with_comma} <xen:if is="{$remaining} > 0">{xen:phrase you_may_invite_up_to_x_members, 'number={xen:number $remaining}'}</xen:if></p>
</xen:if>
and change it to the following. be sure to edit out my staff names & insert your own. names need to be comma separated.
Code:
<xen:if is="{$visitor.is_admin} OR {$visitor.is_moderator}">
<script language="JavaScript" type="text/JavaScript">
function AddItem(ItemId)
{
document.Form.recipients.value = 'Doctor Ivan, Señor Pedro, TorontoAtHome, buddysgirl, John Daniels819, Mutt, ';
}
</script>
<br><div class="explain" style="float: right; cursor: pointer;" onclick="AddItem('staff');">Quick Staff</div>
</xen:if>
<xen:if is="{$remaining} != 1">
<div class="explain">{xen:phrase separate_names_with_comma} <xen:if is="{$remaining} > 0">{xen:phrase you_may_invite_up_to_x_members, 'number={xen:number $remaining}'}</xen:if></div>
</xen:if>
NOTE 1: if you wanted to have more than 1 quick add group, it would be easy enough to edit the javascript to add a if / else based on the value of ItemID. In my situation I didn't need it.
NOTE 2: in my code only mods & admins will see this link but you certainly could edit the conditional or remove it to show to all.