Welcome, Guest. Please login or register.

ShoutBox!

Scrubmeister

Today at 10:32:40
Good to see the site back faster than ever. :)
 

Skhilled

Yesterday at 21:09:09
I've upgraded the server...more resources. ;)
 

Ken

Yesterday at 20:57:10
Now that you mention it...  :D
 

Skhilled

Yesterday at 20:47:19
...and, you should notice that the site is much faster.  :o
 

Ken

Yesterday at 20:31:37
Hey Steve.
 

Skhilled

Yesterday at 17:56:10
Re-read the message below...
 

Skhilled

2024-03-31, 15:22:06
Oh yeah, you need to upgrade the site first...
 

Ken

2024-03-30, 09:54:54
Whoops! I forgot that the SMF install here on OFF is out of date!  :'(
 

Ken

2024-03-30, 09:44:48
 Conga-Rats Steve!  :thumbup:
Me gonna install it here just for the fun of it!  :)
 

Skhilled

2024-03-29, 22:15:23
Released!  :D

Recent Topics

TP Articles


Search in titles
Search in article texts

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

0 Members and 1 Guest are viewing this topic.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11667
  • 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.