TheCripZone SMF Themes Site

All Things Public => Theme Support => Topic started by: Druwish on Jul 01, 10, 10:37:34 AM

Title: Almost afraid to ask...
Post by: Druwish on Jul 01, 10, 10:37:34 AM
Do you have a link to, or can you tell me how to add an arcade button to the original Black Rain theme?  I already have the .gif button for it. The button .gif is a little animated space invaders guy.

I'm using smf version 1.1.11
Title: Re: Almost afraid to ask...
Post by: ZarPrime on Jul 01, 10, 11:29:39 AM
Druwish,

Welcome to Cripzone.

You say you have the original Black Rain theme but this is somewhat problematic as there have been several versions of that theme.  Can you give us a link from where you downloaded the theme from so that we know for sure which version you are using.  Also, when Crip logs in here, he might need to see your site so could you provide a link to your site.  Finally, when you talk about an arcade button, are you talking about the top menu?  The reason I ask is that I had thought that all versions of Black Rain used a tab rather than a button but I could be wrong.  Crip will know the answer to that better than I will.

ZarPrime
Title: Re: Almost afraid to ask...
Post by: Druwish on Jul 01, 10, 02:26:42 PM
I call top menu tabs "buttons".  Its a bad habit of mine that sometimes confuses people when I say it.

Here's the link to the theme I have loaded on my message board: 

http://custom.simplemachines.org/themes/index.php?lemma=118 (http://custom.simplemachines.org/themes/index.php?lemma=118)

Here's the link to my site: 

*Removed*
Title: Re: Almost afraid to ask...
Post by: Crip on Jul 01, 10, 02:50:27 PM
Quote from: Druwish on Jul 01, 10, 02:26:42 PM
I call top menu tabs "buttons".  Its a bad habit of mine that sometimes confuses people when I say it.
Here's the link to the theme I have loaded on my message board: 
http://custom.simplemachines.org/themes/index.php?lemma=118 (http://custom.simplemachines.org/themes/index.php?lemma=118)
Here's the link to my site: 
http://evilbastages.net/forum/index.php (http://evilbastages.net/forum/index.php)


Hi ,
this small bit of code should work , if not , we can try another way:
Index.template.php Add Like:

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Work out where we currently are.
   $current_action = 'home';
   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')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'arcade', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   // Are we using right-to-left orientation?
   if ($context['right_to_left'])
   {
      $first = 'last';
      $last = 'first';
   }
   else
   {
      $first = 'first';
      $last = 'last';
   }

The above is just for the "$current_action"



The below is how your Arcade button_tab _ link is added >>>>


   echo '
             <div id="tabs6">
             <ul>';

// Show the [home] button.
    echo '<li', $current_action == 'home' ? ' id="chosen"' : '', '><a href="', $scripturl, '"><span>' , $txt[103] , '</span>< / a ></li>';

// Show the [arcade] button.
    echo '<li', $current_action == 'arcade' ? ' id="chosen"' : '', '><a href="', $scripturl, '?action=arcade"><span>Arcade</span>< / a ></li>';


Title: Re: Almost afraid to ask...
Post by: Druwish on Jul 01, 10, 06:57:10 PM
I'll give it a shot.  It's been quit a while since I've worked with code.  I'll take it nice and slow. :)
Title: Re: Almost afraid to ask...
Post by: ZarPrime on Jul 01, 10, 07:25:41 PM
Druwish,

Quote from: Druwish on Jul 01, 10, 02:26:42 PM
I call top menu tabs "buttons".  Its a bad habit of mine that sometimes confuses people when I say it.

It's an honest mistake.  Most older themes did indeed use buttons but, these days, most themes use tabs.  Let us know if you need any additional help.

ZarPrime
Title: Re: Almost afraid to ask...
Post by: Druwish on Jul 01, 10, 07:56:52 PM
THANK YOU!!!  I had to close 2 spaces that were in the code, but other than that it worked like a charm!  You da man!  Thanks again, it's very much appreciated! O0 :)