Customizing SMF > SMF Coding Discussion
Help adding this Mod SMF Topic Prefix Mod v1.2.2 - NIBOGO
(1/1)
Ctoshack:
Ok so for some reason the mod parses fine in 2.0.2 but when i goto install it I get an error for the file
./Themes/default/Post.template.php
Suppose to find
--- Code: ---// Now show the subject box for this post.
echo '
<tr>
<td align="right" style="font-weight: bold;"', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">
', $txt['subject'], ':
</td>
--- End code ---
and replace with
--- Code: ---// Here starts the Topic Prefix Mod
if (!empty($context['prefix']))
{
echo'
<dt>
', $txt['prefix_select'], ':
</dt>
<dd>
<select name="post_prefix" id="post_prefix">
<option value="">(', $txt['prefix_no'], ')</option>';
foreach($context['prefix'] as $prefix)
echo'
<option value="', $prefix['prefix'], '" >', $prefix['prefix'], '</option>';
echo'
</select>
</dd>';
}
// Here Topic Prefix Mod End's
// Now show the subject box for this post.
--- End code ---
But mine does not look like that it looks like this
--- Code: --- // Now show the subject box for this post.
echo '
<dt>
<span', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">', $txt['subject'], ':</span>
</dt>
<dd>
<input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" class="input_text" />
</dd>
<dt class="clear_left">
', $txt['message_icon'], ':
</dt>
<dd>
<select name="icon" id="icon" onchange="showimage()">';
--- End code ---
I tried to replace just this part but I got an error.
--- Code: ---// Now show the subject box for this post.
echo '
<dt>
<span', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">', $txt['subject'], ':</span>
</dt>
--- End code ---
Can anyone help me safely integrate this to this file. I have the rest of the mod ready to go just this one file needs to be written.
Navigation
[0] Message Index
Go to full version