News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF Topic Prefix Lite Mod

Started by Nibogo, April 19, 2009, 10:27:22 AM

Previous topic - Next topic

N i g h t m a r e


When trying to install my "SMF Topic Prefix Mod" I get the error:




Database Error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 6
File: /home/pulsive/public_html/maintenance/Packages/temp/db_prefix.php
Line: 54





One major reason i need this fixed is because, I cannot post anything on my forum with this problem, When trying to post I get this error:




Table 'pulsive_gamersdecoded.smf_prefix' doesn't exist
File: /home/pulsive/public_html/maintenance/Sources/Post.php
Line: 1214





I've attached both my "Post.php" file and my "db_prefix.php" file... I really need this fixed and YES, I KNOW "Don't forget to back up" don't say that... I need this fixed A.S.A.P please...

Elizabeth II

So I'm trying to install Prefix mod and..

In Post template

Find:
// 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>


Replace:
// 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.


And I get this when I post

Parse error: syntax error, unexpected '<' in .../Themes/default/Post.template.php on line 218
209: <option value="', $prefix['prefix'], '" >', $prefix['prefix'], '</option>';
210:
211: echo'
212: </select>
213: </dd>';
214: }
215: // Here Topic Prefix Mod End's
216:
217: // Now show the subject box for this post.
218: <dd>
219: <input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" class="input_text" />
220: </dd>
221: <dt class="clear_left">
222: ', $txt['message_icon'], ':


I guess I haven't done it proper, I noticed what it asks me to find the ending it a bit different to what is actually in the post template.. Can anyone edit it to make it work please?

Thank you!

Ceane

I seem to be having a bit of a problem.

I'm able to add a prefix and set the board on which it is to be used and the groups that can use it fine, but if I add a second one it will overwrite the first one that I made, and if I try to edit the one that is there it'll tell me that I haven't selected a prefix to edit.

Advertisement: