News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Help needed please adding username mod

Started by sbarnes, April 05, 2006, 04:17:23 AM

Previous topic - Next topic

sbarnes

Hi there,
Having to do a manual install of the usename tag mod. (package manager fails on post.template probably due to other mods)

Instructions are:

<file name="$themedir/Post.template.php">
<operation>
<search position="before"><![CDATA[
'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]),
);
]]></search>
<add><![CDATA[ if (!empty($modSettings['showBbcUsername'])) {
$context['bbc_tags'][1][] = array();
$context['bbc_tags'][1]['username'] = array('code' => 'username', 'before' => '', 'after' => '[username]', 'description' => $txt['bbc_username']);
}
]]></add>


I get close but not close enough as I get an error when the post page is up.

here is the section from my post.template. Please could you show me how it should look with the mod section in place please.

array(),
'code' => array('code' => 'code', 'before' => '[codex]', 'after' => '[/codex]', 'description' => $txt[259]),
'quote' => array('code' => 'quote', 'before' => '[quotex]', 'after' => '[/quotex]', 'description' => $txt[260]),
array(),
'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]),
// Edit tag
'edit' => array('code' => 'edit', 'before' => '[edit]', 'after' => '[/edit]', 'description' => 'Edit reason'),


Please note I replaced code & quote with codex & quotex as it was messing up the format here.

Advertisement: