Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4274
Latest: kellanphil
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43648
Total Topics: 7571
Most Online Today: 42
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 43
Total: 43

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

0 Members and 1 Guest are viewing this topic.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16612
    • 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

  • Bad Emails DO NOT EMAIL
  • 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
5872 Views
Last post April 19, 2007, 01:06:10 am
by Nigerdream
0 Replies
4082 Views
Last post March 12, 2012, 07:57:21 pm
by HostFat
5 Replies
6257 Views
Last post November 25, 2016, 09:44:10 pm
by Ogletree
3 Replies
3371 Views
Last post June 23, 2017, 09:16:48 am
by Vincent Volmer
1 Replies
1453 Views
Last post October 18, 2022, 01:36:35 pm
by SMFHacks

+- Recent Topics

RESOLVED: Store Not Logging Transactions or Sending Emails by SMFHacks
January 23, 2025, 06:24:27 pm

Ability to exclude categories from ezPortal SMF Gallery random image ezblock by Alistair
January 22, 2025, 08:20:13 am

How to move SMF to new server by SMFHacks
January 21, 2025, 08:45:53 pm

Figuring out settings by SMFHacks
January 12, 2025, 04:56:14 pm

Filesizes incorrect by SMFHacks
January 12, 2025, 02:02:47 pm

December 2024 Sale! by SMFHacks
December 02, 2024, 10:30:38 pm

Denying members some admin settings by rickk
November 17, 2024, 12:02:55 pm

Weird setup by SMFHacks
November 07, 2024, 06:37:41 am

Restoring a deleted photo by Monocero
November 01, 2024, 04:23:56 am

Gallery Pro reinstalation by Lirorobert
October 14, 2024, 01:43:43 am

Powered by EzPortal