December 05, 2021, 06:54:56 AM

ShoutBox!

 

Ken

2021 Nov 16 18:31:42
Yes, Welcome Aboard Mike!  :thumbup:
 

Skhilled

2021 Nov 16 11:30:14
Welcome aboard, Mike! :)
 

Skhilled

2021 Nov 12 12:38:54
LMAO!!!
 

Ken

2021 Nov 12 00:27:23
 

Ken

2021 Oct 13 11:14:20
Captain Kirk is now officially an Astronaut!!!  :heart: 😍
 

Ken

2021 Oct 09 05:09:32
 

Ken

2021 Aug 14 04:29:02
... a little late, but what the hey!  laughing7

 

Ken

2021 Aug 06 07:47:47
 

Ken

2021 Jul 30 22:30:30
 

Ken

2021 Jul 02 09:38:25
Hahahaha!  :banana:

Recent Topics

Author Topic: Add a link-button to a custom theme  (Read 1143 times)

0 Members and 1 Guest are viewing this topic.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 10253
  • Gender: Male
  • View Gallery
Add a link-button to a custom theme
« on: August 31, 2007, 08:30:15 AM »
In that theme's index.template.php:
... the code below is for a Gallery button, change as needed to fit your situation...
 
Find:
Code: [Select]

if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))

Replace with:

Code: [Select]

if (in_array($context['current_action'], array('gallery', 'admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))

Then

Find:
Code: [Select]

// 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>' : '';

Add After it:
Code: [Select]

// the [gallery] button
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>' : '';
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.