News:

Wondering if this will always be free?  See why free is better.

Main Menu

post.template.php slightly messed up

Started by FireDitto, September 13, 2011, 10:25:29 AM

Previous topic - Next topic

FireDitto

Ugh. I installed both a "Tags" and a "topics Descriptions" mods and they installed neatly; however, when I ewnt to post a topic, I got the Template Phase Error. Into the post.template I went, and I made a slight adjustment to their ordering and it fixed it enough that the Phase Error is now gone; however, they are still clashing.

I know it's something really small and easy (I'm pretty sure it's just their order that needs to be adjusted somehow) But I really am not that confident in my abilities to play around with it much more than I already have.

I've included a Screenshot and the template in question. It's a little before line 230, I think.

Thank you dearly for any help! It's greatly appreciated.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

TheListener

Can you post the error line plus the 5 lines before and after so someone can take a look.

FireDitto

... The entire template is already there, but okay.

// If it's locked, show a message to warn the replyer.
echo '
<p class="information"', !empty($context['draft_locked']) ? '' : ' style="display: none"', ' id="lock_warning">
', $txt['topic_locked_no_reply'], '
</p>';

// The post header... important stuff
echo '
<dl id="post_header">';

// Guests have to put in their name and email...
if (isset($context['name']) && isset($context['email']))
{
echo '
<dt>
<span', isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) || isset($context['post_error']['bad_name']) ? ' class="error"' : '', ' id="caption_guestname">', $txt['name'], ':</span>
</dt>
<dd>
<input type="text" name="guestname" size="25" value="', $context['name'], '" tabindex="', $context['tabindex']++, '" class="input_text" />
</dd>';

if (empty($modSettings['guest_post_no_email']))
echo '
<dt>
<span', isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? ' class="error"' : '', ' id="caption_email">', $txt['email'], ':</span>
</dt>
<dd>
<input type="text" name="email" size="25" value="', $context['email'], '" tabindex="', $context['tabindex']++, '" class="input_text" />
</dd>';
}

if (!empty($context['subaccount_list']))
{
echo '
<dt>', $txt['use_subaccount'], ':</dt>
<dd>
<select name="subaccount">';
foreach($context['subaccount_list'] as $subaccount)
echo '
<option value="', $subaccount['id'], '" ', !empty($subaccount['selected']) ? 'selected="selected"' : '', '>', $subaccount['name'], '</option>';
echo '
</select>
</dd>';
}

// 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>
';
// Tagging system Mod
if(!isset($context['num_replies']))
{
echo '
<dt>
<b>', $txt['smftags_topic'], '</b>
</dt>
<dd>
<input type="text" name="tags"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
<br /><span class="smalltext">', $txt['smftags_seperate'], '</span>
</dd>';

}


//End Tagging system mod
echo '

<dd>
<input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" class="input_text" />
</dd>';


$boards = !empty($modSettings['topic_descriptions_boards']) ? explode(",", $modSettings['topic_descriptions_boards']) : array();
if (!empty($modSettings['topic_descriptions_enable']) && $context['is_first_post'] && !in_array($context['current_board'], $boards)) {
echo ' <dt>
<span id="caption_description">' . $txt['topic_descriptions_post_desc'] . '</span>
</dt>
<dd>
<input type="text" name="description"', $context['description'] == '' ? '' : ' value="' . $context['description'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="' . (!empty($modSettings['topic_descriptions_maxlen']) ? (int) $modSettings['topic_descriptions_maxlen'] : 25) . '" class="input_text" />
</dd>';
}

echo '
<dt class="clear_left">
', $txt['message_icon'], ':
</dt>
<dd>
<select name="icon" id="icon" onchange="showimage()">';

// Loop through each message icon allowed, adding it to the drop down list.



I think that about covers it all...
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

FireDitto

I managed to fix it.

It didn't like the order in which I'd installed the two mods; so I reversed it and it's happy now.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Advertisement: