Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4219
Latest: Toddie
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 42829
Total Topics: 7462
Most Online Today: 66
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 55
Total: 56

Author Topic: Theme Author's How to Support SMFHacks.com Mods  (Read 11935 times)

0 Members and 1 Guest are viewing this topic.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16247
    • View Profile
Theme Author's How to Support SMFHacks.com Mods
« on: December 27, 2006, 02:55:28 pm »
Examples for SMF 1.1.1 themes using tabs

Using these codes will allow your theme to support my major mods and save yourself and users some trouble from editing themes.

First find
Code: [Select]
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
Replace with
Code: [Select]
if (in_array($context['current_action'], array('gallery','links','articles','staff', 'tag', 'contact', 'search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))

Add these codes to your themes menu function you might have to adjust the code a little to work with your theme.
Code: [Select]
// the [SMF Gallery] button
if (isset($txt['smfgallery_menu']))
{
if ($context['allow_smfgallery_view'])
echo ($current_action == 'gallery' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'gallery' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=gallery">' , $txt['smfgallery_menu']  , '</a>
</td>' , $current_action == 'gallery' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
}

// the [Articles] button
if (isset($txt['smfarticles_menu']))
{
if ($context['allow_view_smfarticles'])
echo ($current_action == 'articles' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'articles' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=articles">' , $txt['smfarticles_menu']  , '</a>
</td>' , $current_action == 'articles' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
}

// the [tags] button
if (isset($txt['smftags_menu']))
{
echo ($current_action == 'tags' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'tags' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=tags">' , $txt['smftags_menu']  , '</a>
</td>' , $current_action == 'tags' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
}

// the [links] button
if (isset($txt['smflinks_menu']))
{
if ($context['allow_view_smflinks'])
echo ($current_action == 'links' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'links' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=links">' , $txt['smflinks_menu']  , '</a>
</td>' , $current_action == 'links' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
}


// the [staff list] button
if (isset($txt['smfstaff_stafflist']))
{
if ($context['allow_view_stafflist'])
echo ($current_action == 'staff' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'staff' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=staff">' , $txt['smfstaff_stafflist']  , '</a>
</td>' , $current_action == 'staff' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
}

// the [contact] button
if (isset($txt['smfcontact_contact']))
{
if ($context['allow_view_contact'])
echo ($current_action == 'contact' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'contact' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=contact">' , $txt['smfcontact_contact']  , '</a>
</td>' , $current_action == 'contact' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
}
« Last Edit: December 27, 2006, 03:00:34 pm by SMFHacks »
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline ©RebelRose

  • Member
  • *
  • Posts: 18
    • View Profile
    • RebelRose Networks
Re: Theme Author's How to Support SMFHacks.com Mods
« Reply #1 on: March 04, 2007, 12:30:44 am »
I have been adding this to my themes, I would like to point out to new designers or people who are going to modify themes, to recheck the code for the menu links, not all themes use the same images, you may need to tweak it a bit.  ;)

Offline Bec

  • Member
  • *
  • Posts: 30
    • View Profile
Re: Theme Author's How to Support SMFHacks.com Mods
« Reply #2 on: January 27, 2008, 02:46:14 pm »
"you might have to adjust the code a little to work with your theme. "

How do i go about doing this???

Brides United - Online Wedding Planning
http://www.bu-community.com/

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
5529 Views
Last post April 19, 2007, 01:06:10 am
by Nigerdream
0 Replies
3514 Views
Last post March 12, 2012, 07:57:21 pm
by HostFat
5 Replies
5233 Views
Last post November 25, 2016, 09:44:10 pm
by Ogletree
3 Replies
2428 Views
Last post June 23, 2017, 09:16:48 am
by Vincent Volmer
1 Replies
320 Views
Last post October 18, 2022, 01:36:35 pm
by SMFHacks

+- Recent Topics

[Mod]GDPR Helper by SMFHacks
Today at 01:50:14 pm

RSS Feed Poster Database Error by SMFHacks
May 22, 2023, 06:26:18 pm

Errors With Older Version. by Ken.
May 09, 2023, 05:35:40 pm

Pretty Urls SEO Pro by SMFHacks
May 06, 2023, 03:30:11 pm

New Post Image Upload Error by Mike66
April 28, 2023, 07:30:28 am

Copyright Removal Key by SMFHacks
April 03, 2023, 02:44:28 pm

Converting from Aeva Media by sudhakar
April 02, 2023, 11:09:54 am

Using SMF's Built-in Search Algorithm by shuban
March 27, 2023, 09:15:10 am

Permissions query by davejo
March 26, 2023, 04:43:48 am

prettyurls - TroubleShooting.wiki by SMFHacks
March 25, 2023, 01:49:35 pm

Powered by EzPortal