Adding navigation tabs to default index.template.php

Started by AdviseorAnswers.com, July 21, 2007, 01:32:13 PM

Previous topic - Next topic

AdviseorAnswers.com

I am learning PHP by trial and error and I seem to be making more errors right now. Here's my latest problem....

I am adding an entry point for members to access the articles section of my site. I am using the "custom actions" mod to do so. My problem at this point is adding a navigation tab for that page to the row of default tabs across the top of the page.

I am using the default theme of SMF 1.1.3 & TP v0.9.8

This what I have do so far and I can not get the new tab to show. I would really appreciate someone pointing out what I am doing wrong.

To the default index.template.php I added:
'WritersCafe'
Too:
if (in_array($context['current_action'], array('WritersCafe','staff','links','contact','tags','usercp','gallery','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin')))
$current_action = $context['current_action'];

Then added:
// the [Writer's Cafe'] button.
echo ($current_action == 'Writerscafe' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'WritersCafe' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=WritersCafe">' , $txt['WritersCafe'] , '</a>
</td>' , $current_action == 'WritersCafe' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

After:
// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' , $first , '">&nbsp;</td>';


After posting this I realized I was posting in the wrong board. I am sorry about that.
Social Networking


Advertisement: