SMFHacks.com

SMF Classifieds => Support => Topic started by: neforum on September 26, 2007, 12:13:25 pm

Title: SMF Classifieds on Classic YaBB SE Theme
Post by: neforum on September 26, 2007, 12:13:25 pm
I've installed on the Classic YaBB theme, and i've had to modify certain files manually to get the classifieds working, but i'm totally stumped about the editing needed to index.template.php to get a button showing. Is there in fact a button?

If you could help out i'd be much obliged.

I've attached my index.template.php file.

My installation is at www.neforum2.co.uk/smf



Title: Re: SMF Classifieds on Classic YaBB SE Theme
Post by: SMFHacks on September 26, 2007, 01:28:34 pm
We do not have a classifieds button to offer for that theme. But we could add a textlink.
Title: Re: SMF Classifieds on Classic YaBB SE Theme
Post by: neforum on September 27, 2007, 01:47:52 am
A text link would be ok, if you could advise me what I need to add to the index.template.php file.

This is the bit of code that i'm having trouble accommodating, as the bits it does the searches for aren't there in this theme. What do I need in their place?

Code: [Select]
<file name="$themedir/index.template.php">
<operation>
<search position="before"><![CDATA[$current_action = 'admin';
if (in_array($context['current_action'], array(]]></search>
<add><![CDATA['classifieds',]]></add>
</operation>
<operation>
<search position="before"><![CDATA[// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
]]></search>
<add><![CDATA[
// the [SMF Classifieds] button
if ($context['allow_smfclassifieds_view'])
echo ($current_action == 'classifieds' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'classifieds' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=classifieds">' , $txt['smfclassifieds_menu']  , '</a>
</td>' , $current_action == 'classifieds' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

]]></add>
</operation>
</file>



Thanks,

Dave
Title: Re: SMF Classifieds on Classic YaBB SE Theme
Post by: SMFHacks on September 27, 2007, 09:48:06 am
Attach your index.template.php from the classic theme and I will take a look
Title: Re: SMF Classifieds on Classic YaBB SE Theme
Post by: neforum on September 27, 2007, 05:04:45 pm
Thanks, it's already attached to the first message in this thread.
Title: Re: SMF Classifieds on Classic YaBB SE Theme
Post by: SMFHacks on September 27, 2007, 05:18:54 pm
Added a link to the template