Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 182
Total: 182

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

0 Members and 1 Guest are viewing this topic.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • 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
5725 Views
Last post April 19, 2007, 01:06:10 am
by Nigerdream
0 Replies
4012 Views
Last post March 12, 2012, 07:57:21 pm
by HostFat
5 Replies
5979 Views
Last post November 25, 2016, 09:44:10 pm
by Ogletree
3 Replies
3147 Views
Last post June 23, 2017, 09:16:48 am
by Vincent Volmer
1 Replies
1065 Views
Last post October 18, 2022, 01:36:35 pm
by SMFHacks

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal